/* ==================== 21. КНОПКА ОБМЕНА АДРЕСОВ ==================== */
/* Контейнер для строки с адресами */
.calculator-row.address-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}

/* Обертка для кнопки обмена */
.exchange-btn-wrapper {
    position: absolute;
    left: 50%;
    top: 40px;
    transform: translate(-50%, -50%);
    z-index: 30;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white, #ffffff);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--white, #ffffff);
}

/* Основная кнопка обмена */
.address-exchange-btn,
#exchangeBtn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
    padding: 0;
    position: relative;
    z-index: 2;
}

/* Ховер эффект кнопки */
.address-exchange-btn:hover,
#exchangeBtn:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.address-exchange-btn:active,
#exchangeBtn:active {
    transform: scale(0.95) rotate(90deg);
}

/* Анимация иконки */
.address-exchange-btn i,
#exchangeBtn i {
    transition: transform 0.3s ease;
}

/* Состояния активности кнопки */
#exchangeBtn.exchange-enabled {
    opacity: 1;
    cursor: pointer;
}

#exchangeBtn.exchange-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Ховер только для активной кнопки */
#exchangeBtn.exchange-enabled:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

#exchangeBtn.exchange-enabled:active {
    transform: scale(0.95) rotate(90deg);
    transition: transform 0.1s ease;
}

/* Анимация обмена - этап 1 (вращение 180°) */
#exchangeBtn.exchange-animating {
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(180deg);
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Анимация обмена - этап 2 (вращение 360°) */
#exchangeBtn.exchange-completed {
    transform: rotate(360deg);
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Возврат к исходному состоянию */
#exchangeBtn.returning-to-normal {
    transform: rotate(0deg);
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
}

/* Пульсация для подтверждения */
#exchangeBtn.pulse-effect {
    transform: scale(0.98);
}

/* Анимация иконки внутри кнопки */
#exchangeBtn.exchange-animating i {
    transform: scale(1.3);
}

#exchangeBtn.exchange-completed i {
    transform: scale(1.1);
}

#exchangeBtn.returning-to-normal i {
    transform: scale(1);
}

