/**
 * Currency Purchase Modal Styles
 * 
 * Modern, responsive modal for currency/gold purchases
 * Supports both dark and light themes
 * 
 * Used in: Service Type 7 (Currency Marketplace)
 */

/* Modal Dialog - Override Bootstrap with high specificity */
.modal.fade #currencyPurchaseModal .modal-dialog.modal-dialog-centered.currency-modal-dialog,
.modal .modal-dialog.modal-dialog-centered.currency-modal-dialog,
.modal-dialog.currency-modal-dialog {
    max-width: 550px !important;
    margin: 1.75rem auto !important;
}

@media (min-width: 768px) {
    .modal.fade #currencyPurchaseModal .modal-dialog.modal-dialog-centered.currency-modal-dialog,
    .modal .modal-dialog.modal-dialog-centered.currency-modal-dialog,
    .modal-dialog.currency-modal-dialog {
        max-width: 600px !important;
    }
}

@media (min-width: 992px) {
    .modal.fade #currencyPurchaseModal .modal-dialog.modal-dialog-centered.currency-modal-dialog,
    .modal .modal-dialog.modal-dialog-centered.currency-modal-dialog,
    .modal-dialog.currency-modal-dialog {
        max-width: 650px !important;
    }
}

/* Modal Container */
.currency-modal {
    background: linear-gradient(135deg, #1a1d29 0%, #232838 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    color: #e8eaed;
}

/* ========================================
   LIGHT THEME SUPPORT
   ======================================== */

html[data-theme="light"] #currencyPurchaseModal .currency-modal,
html[data-theme="light"] .currency-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    color: #202124 !important;
}

html[data-theme="light"] #currencyPurchaseModal .currency-modal-header,
html[data-theme="light"] .currency-modal-header {
    background: rgba(0, 0, 0, 0.02) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] #currencyPurchaseModal .modal-title-text,
html[data-theme="light"] .modal-title-text {
    color: #202124 !important;
}

html[data-theme="light"] #currencyPurchaseModal .currency-modal-close,
html[data-theme="light"] .currency-modal-close {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #5f6368 !important;
}

html[data-theme="light"] #currencyPurchaseModal .currency-modal-close:hover,
html[data-theme="light"] .currency-modal-close:hover {
    background: rgba(255, 59, 48, 0.1) !important;
    border-color: rgba(255, 59, 48, 0.3) !important;
    color: #d93025 !important;
}

html[data-theme="light"] #currencyPurchaseModal .currency-input,
html[data-theme="light"] .currency-input {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #202124 !important;
}

html[data-theme="light"] #currencyPurchaseModal .quantity-btn,
html[data-theme="light"] .quantity-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #202124 !important;
}

html[data-theme="light"] #currencyPurchaseModal .account-option-input,
html[data-theme="light"] #currencyPurchaseModal .account-option-select,
html[data-theme="light"] .account-option-input,
html[data-theme="light"] .account-option-select {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #202124 !important;
}

html[data-theme="light"] #currencyPurchaseModal .account-option-select,
html[data-theme="light"] .account-option-select {
    background-color: rgba(0, 0, 0, 0.03) !important;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="rgba(0,0,0,0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e') !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 1.2em !important;
}

html[data-theme="light"] #currencyPurchaseModal .account-option-select option,
html[data-theme="light"] .account-option-select option {
    background: #ffffff !important;
    color: #202124 !important;
}

html[data-theme="light"] #currencyPurchaseModal .currency-modal-footer,
html[data-theme="light"] .currency-modal-footer {
    background: rgba(0, 0, 0, 0.02) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] #currencyPurchaseModal .modal-btn-cancel,
html[data-theme="light"] .modal-btn-cancel {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #5f6368 !important;
}

html[data-theme="light"] #currencyPurchaseModal .modal-btn-cancel:hover,
html[data-theme="light"] .modal-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    color: #202124 !important;
}

