.alternatives-container {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease-in-out;
    transform-origin: top;
}

.alternatives-container.show {
    opacity: 1;
    max-height: 300px;
    transform: translateY(0) scaleY(1);
}

.alternatives-container.hide {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px) scaleY(0);
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.alternatives-header {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alternative-quote {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.alternative-quote:last-child {
    border-bottom: none;
}

.alt-protocol {
    color: var(--oneinch-blue);
    font-weight: 600;
    font-size: 0.8rem;
}

.alt-amount {
    color: #ffffff;
    font-weight: 500;
}

.alt-gas {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.rate-main {
    color: #ffffff;
    font-weight: 600;
}

/* .rate-protocol removed */

.error {
    color: #ff6b6b;
}

/* Модальное окно - плавные анимации */
.deposit-order-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deposit-order-modal.modal-hidden {
    opacity: 0;
    visibility: hidden;
}

.deposit-order-modal.modal-shown {
    opacity: 1;
    visibility: visible;
}

.deposit-order-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.deposit-order-modal.modal-hidden .modal-backdrop {
    opacity: 0;
}

.deposit-order-modal.modal-shown .modal-backdrop {
    opacity: 1;
}

.deposit-order-modal .modal-content {
    position: relative;
    background: var(--oneinch-bg-secondary, #1a1a1a);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--oneinch-border, #333);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Скрыть скролл-бар для WebKit браузеров (Chrome, Safari) */
.deposit-order-modal .modal-content::-webkit-scrollbar {
    display: none;
}

.deposit-order-modal.modal-shown .modal-content {
    transform: scale(1) translateY(0);
}

.deposit-order-modal.modal-hidden .modal-content {
    transform: scale(0.9) translateY(20px);
}

/* Улучшенные ховеры для кнопок */
.deposit-order-modal .btn-primary,
.deposit-order-modal .btn-secondary {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.deposit-order-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.3);
}

.deposit-order-modal .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(108, 117, 125, 0.3);
    background: var(--oneinch-text-secondary, #6c757d);
}

.deposit-order-modal .modal-close:hover {
    transform: scale(1.1);
    color: #ff4757;
}

/* Кнопки копирования - базовые стили */
.qr-copy-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3rem;
    background: var(--oneinch-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.copy-btn-inline, 
.copy-btn-inline-order, 
.copy-btn-inline-amount {
    position: absolute;
    right: 0.5rem;
    background: var(--oneinch-primary);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.copy-btn-inline-order,
.copy-btn-inline-amount {
    position: relative;
    right: 0;
}

.deposit-order-modal .copy-btn:hover,
.deposit-order-modal .qr-copy-btn:hover,
.deposit-order-modal .copy-btn-inline:hover,
.deposit-order-modal .copy-btn-inline-order:hover,
.deposit-order-modal .copy-btn-inline-amount:hover {
    transform: scale(1.05);
}

.deposit-order-modal .copy-btn:active,
.deposit-order-modal .qr-copy-btn:active,
.deposit-order-modal .copy-btn-inline:active,
.deposit-order-modal .copy-btn-inline-order:active,
.deposit-order-modal .copy-btn-inline-amount:active {
    transform: scale(0.95);
}

/* Анимация для QR секции */
.deposit-order-modal .qr-section {
    animation: fadeInUp 0.4s ease 0.1s both;
}

.deposit-order-modal .order-details {
    animation: fadeInUp 0.4s ease 0.2s both;
}

.deposit-order-modal .instructions-section {
    animation: fadeInUp 0.4s ease 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Блокировка скролла при открытой модалке */
body.modal-open {
    overflow: hidden;
    padding-right: 15px; /* Компенсация скроллбара */
}

/* Дополнительные стили для элементов модального окна */

/* Заголовок модального окна */
.deposit-order-modal .modal-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid var(--oneinch-border, #333);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deposit-order-modal .modal-header h3 {
    margin: 0;
    color: var(--oneinch-text-primary, #ffffff);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deposit-order-modal .modal-close {
    --close-bg: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    --close-border: rgba(255,255,255,0.08);
    --close-color: var(--oneinch-text-secondary, #a1a1aa);
    --close-color-hover: #ffffff;
    background: var(--close-bg);
    position: relative;
    border: 1px solid var(--close-border);
    font-size: 1.25rem;
    color: var(--close-color);
    cursor: pointer;
    padding: 0.65rem;
    line-height: 1;
    border-radius: 14px;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px) saturate(150%);
    -webkit-backdrop-filter: blur(6px) saturate(150%);
    transition: background .25s ease, color .25s ease, transform .18s ease, border-color .25s ease, box-shadow .25s ease;
    box-shadow: 0 4px 12px -2px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
}

.deposit-order-modal .modal-close::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px; /* subtle inner border gradient */
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), rgba(255,255,255,0.05));
    mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
    -webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
    opacity: 0.35;
    transition: opacity .3s ease;
}

.deposit-order-modal .modal-close:hover {
    color: var(--close-color-hover);
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px -4px rgba(0,0,0,0.55), 0 4px 8px -2px rgba(0,0,0,0.45);
}

.deposit-order-modal .modal-close:hover::after { opacity: 0.55; }

.deposit-order-modal .modal-close:active {
    transform: translateY(0) scale(.96);
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    box-shadow: 0 3px 10px -2px rgba(0,0,0,0.5);
    transition: background .15s ease, transform .05s ease;
}

.deposit-order-modal .modal-close:focus-visible {
    outline: 2px solid var(--oneinch-primary, #6366f1);
    outline-offset: 3px;
}

/* Тело модального окна */
.deposit-order-modal .modal-body {
    padding: 2rem;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

/* QR секция */
.deposit-order-modal .qr-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--oneinch-input-bg, #2a2a2a);
    border-radius: 12px;
    border: 1px solid var(--oneinch-border, #333);
}

.deposit-order-modal .qr-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--oneinch-text-primary, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.deposit-order-modal .qr-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.deposit-order-modal .qr-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.deposit-order-modal .qr-overlay img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Детали заказа */
.deposit-order-modal .order-details {
    margin-bottom: 2rem;
}

.deposit-order-modal .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--oneinch-border, #333);
}

.deposit-order-modal .detail-item.column {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.deposit-order-modal .detail-item:last-child {
    border-bottom: none;
}

.deposit-order-modal .detail-item .label {
    font-weight: 600;
    color: var(--oneinch-text-secondary, #aaa);
    font-size: 0.9rem;
}

.deposit-order-modal .detail-item .value {
    color: var(--oneinch-text-primary, #ffffff);
    text-align: right;
    flex: 1;
    margin-left: 1rem;
}

.deposit-order-modal .detail-item.column .value {
    text-align: left;
    margin-left: 0;
}

/* Инструкции */
.deposit-order-modal .instructions-section {
    margin-bottom: 1rem;
}

.deposit-order-modal .instructions-section h4,
.deposit-order-modal .instructions-section h5 {
    color: var(--oneinch-text-primary, #ffffff);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.deposit-order-modal .instruction-steps {
    margin-bottom: 2rem;
}

.deposit-order-modal .step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.deposit-order-modal .step-number {
    width: 2rem;
    height: 2rem;
    background: var(--oneinch-primary, #007bff);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.deposit-order-modal .step-content {
    flex: 1;
}

.deposit-order-modal .step-content strong {
    color: var(--oneinch-text-primary, #ffffff);
    display: block;
    margin-bottom: 0.25rem;
}

.deposit-order-modal .step-content span {
    color: var(--oneinch-text-secondary, #aaa);
    font-size: 0.9rem;
}

.deposit-order-modal .important-notes {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.deposit-order-modal .important-notes ul {
    margin: 0;
    padding-left: 1.5rem;
}

.deposit-order-modal .important-notes li {
    color: var(--oneinch-text-secondary, #aaa);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Подвал модального окна */
.deposit-order-modal .modal-footer {
    padding: 1rem 2rem 2rem;
    border-top: 1px solid var(--oneinch-border, #333);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.deposit-order-modal .btn-primary,
.deposit-order-modal .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
}

.deposit-order-modal .btn-primary {
    background: var(--oneinch-primary, #007bff);
    color: white;
}

.deposit-order-modal .btn-secondary {
    background: var(--oneinch-text-secondary, #6c757d);
    color: white;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {
    .deposit-order-modal .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 0.5rem;
    }

    .deposit-order-modal .modal-header,
    .deposit-order-modal .modal-body,
    .deposit-order-modal .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .deposit-order-modal .modal-header {
        padding-top: 1rem;
        padding-bottom: 0.75rem;
    }

    .deposit-order-modal .modal-header h3 {
        font-size: 1.1rem;
    }

    .deposit-order-modal .modal-body {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .deposit-order-modal .qr-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .deposit-order-modal .detail-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }

    .deposit-order-modal .detail-item .value {
        text-align: left;
        margin-left: 0;
    }

    .deposit-order-modal .step {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .deposit-order-modal .step-number {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8rem;
    }

    .deposit-order-modal .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .deposit-order-modal .btn-primary,
    .deposit-order-modal .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }

    /* QR код на мобильных */
    .deposit-order-modal .qr-code {
        max-width: 150px;
        max-height: 150px;
    }

    /* Кнопки копирования на мобильных */
    .qr-copy-btn {
        width: 2.5rem;
    }

    .copy-btn-inline {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
        right: 0.25rem;
    }
}

/* Стили для очень маленьких экранов */
@media (max-width: 480px) {
    .deposit-order-modal .modal-content {
        width: 98%;
        margin: 0.25rem;
    }

    .deposit-order-modal .qr-section {
        padding: 0.75rem;
    }

    .deposit-order-modal .qr-title {
        font-size: 1rem;
    }

    .deposit-order-modal .qr-code {
        max-width: 120px;
        max-height: 120px;
    }

    .deposit-order-modal .important-notes {
        padding: 0.75rem;
    }

    .deposit-order-modal .important-notes li {
        font-size: 0.85rem;
    }
}