/**
 * Специфичные стили модалок страницы лота (формы, график истории цен).
 * Оболочка — в nfs-modals.css (.nfs-native-modal__*).
 */

/* Кнопка закрытия (история цен) */
.price-history-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
}

.price-history-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.price-history-loader {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.price-history-empty,
.price-history-error {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.price-history-chart-wrap {
    height: 180px;
    position: relative;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #eff6ff 0%, #fff 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.price-history-chart {
    position: relative;
    width: 100%;
    height: 100%;
}

.price-history-chart .chart-point {
    position: absolute;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    margin-bottom: -5px;
    background: var(--nfs-blue, #2563eb);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.price-history-table {
    width: 100%;
    border-collapse: collapse;
}

.price-history-table th,
.price-history-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.price-history-table th {
    font-weight: 600;
    color: #334155;
}

.price-history-table td:last-child {
    font-weight: 500;
    color: #0f172a;
}

/* Предложение цены */
.offer-price-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.offer-price-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.offer-price-lot-info {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.offer-price-lot-info strong {
    display: block;
    font-size: 1.125rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.offer-price-current {
    font-size: 0.875rem;
    color: #64748b;
}

.offer-price-input-group {
    margin-bottom: 1.5rem;
}

.offer-price-input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
}

.offer-price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.offer-price-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    transition: border-color 0.2s;
}

.offer-price-input:focus {
    outline: none;
    border-color: #2563eb;
}

.offer-price-currency {
    position: absolute;
    right: 1rem;
    color: #64748b;
    font-weight: 500;
}

.offer-price-range {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.offer-price-slider-group {
    margin-bottom: 1.5rem;
}

.offer-price-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.offer-price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.offer-price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.offer-price-diff {
    text-align: center;
    font-size: 0.875rem;
    color: #10b981;
    font-weight: 600;
    margin-top: 0.5rem;
}

.offer-price-comment-group {
    margin-bottom: 1rem;
}

.offer-price-comment-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
}

.offer-price-comment {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.offer-price-comment:focus {
    outline: none;
    border-color: #2563eb;
}

.offer-price-modal-footer {
    width: 100%;
}

.offer-price-btn-cancel,
.offer-price-btn-submit {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.offer-price-btn-cancel {
    background: #f1f5f9;
    color: #334155;
}

.offer-price-btn-cancel:hover {
    background: #e2e8f0;
}

.offer-price-btn-submit {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
}

.offer-price-btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Обмен */
.trade-offer-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.trade-offer-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.trade-offer-lot-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.trade-offer-lot-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.trade-offer-lot-info .trade-offer-current-price {
    color: #64748b;
    font-size: 0.9rem;
}

.trade-lots-list {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.trade-offer-lot-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.trade-offer-lot-item:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.trade-offer-lot-item.selected {
    border-color: #2563eb;
    background: #dbeafe;
}

.trade-offer-lot-image {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}

.trade-offer-lot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trade-offer-lot-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.5rem;
}

/* Блок с инфо о лоте в списке обмена (не путать с .trade-offer-lot-info карточки) */
.trade-offer-lot-item .trade-offer-lot-meta {
    flex: 1;
    min-width: 0;
}

.trade-offer-lot-name {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-offer-lot-price {
    font-size: 0.875rem;
    color: #10b981;
    font-weight: 500;
}

.trade-offer-lot-select {
    flex-shrink: 0;
}

.trade-offer-lot-select input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.trade-offer-comment-group {
    margin-top: 1.5rem;
}

.trade-offer-comment-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #334155;
}

.trade-offer-comment {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.trade-offer-comment:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.trade-offer-modal-footer {
    justify-content: flex-end;
}

.trade-offer-btn-cancel,
.trade-offer-btn-submit {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.trade-offer-btn-cancel {
    background: #f1f5f9;
    color: #334155;
}

.trade-offer-btn-cancel:hover {
    background: #e2e8f0;
}

.trade-offer-btn-submit {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
}

.trade-offer-btn-submit:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.trade-offer-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Заявка на лот — оболочка nfs-native-modal + карточка nfs-ds4-modal */
.lot-lead-native--ds4 .lot-lead-modal__panel-ds4 {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    max-width: 100%;
    width: 100%;
    max-height: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.lot-lead-native--ds4 .nfs-ds4-modal-overlay--lot-lead {
    background: transparent;
    padding: 0;
    min-height: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.lot-lead-native--ds4 .nfs-ds4-modal--lot-lead {
    width: 100%;
    max-width: 340px;
}

.lot-lead-form-ds4 .lot-lead-ds4-submit {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

.lot-lead-ds4-legal {
    font-size: 9px;
    color: var(--nfs-t4, #9aa0b8);
    text-align: center;
    margin: 8px 0 0;
    line-height: 1.4;
}

.lot-lead-message--ds4 {
    margin-bottom: 10px;
    font-size: 11px;
    padding: 8px 10px;
}

.lot-lead-ds4-ta {
    min-height: 52px;
    resize: vertical;
    font-family: inherit;
}

/* Заявка на лот (старые классы label-формы — оставлены для совместимости, сейчас не используются) */
.price-action-btn-primary {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    color: white !important;
}

.price-action-btn-primary:hover {
    opacity: 0.95;
}

.lot-lead-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
}

.lot-lead-modal-close:hover {
    background: #f1f5f9;
}

.lot-lead-modal-desc {
    color: #64748b;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.lot-lead-form-group {
    margin-bottom: 1rem;
}

.lot-lead-form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    color: #334155;
    font-size: 0.9rem;
}

.lot-lead-form-group .required {
    color: #dc2626;
}

.lot-lead-form-group .optional {
    color: #94a3b8;
    font-weight: 400;
}

.lot-lead-form-group input,
.lot-lead-form-group textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
}

.lot-lead-form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.lot-lead-form-group input:focus,
.lot-lead-form-group textarea:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.lot-lead-message {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.lot-lead-message-success {
    background: #d1fae5;
    color: #065f46;
}

.lot-lead-message-error {
    background: #fee2e2;
    color: #991b1b;
}

.lot-lead-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.lot-lead-btn-cancel,
.lot-lead-btn-submit {
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.lot-lead-btn-cancel {
    background: #f1f5f9;
    color: #334155;
}

.lot-lead-btn-cancel:hover {
    background: #e2e8f0;
}

.lot-lead-btn-submit {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
}

.lot-lead-btn-submit:hover:not(:disabled) {
    opacity: 0.95;
}