html[data-theme="light"] #currencyPurchaseModal .account-details-header,
html[data-theme="light"] #currencyPurchaseModal .currency-label,
html[data-theme="light"] #currencyPurchaseModal .price-label,
html[data-theme="light"] .account-details-header,
html[data-theme="light"] .currency-label,
html[data-theme="light"] .price-label {
    color: #202124 !important;
}

html[data-theme="light"] #currencyPurchaseModal .account-option-label,
html[data-theme="light"] #currencyPurchaseModal .input-icon,
html[data-theme="light"] #currencyPurchaseModal .offer-detail-icon,
html[data-theme="light"] #currencyPurchaseModal .offer-detail-label,
html[data-theme="light"] .account-option-label,
html[data-theme="light"] .input-icon,
html[data-theme="light"] .offer-detail-icon,
html[data-theme="light"] .offer-detail-label {
    color: #5f6368 !important;
}

html[data-theme="light"] #currencyPurchaseModal .offer-detail-value,
html[data-theme="light"] .offer-detail-value {
    color: #202124 !important;
}

html[data-theme="light"] #currencyPurchaseModal .offer-details-card-compact,
html[data-theme="light"] .offer-details-card-compact {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] #currencyPurchaseModal .quantity-hint,
html[data-theme="light"] .quantity-hint {
    background: rgba(52, 120, 246, 0.08) !important;
    border-color: rgba(52, 120, 246, 0.25) !important;
    color: #1a73e8 !important;
}

html[data-theme="light"] #currencyPurchaseModal .quantity-error,
html[data-theme="light"] .quantity-error {
    background: rgba(217, 48, 37, 0.08) !important;
    border-color: rgba(217, 48, 37, 0.25) !important;
    color: #d93025 !important;
}

html[data-theme="light"] #currencyPurchaseModal .price-summary-card,
html[data-theme="light"] .price-summary-card {
    border-top-color: rgba(0, 0, 0, 0.1) !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] #currencyPurchaseModal .modal-error-message,
html[data-theme="light"] .modal-error-message {
    background: rgba(217, 48, 37, 0.08) !important;
    border-color: rgba(217, 48, 37, 0.25) !important;
    color: #d93025 !important;
}

