/* css/topup.css - Vexoria Premium Store & Wallet v5.0 (Consolidated) */

/* =========================================
   1. MODAL BASE & ANIMATIONS
   ========================================= */
.modal-overlay,
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
    /* CRITICAL FIX: Enables clicking */
}

.modal.active {
    display: flex;
}

.topup-modal-content,
.subscription-modal-content {
    background: #111116;
    width: 95%;
    max-width: 450px;
    /* Mobile First */
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    padding: 20px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Close Button */
.close-topup-modal,
.close-subs-modal,
.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
}

.close-topup-modal:hover,
.close-subs-modal:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

/* =========================================
   2. HEADER ICONS (LAYOUT FIXED)
   ========================================= */
.header-actions-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    flex-wrap: nowrap;
    /* Prevent Wrapping */
    white-space: nowrap;
}

.header-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
    /* Dark Transparent */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.header-icon-btn span {
    pointer-events: none;
    /* Let clicks pass */
}

/* =========================================
   3. WALLET / TOP-UP MENU STYLES
   ========================================= */
.wallet-header {
    margin-bottom: 20px;
    margin-top: 10px;
}

.current-balance-card {
    background: linear-gradient(135deg, #1a1a24, #15151e);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 15px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.current-balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(189, 0, 255, 0.1), transparent 70%);
    pointer-events: none;
}

.balance-item {
    text-align: center;
    z-index: 2;
}

.balance-item .label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 3px;
}

.balance-item .value {
    display: block;
    font-size: 1.4rem;
    color: white;
    font-weight: 800;
    line-height: 1.2;
}

.balance-item .unit {
    font-size: 0.65rem;
    color: #bd00ff;
    text-transform: uppercase;
    font-weight: bold;
}

.divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

/* Tabs */
.modern-tabs-container {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 15px;
}

.modern-tab {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    color: #666;
    font-weight: bold;
    font-size: 0.85rem;
}

.modern-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* List Items */
.packages-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    max-height: 50vh;
}

.packages-list::-webkit-scrollbar {
    width: 3px;
}

.packages-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.store-item-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.item-icon-box {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-icon-box img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.item-details {
    flex: 1;
    text-align: right;
}

.item-amount-large {
    font-size: 1rem;
    font-weight: 800;
    color: white;
}

.item-desc {
    font-size: 0.65rem;
    color: #555;
}

.btn-buy-simple {
    padding: 6px 14px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 80px;
    background: #333;
    color: white;
}

.btn-gold {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: black;
}

.btn-cyan {
    background: linear-gradient(135deg, #00f3ff, #0099ff);
    color: black;
}

/* Banner & Text Header */
.store-banner-text {
    text-align: center;
    padding: 15px 0;
    color: #eee;
}

.store-banner-text h3 {
    margin: 0 0 5px 0;
    background: linear-gradient(45deg, #bd00ff, #00f3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.4rem;
}

.store-banner-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
}

/* New Yellow Buy Button (Professional) */
.btn-buy-yellow {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    color: #ffd700;
    /* Gold */
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-buy-yellow:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.btn-buy-yellow span {
    font-family: 'Cairo', sans-serif;
}

/* =========================================
   5. CHECKOUT MODAL STYLES (PREMIUM REDESIGN)
   ========================================= */
#checkout-modal-premium {
    z-index: 20000 !important;
    backdrop-filter: blur(5px);
}

.checkout-modal-modern {
    background: linear-gradient(145deg, #1a1a20 0%, #0d0d10 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: 'Cairo', sans-serif;
}

.checkout-modern-header {
    text-align: center;
    margin-bottom: 25px;
}

.checkout-modern-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #ffd700;
}

.checkout-modern-header p {
    margin: 5px 0 0;
    color: #888;
    font-size: 0.9rem;
}

/* Item Card */
.checkout-item-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-icon-circle {
    width: 45px;
    height: 45px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.item-icon-circle img {
    width: 28px;
    height: 28px;
}

.item-info {
    flex: 1;
}

.item-info .label {
    display: block;
    font-size: 0.75rem;
    color: #aaa;
}

.item-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #eee;
}

.item-price-tag {
    background: #ffd700;
    color: #000;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Transfer Box */
.transfer-instruction-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    margin-bottom: 25px;
}

.instruction-header {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.wallet-number-display {
    background: #2a2a30;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.wallet-number-display:hover {
    border-color: #ffd700;
    background: #333;
}

.wallet-number-display .number {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: #fff;
    font-weight: bold;
    direction: ltr;
    /* Force number LTR */
}

.wallet-number-display .copy-hint {
    font-size: 0.8rem;
    color: #ffd700;
}

.transfer-instruction-box .note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 10px;
    margin-bottom: 0;
}

/* Form */
.checkout-form-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.input-group-modern label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #ccc;
}

.input-group-modern select,
.input-group-modern input {
    width: 100%;
    padding: 12px 15px;
    background: #15151a;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    outline: none;
    transition: border 0.3s;
}

.input-group-modern select:focus,
.input-group-modern input:focus {
    border-color: #ffd700;
}

/* Confirm Button */
.btn-checkout-confirm {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #ffd700, #ffb700);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #000;
    /* Dark text on gold */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-checkout-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
}

.btn-checkout-confirm i {
    font-size: 0.9rem;
}

.subscription-plans-container.modern-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 10px 0;
    overflow-y: auto;
}

.sub-plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    width: 100%;
    text-align: center;
    position: relative;
    transition: 0.3s;
    margin-bottom: 8px;
}

.sub-plan-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.06);
}

/* Tiers */
.bronze-tier {
    border-top: 3px solid #cd7f32;
}

.silver-tier {
    border-top: 3px solid #c0c0c0;
}

.gold-tier {
    border-top: 3px solid #ffd700;
}

.plan-header {
    margin-bottom: 10px;
}

.plan-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 5px;
}

.plan-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    margin: 0;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.plan-price .currency {
    font-size: 0.7rem;
    color: #888;
    font-weight: normal;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    text-align: right;
}

.plan-features li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ccc;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.plan-features li:last-child {
    border-bottom: none;
}

.glass-btn {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(90deg, #bd00ff, #7b2cbf);
    color: white;
}