/* Отступ между подзаголовком и формой обмена */
.exchange__subtitle {
    margin-bottom: 50px;
}

/* Ширина панели для десктопа */
.exchange__panel {
    max-width: 750px;
    margin: 0 auto;
}

/* Вертикальная раскладка формы обмена */
.panel__bottom-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Поля ввода */
.exchange-field {
    width: 100%;
    position: relative;
}

/* Надпись над полем ввода */
.input__label {
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
    z-index: 1;
    pointer-events: none;
}

/* Сообщение об ошибке (минимальная сумма) */
.input__error {
    position: absolute;
    bottom: 6px;
    left: 20px;
    font-size: 11px;
    font-weight: 400;
    color: #EF4444;
    z-index: 1;
    pointer-events: none;
}

/* Стили для полей ввода на десктопе */
.exchange-field .input {
    padding: 38px 140px 20px 20px;
    min-height: 85px;
    color: #1F2937;
    font-weight: 600;
}

/* Красный цвет для поля с ошибкой */
.exchange-field .input--error {
    color: #EF4444 !important;
}

/* Поле адреса - обычный padding по центру */
#input__get {
    padding: 15px 20px !important;
    min-height: 56px !important;
}

/* Поле номера карты - такая же высота как у адреса */
#input__card_number {
    padding: 15px 20px !important;
    min-height: 56px !important;
}

/* Wrapper для кнопки swap */
.swap-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 0;
    margin: -1px 0;
    padding: 0 40px;
    position: relative;
}

/* Обновленные стили для кнопки swap */
.swap-currencies-btn {
    position: relative;
    transform: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 3;
    pointer-events: auto;
    outline: none;
}

.swap-currencies-btn:focus {
    outline: none;
}

.swap-currencies-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.swap-currencies-btn .swap-icon {
    width: 36px !important;
    height: 36px !important;
    transition: transform 0.2s ease;
}

.swap-icon {
    color: #2B59FF;
}

.swap-currencies-btn:hover {
    background: #EEF2FF;
    border-color: #2B59FF;
}

/* Анимация при клике */
.swap-currencies-btn--animating img,
.swap-currencies-btn--animating .swap-icon {
    transform: rotate(180deg);
}

.swap-currencies-btn:active {
    transform: scale(0.95);
}

/* Обновление стилей для компактного селектора в новом layout */
.exchange-field .input-currency-selector {
    right: 15px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .exchange__subtitle {
        margin-bottom: 35px;
    }

    .exchange__panel {
        max-width: 100%;
        padding: 20px 15px;
    }

    /* Увеличиваем заголовок */
    .exchange__panel-title {
        font-size: 22px !important;
        margin-bottom: 25px !important;
    }

    /* Увеличиваем поля ввода - больше высота за счет padding сверху для надписи */
    .exchange-field .input {
        height: auto !important;
        min-height: 85px !important;
        font-size: 28px !important;
        font-weight: 600 !important;
        padding: 38px 140px 20px 20px !important;
        border: 1px solid #E5E7EB !important;
        line-height: 1.2 !important;
    }

    /* Увеличиваем селекторы валют */
    .input-currency-selector {
        padding: 10px 14px !important;
        gap: 10px !important;
    }

    .input-currency-selector__img {
        width: 24px !important;
        height: 24px !important;
    }

    .input-currency-selector__code {
        font-size: 16px !important;
    }

    .swap-wrapper {
        padding: 0 30px;
    }

    /* Увеличиваем кнопку swap */
    .swap-currencies-btn {
        width: 48px;
        height: 48px;
    }

    .swap-currencies-btn img {
        width: 24px;
        height: 24px;
    }

    .swap-currencies-btn .swap-icon {
        width: 40px !important;
        height: 40px !important;
    }

    /* Увеличиваем поле адреса */
    .exchange-field #input__get {
        height: 56px !important;
        font-size: 16px !important;
        padding: 15px 20px !important;
    }

    /* Увеличиваем кнопку оплаты */
    .exchange__panel-btn {
        height: 56px !important;
        font-size: 18px !important;
        padding: 0 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Убираем нижние границы у полей чтобы они соединились */
    .exchange-field:first-of-type .input {
        border-bottom: none !important;
        border-radius: 12px 12px 0 0 !important;
    }

    .exchange-field:nth-of-type(3) .input {
        border-top: none !important;
        border-radius: 0 0 12px 12px !important;
    }

    /* Отступ для поля адреса */
    .exchange-field.mt-10 {
        margin-top: 20px !important;
    }

    .exchange-field.mt-10 .input {
        border-radius: 12px !important;
    }
}

@media (max-width: 480px) {
    .exchange__panel {
        padding: 15px 12px;
    }

    /* Компактнее на очень маленьких экранах */
    .exchange-field .input {
        font-size: 24px !important;
        min-height: 75px !important;
        padding: 35px 130px 18px 20px !important;
    }

    .input__label {
        top: 10px !important;
        font-size: 11px !important;
    }

    .swap-wrapper {
        padding: 0 20px;
    }

    .swap-currencies-btn {
        width: 44px;
        height: 44px;
    }

    .swap-currencies-btn img {
        width: 22px;
        height: 22px;
    }

    .swap-currencies-btn .swap-icon {
        width: 38px !important;
        height: 38px !important;
    }
}