@media (prefers-color-scheme: light) {
    #currencyPurchaseModal .currency-modal,
    body:not(.dark-theme) .currency-modal,
    body.light-theme .currency-modal {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
        border: 1px solid rgba(0, 0, 0, 0.15) !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
        color: #202124 !important;
    }
    
    #currencyPurchaseModal .currency-modal-header,
    body:not(.dark-theme) .currency-modal-header,
    body.light-theme .currency-modal-header {
        background: rgba(0, 0, 0, 0.02) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    }
    
    #currencyPurchaseModal .modal-title-text,
    body:not(.dark-theme) .modal-title-text,
    body.light-theme .modal-title-text {
        color: #202124 !important;
    }
    
    #currencyPurchaseModal .currency-modal-close,
    body:not(.dark-theme) .currency-modal-close,
    body.light-theme .currency-modal-close {
        background: rgba(0, 0, 0, 0.05) !important;
        border-color: rgba(0, 0, 0, 0.1) !important;
        color: #5f6368 !important;
    }
    
    #currencyPurchaseModal .currency-modal-close:hover,
    body:not(.dark-theme) .currency-modal-close:hover,
    body.light-theme .currency-modal-close:hover {
        background: rgba(255, 59, 48, 0.1) !important;
        border-color: rgba(255, 59, 48, 0.3) !important;
        color: #d93025 !important;
    }
    
    body:not(.dark-theme) .offer-details-card,
    body.light-theme .offer-details-card {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    body:not(.dark-theme) .offer-details-card > div > div,
    body.light-theme .offer-details-card > div > div {
        background: rgba(0, 0, 0, 0.04) !important;
        border-color: rgba(0, 0, 0, 0.08) !important;
    }
    
    body:not(.dark-theme) .offer-details-card h6,
    body:not(.dark-theme) .offer-details-card [style*="color: var(--color-text-1)"],
    body.light-theme .offer-details-card h6,
    body.light-theme .offer-details-card [style*="color: var(--color-text-1)"] {
        color: #202124 !important;
    }
    
    body:not(.dark-theme) .offer-details-card [style*="color: var(--color-text-3)"],
    body.light-theme .offer-details-card [style*="color: var(--color-text-3)"] {
        color: #5f6368 !important;
    }
    
    body:not(.dark-theme) .currency-label,
    body.light-theme .currency-label {
        color: #202124;
    }
    
    body:not(.dark-theme) .quantity-btn,
    body.light-theme .quantity-btn {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.15);
        color: #202124;
    }
    
    #currencyPurchaseModal .currency-input,
    body:not(.dark-theme) .currency-input,
    body.light-theme .currency-input {
        background: rgba(0, 0, 0, 0.03) !important;
        border-color: rgba(0, 0, 0, 0.15) !important;
        color: #202124 !important;
    }
    
    #currencyPurchaseModal .quantity-btn,
    body:not(.dark-theme) .quantity-btn,
    body.light-theme .quantity-btn {
        background: rgba(0, 0, 0, 0.05) !important;
        border-color: rgba(0, 0, 0, 0.15) !important;
        color: #202124 !important;
    }
    
    #currencyPurchaseModal .account-option-input,
    #currencyPurchaseModal .account-option-select,
    body:not(.dark-theme) .account-option-input,
    body:not(.dark-theme) .account-option-select,
    body.light-theme .account-option-input,
    body.light-theme .account-option-select {
        background: rgba(0, 0, 0, 0.03) !important;
        border-color: rgba(0, 0, 0, 0.15) !important;
        color: #202124 !important;
    }
    
    #currencyPurchaseModal .account-option-select,
    body:not(.dark-theme) .account-option-select,
    body.light-theme .account-option-select {
        background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="rgba(0,0,0,0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e') !important;
    }
    
    #currencyPurchaseModal .currency-modal-body,
    body:not(.dark-theme) .currency-modal-body,
    body.light-theme .currency-modal-body {
        background: transparent;
    }
    
    #currencyPurchaseModal .currency-modal-footer,
    body:not(.dark-theme) .currency-modal-footer,
    body.light-theme .currency-modal-footer {
        background: rgba(0, 0, 0, 0.02) !important;
        border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    }
    
    #currencyPurchaseModal .modal-btn-cancel,
    body:not(.dark-theme) .modal-btn-cancel,
    body.light-theme .modal-btn-cancel {
        background: rgba(0, 0, 0, 0.05) !important;
        border-color: rgba(0, 0, 0, 0.15) !important;
        color: #5f6368 !important;
    }
    
    #currencyPurchaseModal .account-details-header,
    #currencyPurchaseModal .currency-label,
    #currencyPurchaseModal .price-label,
    body:not(.dark-theme) .account-details-header,
    body:not(.dark-theme) .currency-label,
    body:not(.dark-theme) .price-label,
    body.light-theme .account-details-header,
    body.light-theme .currency-label,
    body.light-theme .price-label {
        color: #202124 !important;
    }
    
    #currencyPurchaseModal .account-option-label,
    #currencyPurchaseModal .input-icon,
    body:not(.dark-theme) .account-option-label,
    body:not(.dark-theme) .input-icon,
    body.light-theme .account-option-label,
    body.light-theme .input-icon {
        color: #5f6368 !important;
    }
    
    body:not(.dark-theme) .currency-input,
    body.light-theme .currency-input {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.15);
        color: #202124;
    }
    
    body:not(.dark-theme) .currency-input:focus,
    body.light-theme .currency-input:focus {
        background: rgba(0, 0, 0, 0.05);
        border-color: var(--highlight-green);
    }
    
    body:not(.dark-theme) .currency-input.valid,
    body.light-theme .currency-input.valid {
        border-color: rgba(39, 181, 120, 0.6);
        background: rgba(39, 181, 120, 0.08);
    }
    
    body:not(.dark-theme) .currency-input.invalid,
    body.light-theme .currency-input.invalid {
        border-color: rgba(217, 48, 37, 0.6);
        background: rgba(217, 48, 37, 0.08);
    }
    
    body:not(.dark-theme) .input-icon,
    body.light-theme .input-icon {
        color: #5f6368;
    }
    
    body:not(.dark-theme) .quick-amount-btn,
    body.light-theme .quick-amount-btn {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
        color: #5f6368;
    }
    
    body:not(.dark-theme) .quick-amount-btn:hover,
    body.light-theme .quick-amount-btn:hover {
        background: rgba(39, 181, 120, 0.1);
        color: #1e7e34;
    }
    
    body:not(.dark-theme) .quantity-hint,
    body.light-theme .quantity-hint {
        background: rgba(52, 120, 246, 0.08);
        border-color: rgba(52, 120, 246, 0.25);
        color: #1a73e8;
    }
    
    body:not(.dark-theme) .quantity-hint i,
    body.light-theme .quantity-hint i {
        color: #1a73e8;
    }
    
    body:not(.dark-theme) .quantity-hint strong,
    body.light-theme .quantity-hint strong {
        color: #174ea6;
    }
    
    body:not(.dark-theme) .quantity-error,
    body.light-theme .quantity-error {
        background: rgba(217, 48, 37, 0.08);
        border-color: rgba(217, 48, 37, 0.25);
        color: #d93025;
    }
    
    body:not(.dark-theme) .price-summary-card,
    body.light-theme .price-summary-card {
        background: transparent;
        border-top-color: rgba(0, 0, 0, 0.1);
        border-bottom-color: rgba(0, 0, 0, 0.1);
    }
    
    body:not(.dark-theme) .price-label,
    body.light-theme .price-label {
        color: #202124;
    }
    
    body:not(.dark-theme) .modal-error-message,
    body.light-theme .modal-error-message {
        background: rgba(217, 48, 37, 0.08);
        border-color: rgba(217, 48, 37, 0.25);
        color: #d93025;
    }
    
    body:not(.dark-theme) .currency-modal-footer,
    body.light-theme .currency-modal-footer {
        background: rgba(0, 0, 0, 0.02);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    body:not(.dark-theme) .modal-btn-cancel,
    body.light-theme .modal-btn-cancel {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.15);
        color: #5f6368;
    }
    
    body:not(.dark-theme) .modal-btn-cancel:hover,
    body.light-theme .modal-btn-cancel:hover {
        background: rgba(0, 0, 0, 0.08);
        border-color: rgba(0, 0, 0, 0.2);
        color: #202124;
    }
    
    body:not(.dark-theme) .account-details-header,
    body.light-theme .account-details-header {
        color: #202124;
        border-bottom-color: rgba(0, 0, 0, 0.1);
    }
    
    body:not(.dark-theme) .account-option-label,
    body.light-theme .account-option-label {
        color: #5f6368;
    }
    
    body:not(.dark-theme) .account-option-input,
    body:not(.dark-theme) .account-option-select,
    body.light-theme .account-option-input,
    body.light-theme .account-option-select {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.15);
        color: #202124;
    }
    
    body:not(.dark-theme) .account-option-select,
    body.light-theme .account-option-select {
        background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="rgba(0,0,0,0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
    }
    
    body:not(.dark-theme) .account-option-select option,
    body.light-theme .account-option-select option {
        background: #ffffff;
        color: #202124;
    }
    
    body:not(.dark-theme) .account-option-input:focus,
    body:not(.dark-theme) .account-option-select:focus,
    body.light-theme .account-option-input:focus,
    body.light-theme .account-option-select:focus {
        background: rgba(0, 0, 0, 0.05);
        border-color: var(--highlight-green);
    }
    
    body:not(.dark-theme) .account-option-checkbox-wrapper,
    body.light-theme .account-option-checkbox-wrapper {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    body:not(.dark-theme) .account-option-checkbox-wrapper:hover,
    body.light-theme .account-option-checkbox-wrapper:hover {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.15);
    }
    
    body:not(.dark-theme) .account-option-checkbox-label,
    body.light-theme .account-option-checkbox-label {
        color: #202124;
    }
    
    body:not(.dark-theme) .offer-details-card-compact,
    body.light-theme .offer-details-card-compact {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    body:not(.dark-theme) .offer-detail-icon,
    body:not(.dark-theme) .offer-detail-label,
    body.light-theme .offer-detail-icon,
    body.light-theme .offer-detail-label {
        color: #5f6368;
    }
    
    body:not(.dark-theme) .offer-detail-value,
    body.light-theme .offer-detail-value {
        color: #202124;
    }
}

