/* Главная форма обмена - светлая тема */

.exchange-main-form-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f8f9fa;
}

.exchange-form-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

/* Общие стили для колонок */
.exchange-column {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.exchange-column-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.exchange-title-icon {
    font-size: 20px;
    color: #4a90e2;
}

/* Поля ввода суммы удалены из блоков "Отдаете" и "Получаете" */

/* Фильтры валют */
.exchange-currency-filter {
    margin-bottom: 20px;
}

.exchange-filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.exchange-currency-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Поиск */
.exchange-search-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.exchange-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.exchange-search-input:focus {
    outline: none;
    border-color: #4a90e2;
}

.exchange-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

/* Список валют */
.exchange-currency-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exchange-currency-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
}

.exchange-currency-item:hover {
    border-color: #4a90e2;
    background: #f0f7ff;
    transform: translateX(3px);
}

.exchange-currency-item.active {
    border-color: #4a90e2;
    background: #e8f0fe;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.exchange-currency-icon,
.exchange-currency-icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.exchange-currency-icon {
    object-fit: cover;
}

.exchange-currency-icon-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.exchange-currency-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
}

.exchange-currency-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exchange-currency-reserve {
    font-size: 12px;
    color: #4a90e2;
}

.exchange-checkmark {
    color: #4a90e2;
    font-size: 18px;
    font-weight: 700;
}

.exchange-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* Блок кнопки запроса резерва над колонками */
.exchange-reserve-block {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.exchange-reserve-btn-top {
    padding: 12px 32px;
    background: #ffc107;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exchange-reserve-btn-top:hover {
    background: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Кнопка запроса резерва (внутри колонки — оставлена для совместимости, если понадобится) */
.exchange-reserve-btn {
    width: 100%;
    padding: 12px;
    background: #ffc107;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.exchange-reserve-btn:hover {
    background: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.exchange-form-select {
    cursor: pointer;
}

/* Кнопка над блоком exchange-inner (на странице) */
.exchange-reserve-row {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* Модальное окно резервов */
.exchange-reserves-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}
.exchange-reserves-modal.is-open {
    visibility: visible;
    opacity: 1;
}
.exchange-reserves-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
.exchange-reserves-modal-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.exchange-reserves-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}
.exchange-reserves-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}
.exchange-reserves-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
}
.exchange-reserves-modal-close:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}
.exchange-reserves-modal-body {
    padding: 20px;
    overflow-y: auto;
}
.exchange-reserves-loading {
    color: #666;
    font-size: 14px;
}
.exchange-reserves-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.exchange-reserves-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.exchange-reserves-item:last-child {
    border-bottom: none;
}
.exchange-reserves-code {
    font-weight: 600;
    color: #1a1a1a;
}
.exchange-reserves-value {
    color: #4a90e2;
    font-weight: 500;
}
.exchange-reserves-empty {
    color: #999;
    font-size: 14px;
    padding: 10px 0;
}

.exchange-reserves-coins {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Колонка ввода данных */
.exchange-rate-display {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.exchange-selected-currencies {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.selected-currency-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.selected-currency-item img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.selected-currency-arrow {
    color: #4a90e2;
    font-size: 20px;
    font-weight: 700;
}

.exchange-rate-lock-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 25px;
    padding: 10px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
}

/* Форма ввода данных */
.exchange-data-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.exchange-form-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.exchange-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exchange-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

/* Срочный обмен: тумблер + процент */
.exchange-form-group-rush {
    margin: 4px 0;
}
.exchange-rush-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    cursor: pointer;
}
.exchange-rush-toggle {
    width: 20px;
    height: 20px;
    accent-color: #4a90e2;
    cursor: pointer;
}
.exchange-rush-text {
    font-weight: 600;
    color: #333;
}
.exchange-rush-percent {
    font-size: 14px;
    color: #4a90e2;
    font-weight: 600;
}
.exchange-rush-percent.exchange-rush-percent-zero {
    color: #999;
}
.exchange-rush-hint {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #777;
}

.exchange-label-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exchange-label-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.exchange-label-icon span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
}

.exchange-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.exchange-form-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.exchange-form-input[readonly] {
    background: #f8f9fa;
    cursor: not-allowed;
}

.exchange-form-hint {
    font-size: 12px;
    color: #999;
}

.exchange-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.exchange-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.exchange-link {
    color: #4a90e2;
    text-decoration: underline;
}

.exchange-link:hover {
    color: #357abd;
}

.exchange-submit-btn {
    width: 100%;
    padding: 16px;
    background: #ffc107;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.exchange-submit-btn:hover {
    background: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.exchange-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.exchange-form-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .exchange-form-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .exchange-main-form-wrapper {
        padding: 20px 10px;
    }
    
    .exchange-column {
        padding: 20px;
    }
    
    .exchange-column-title {
        font-size: 20px;
    }
}
