/* ========== ИНТЕРАКТИВНЫЙ ОБМЕН - КАРУСЕЛЬ ========== */

.exchange-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    overflow: visible;
}

/* ========== ЗОНЫ ОБМЕНА ========== */

.exchange-zone {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.exchange-zone.active {
    border-color: #f0f0f0;
    box-shadow: none;
}

.zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.zone-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    flex-shrink: 0;
}

.search-wrapper {
    flex: 1;
    max-width: 200px;
}

.zone-search {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.zone-search:focus {
    outline: none;
    border-color: #000000;
    background: #ffffff;
}

.zone-search::placeholder {
    color: #aaa;
}

/* ========== КОНТЕЙНЕР КАРУСЕЛИ С КНОПКАМИ ========== */

.carousel-container {
    position: relative;
    margin-bottom: 16px;
    padding: 0 12px; /* Отступы для кнопок навигации */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
    background: #000000;
    border-color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover svg {
    color: #ffffff;
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev {
    left: 0;
}

.carousel-btn-next {
    right: 0;
}

.carousel-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ========== КАРУСЕЛЬ ВАЛЮТ (ГОРИЗОНТАЛЬНАЯ ПРОКРУТКА) ========== */

.currency-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 16px 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Кастомный скроллбар для каруселей */
.currency-carousel::-webkit-scrollbar {
    height: 6px;
}

.currency-carousel::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.currency-carousel::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.currency-carousel::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Для Firefox */
.currency-carousel {
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 #f5f5f5;
}

/* ========== КАРТОЧКИ ВАЛЮТ В КАРУСЕЛИ ========== */

.currency-card {
    min-width: 120px;
    background: #fafafa;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.currency-card:hover {
    transform: translateY(-4px);
    border-color: #000000;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.currency-card.selected {
    border-color: #000000;
    background: #000000;
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.currency-card.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.currency-card.hidden {
    display: none;
}

.card-icon {
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon .currency-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 50%;
}

.card-icon .currency-icon-text,
.card-icon .currency-icon-fallback {
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
}

.card-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.card-code {
    font-size: 11px;
    opacity: 0.6;
    font-weight: 500;
}

/* ========== ПОЛЕ ВВОДА СУММЫ ========== */

.zone-input {
    width: 100%;
    font-size: 32px;
    font-weight: 600;
    padding: 16px;
    border: none;
    background: #f5f5f5;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.zone-input:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 2px #000000 inset;
}

.zone-input::placeholder {
    color: #ccc;
}

/* ========== КНОПКА РЕВЕРСА ВАЛЮТ ========== */

.exchange-reverse {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    padding: 0 !important;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 40px auto !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.exchange-reverse:hover {
    background: #333333;
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.exchange-reverse:active {
    transform: scale(1.05) rotate(180deg);
}

.exchange-reverse svg {
    display: block !important;
    margin: 0 !important;
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex-shrink: 0 !important;
}

.exchange-reverse.rotating {
    animation: rotateReverse 0.5s ease;
}

@keyframes rotateReverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== ОТОБРАЖЕНИЕ КУРСА ========== */

.exchange-rate-display {
    text-align: center;
    padding: 16px;
    background: #fafafa;
    border-radius: 12px;
    margin-top: 24px;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.exchange-rate-display.show {
    opacity: 1 !important;
    transform: translateY(0);
}

.rate-line {
    width: 60px;
    height: 2px;
    background: #000000;
    margin: 0 auto 12px;
}

.rate-text {
    font-size: 16px;
    font-weight: 500;
}

.rate-text span {
    font-weight: 600;
}

/* ========== ЧЕКБОКС СОГЛАСИЯ С УСЛОВИЯМИ ========== */

.terms-checkbox-wrapper {
    text-align: center;
    margin: 32px 0 0 0;
    padding: 0 20px;
    animation: slideUp 0.4s ease;
}

.terms-checkbox-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
    padding: 12px 16px;
    border-radius: 12px;
    transition: background 0.2s ease;
    background: #f8f8f8;
    border: 2px solid transparent;
}

.terms-checkbox-label:hover {
    background: #f0f0f0;
    border-color: #e0e0e0;
}

.terms-checkbox-input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #000000;
    margin: 0;
}

.terms-checkbox-text {
    line-height: 1.5;
    color: #333;
}

.terms-checkbox-text a {
    color: #000000;
    text-decoration: underline;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.terms-checkbox-text a:hover {
    opacity: 0.7;
}

/* ========== КНОПКА ПРОДОЛЖЕНИЯ ========== */

.continue-button {
    width: 100%;
    max-width: 420px;
    display: block;
    margin: 48px auto 60px !important;
    padding: 20px 32px;
    font-size: 17px;
    font-weight: 600;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    animation: slideUp 0.4s ease;
}

.continue-button:hover:not(:disabled) {
    background: #1a1a1a;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.continue-button:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.continue-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #666666;
}

.continue-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.continue-button svg {
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.continue-button:hover:not(:disabled) svg {
    transform: translateX(5px);
}

/* ========== ФОРМА ДЕТАЛЕЙ (убрана с главной страницы) ========== */

.exchange-details-form {
    background: #ffffff;
    border: 2px solid #f0f0f0;
    border-radius: 20px;
    padding: 32px;
    margin-top: 24px;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-group {
    margin-bottom: 24px;
}

.detail-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.detail-input:focus {
    outline: none;
    border-color: #000000;
}

.detail-input::placeholder {
    color: #aaa;
}

.submit-button-new {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-button-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.submit-button-new:active {
    transform: translateY(0);
}

.submit-button-new svg {
    transition: transform 0.3s ease;
}

.submit-button-new:hover svg {
    transform: translateX(4px);
}

/* ========== АДАПТИВ ========== */

@media (max-width: 768px) {
    .exchange-zone {
        padding: 12px;
    }

    .zone-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 10px;
    }

    .carousel-container {
        margin-bottom: 10px;
    }

    .search-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .carousel-btn {
        width: 32px;
        height: 32px;
    }

    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }

    .carousel-btn-prev {
        left: 0;
    }

    .carousel-btn-next {
        right: 0;
    }

    .carousel-container {
        padding: 0 10px;
    }

    .currency-card {
        min-width: 110px;
        padding: 14px 10px;
    }

    .card-icon {
        font-size: 28px;
    }

    .card-icon .currency-icon-img {
        width: 28px;
        height: 28px;
    }

    .card-icon .currency-icon-text,
    .card-icon .currency-icon-fallback {
        font-size: 28px;
    }

    .card-name {
        font-size: 12px;
    }

    .card-code {
        font-size: 10px;
    }

    .zone-input {
        font-size: 28px;
        padding: 14px;
    }

    .exchange-reverse {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        padding: 0 !important;
        margin: 32px auto !important;
    }

    .exchange-reverse svg {
        width: 16px !important;
        height: 16px !important;
        max-width: 16px !important;
        max-height: 16px !important;
    }

    .exchange-details-form {
        padding: 24px;
    }

    .terms-checkbox-wrapper {
        margin: 28px 0 0 0;
        padding: 0 16px;
    }

    .terms-checkbox-label {
        font-size: 13px;
        padding: 10px 14px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .terms-checkbox-input {
        width: 20px;
        height: 20px;
    }

    .continue-button {
        max-width: 100%;
        padding: 18px 24px;
        font-size: 16px;
        margin: 40px auto 50px !important;
    }
}

@media (max-width: 480px) {
    .exchange-zone {
        padding: 16px;
        border-radius: 16px;
    }

    .zone-label {
        font-size: 12px;
    }

    .zone-search {
        padding: 7px 10px;
        font-size: 12px;
    }

    .carousel-btn {
        width: 28px;
        height: 28px;
    }

    .carousel-btn svg {
        width: 14px;
        height: 14px;
    }

    .carousel-btn-prev {
        left: 0;
    }

    .carousel-btn-next {
        right: 0;
    }

    .carousel-container {
        padding: 0 8px;
    }

    .currency-carousel {
        gap: 8px;
        padding: 4px 4px 12px 4px;
    }

    .currency-card {
        min-width: 95px;
        padding: 12px 8px;
        gap: 4px;
    }

    .card-icon {
        font-size: 24px;
    }

    .card-icon .currency-icon-img {
        width: 24px;
        height: 24px;
    }

    .card-icon .currency-icon-text,
    .card-icon .currency-icon-fallback {
        font-size: 24px;
    }

    .card-name {
        font-size: 11px;
    }

    .card-code {
        font-size: 9px;
    }

    .zone-input {
        font-size: 24px;
        padding: 12px;
    }

    .exchange-reverse {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
        padding: 0 !important;
        margin: 28px auto !important;
    }

    .exchange-reverse svg {
        width: 14px !important;
        height: 14px !important;
        max-width: 14px !important;
        max-height: 14px !important;
    }

    .exchange-rate-display {
        padding: 12px;
        margin-top: 20px;
    }

    .rate-text {
        font-size: 14px;
    }

    .exchange-details-form {
        padding: 20px;
        margin-top: 20px;
    }

    .terms-checkbox-wrapper {
        margin: 24px 0 0 0;
        padding: 0 12px;
    }

    .terms-checkbox-label {
        font-size: 12px;
        padding: 10px 12px;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .terms-checkbox-input {
        width: 20px;
        height: 20px;
    }

    .continue-button {
        max-width: 100%;
        padding: 16px 20px;
        font-size: 15px;
        margin: 36px auto 44px !important;
    }

    .continue-button svg {
        width: 16px;
        height: 16px;
    }
}

/* ========== АНИМАЦИИ ========== */

/* Плавный переход для выбранной карточки */
.currency-card {
    transition: all 0.25s ease;
}