/* ========================================
   MODAL HEADER
   ======================================== */

.currency-modal-header {
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--highlight-green) 0%, #1ea56a 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(39, 181, 120, 0.3);
    flex-shrink: 0;
}

.modal-title-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-1);
    margin: 0;
    line-height: 1.2;
}

.currency-modal-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-2);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.currency-modal-close:hover {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: #ff3b30;
}

/* ========================================
   MODAL BODY
   ======================================== */

.currency-modal-body {
    padding: 1rem 1.25rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Offer Details Card */
.offer-details-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.offer-details-card-compact {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.offer-detail-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.offer-detail-icon {
    color: var(--color-text-3);
    font-size: 0.9rem;
    min-width: 18px;
    text-align: center;
}

.offer-detail-label {
    color: var(--color-text-3);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 0.2rem;
}

.offer-detail-value {
    color: var(--color-text-1);
    font-weight: 600;
    font-size: 0.85rem;
}

.offer-detail-value.highlight {
    color: var(--highlight-green);
    font-weight: 700;
}

.offer-detail-value.rating {
    color: var(--highlight-yellow);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Quantity Section */
.quantity-section {
    margin-bottom: 0.85rem;
}

.quantity-hint {
    margin-top: 0.5rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.currency-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-1);
    margin-bottom: 0.65rem;
    text-transform: none;
    letter-spacing: 0.3px;
}

.currency-label i {
    color: var(--highlight-green);
}

.quantity-controls {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.quantity-btn {
    width: 44px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--color-text-1);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quantity-btn:hover:not(:disabled) {
    background: rgba(39, 181, 120, 0.1);
    border-color: var(--highlight-green);
    color: var(--highlight-green);
    transform: scale(1.05);
}

.quantity-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-input-wrapper {
    position: relative;
    flex: 1;
}

.currency-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.85rem 2.5rem 0.85rem 0.85rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-1);
    transition: all 0.2s;
    text-align: center;
}

.currency-input:focus {
    outline: none;
    border-color: var(--highlight-green);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(39, 181, 120, 0.1);
}

.currency-input.valid {
    border-color: rgba(39, 181, 120, 0.5);
    background: rgba(39, 181, 120, 0.05);
}

.currency-input.invalid {
    border-color: rgba(255, 59, 48, 0.5);
    background: rgba(255, 59, 48, 0.05);
}

.quick-amounts {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.quick-amount-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text-2);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-amount-btn:hover {
    background: rgba(39, 181, 120, 0.15);
    border-color: var(--highlight-green);
    color: var(--highlight-green);
    transform: translateY(-2px);
}

.quick-amount-btn i {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-3);
    font-size: 1.1rem;
}

.quantity-hint {
    display: block;
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(52, 120, 246, 0.1);
    border: 1px solid rgba(52, 120, 246, 0.2);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--color-text-2);
    line-height: 1.6;
}

.quantity-hint i {
    color: #3478f6;
    margin-right: 0.5rem;
}

.quantity-error {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 8px;
    color: #ff3b30;
    font-size: 0.875rem;
    font-weight: 500;
}

.quantity-error:not(:empty) {
    display: block;
}

/* Price Summary */
.price-summary-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.65rem 0;
    margin-bottom: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.price-summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-1);
}

.price-label i {
    font-size: 1.15rem;
    color: var(--highlight-green);
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--highlight-green);
}

/* Account Details Section */
.account-details-section {
    margin-bottom: 0.85rem;
}

/* Contact Email Section - same styling as account details */
.contact-email-section {
    margin-bottom: 0.85rem;
}

.email-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-3);
    margin-top: 0.3rem;
    line-height: 1.3;
    opacity: 0.8;
}

.account-details-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-1);
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-details-header i {
    color: var(--highlight-green);
    font-size: 0.95rem;
}

.account-options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem 1rem;
}

/* 2-column layout on tablets and larger screens */
@media (min-width: 768px) {
    .account-options-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.account-option-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.account-option-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-2);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.account-option-label .required-star {
    color: #ff3b30;
    font-weight: 700;
}

.account-option-input,
.account-option-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: var(--color-text-1);
    transition: all 0.2s;
}

.account-option-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
    cursor: pointer;
}

.account-option-select option {
    background: #1a1d29;
    color: #e8eaed;
    padding: 0.5rem;
}

.account-option-input:focus,
.account-option-select:focus {
    outline: none;
    border-color: var(--highlight-green);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(39, 181, 120, 0.1);
}

.account-option-input::placeholder {
    color: var(--color-text-3);
    opacity: 0.6;
}

.account-option-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.account-option-checkbox-wrapper:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.account-option-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.account-option-checkbox-label {
    font-size: 0.9rem;
    color: var(--color-text-1);
    cursor: pointer;
    margin: 0;
}

/* Error Message */
.modal-error-message {
    display: none;
    padding: 1rem 1.25rem;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 10px;
    color: #ff3b30;
    font-size: 0.95rem;
    font-weight: 500;
}

.modal-error-message:not(:empty) {
    display: block;
}

/* ========================================
   MODAL FOOTER
   ======================================== */

.currency-modal-footer {
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-2);
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-text-1);
}

.modal-btn-confirm {
    background: linear-gradient(135deg, var(--highlight-green) 0%, #1ea56a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 181, 120, 0.3);
}

.modal-btn-confirm:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 181, 120, 0.4);
}

.modal-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 575.98px) {
    .currency-modal-dialog {
        max-width: calc(100vw - 1.5rem);
        margin: 0.75rem;
        max-height: calc(100vh - 1.5rem); /* Ensure modal fits within viewport */
        display: flex;
        flex-direction: column;
    }
    
    .currency-modal {
        border-radius: 10px;
        max-height: calc(100vh - 1.5rem); /* Match parent height */
        display: flex;
        flex-direction: column;
    }
    
    .currency-modal-header,
    .currency-modal-body,
    .currency-modal-footer {
        padding: 0.85rem 1rem;
    }
    
    .modal-title-text {
        font-size: 1.1rem;
    }
    
    .modal-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .currency-modal-close {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .quantity-btn {
        width: 40px;
        height: 44px;
        font-size: 1rem;
    }
    
    .currency-input {
        font-size: 1rem;
        padding: 0.75rem 2.25rem 0.75rem 0.75rem;
    }
    
    .quick-amount-btn {
        font-size: 0.75rem;
        padding: 0.45rem 0.65rem;
    }
    
    .price-value {
        font-size: 1.35rem;
    }
    
    .price-label {
        font-size: 0.9rem;
    }
    
    .currency-modal-footer {
        flex-direction: column;
        gap: 0.6rem;
        flex-shrink: 0; /* Prevent footer from shrinking */
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .currency-modal-body {
        max-height: none; /* Remove fixed max-height */
        flex: 1; /* Allow body to grow */
        overflow-y: auto; /* Enable scroll */
        min-height: 0; /* Important for flex scrolling */
    }
    
    .currency-modal-header {
        flex-shrink: 0; /* Prevent header from shrinking */
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .currency-modal-dialog {
        max-width: calc(100vw - 3rem);
        margin: 1.5rem;
    }
    
    .modal-btn {
        padding: 0.7rem 1.35rem;
    }
}

