/**
 * ============================================
 * Airtime Topup Styles - Clean Version
 * تصميم صفحة تعبئة الرصيد - نسخة نظيفة
 * ============================================
 * 
 * جميع الكلاسات تبدأ بـ airtime- لتجنب التضارب مع الهيدر
 * ============================================
 */

/* ============================================
   Hero Section
   ============================================ */
.airtime-hero-section {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-top: 0;
}

.airtime-hero-content h1 {
    font-size: 42px;
    margin-bottom: 16px;
    font-weight: 700;
}

.airtime-hero-content p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 40px;
}

.airtime-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.airtime-stat-item {
    text-align: center;
    padding: 20px;
}

.airtime-stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.airtime-stat-number {
    font-size: 32px;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.airtime-stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ============================================
   Container & Layout
   ============================================ */
.airtime-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5px;
}

.airtime-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 24px;
    margin-top: 20px;
}

.airtime-checkout-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 5px;
}

/* ============================================
   Section Header
   ============================================ */
.airtime-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e5e5;
}

.airtime-section-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.airtime-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #0066cc;
}

/* ============================================
   Search Box
   ============================================ */
.airtime-search-box {
    margin-bottom: 20px;
    position: relative;
}

.airtime-search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

[dir="ltr"] .airtime-search-box i {
    right: auto;
    left: 16px;
}

.airtime-form-control {
    width: 100%;
    padding: 14px 50px 14px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
}

[dir="ltr"] .airtime-form-control {
    padding: 14px 16px 14px 50px;
}

.airtime-form-control:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* ============================================
   Countries Grid
   ============================================ */
.airtime-countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding: 5px;
}

.airtime-country-card {
    padding: 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.airtime-country-card:hover {
    border-color: #0066cc;
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,102,204,0.15);
}

.airtime-country-flag {
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.airtime-country-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.airtime-country-code {
    font-size: 12px;
    color: #666;
}

/* ============================================
   Info Box
   ============================================ */
.airtime-info-box {
    background: #e8f4ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.airtime-info-box i {
    font-size: 24px;
    color: #0066cc;
}

/* ============================================
   Form Group
   ============================================ */
.airtime-form-group {
    margin-bottom: 20px;
}

.airtime-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* ============================================
   Phone Input
   ============================================ */
.airtime-phone-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.airtime-phone-prefix {
    padding: 14px 20px;
    background: #f8f9fa;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-weight: 600;
    color: #0066cc;
    white-space: nowrap;
}

/* ============================================
   Operators Grid
   ============================================ */
.airtime-operators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.airtime-operator-card {
    padding: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
}

.airtime-operator-card:hover,
.airtime-operator-card.selected {
    border-color: #0066cc;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.airtime-operator-card.selected {
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.airtime-operator-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 12px;
}

.airtime-operator-icon {
    font-size: 48px;
    margin-bottom: 12px;
    color: #0066cc;
}

.airtime-operator-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.airtime-operator-discount {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
    margin-top: 8px;
}

/* ============================================
   Amounts Grid
   ============================================ */
.airtime-amounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.airtime-amount-card {
    padding: 20px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.airtime-amount-card:hover,
.airtime-amount-card.selected {
    border-color: #0066cc;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.airtime-amount-card.selected {
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.airtime-amount-value {
    font-size: 24px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 4px;
}

.airtime-amount-currency {
    font-size: 13px;
    color: #666;
}

/* ============================================
   Buttons
   ============================================ */
.airtime-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.airtime-btn-primary {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.airtime-btn-primary:hover {
    background: linear-gradient(135deg, #0052a3, #003d7a);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,102,204,0.3);
}

.airtime-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.airtime-btn-secondary {
    background: #6c757d;
    color: white;
}

.airtime-btn-secondary:hover {
    background: #5a6268;
}

/* ============================================
   Summary Card
   ============================================ */
.airtime-summary-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
}

.airtime-summary-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.airtime-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.airtime-summary-row.airtime-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e5e5e5;
    font-size: 22px;
    font-weight: 700;
    color: #0066cc;
}

/* ============================================
   User Type Cards
   ============================================ */
.airtime-user-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.airtime-user-type-card {
    padding: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.airtime-user-type-card:hover {
    border-color: #0066cc;
    background: #f0f7ff;
}

.airtime-user-type-card.selected {
    border-color: #0066cc;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.airtime-user-type-card input[type="radio"] {
    display: none;
}

.airtime-user-type-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.airtime-user-type-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
    color: #333;
}

.airtime-user-type-description {
    font-size: 13px;
    color: #666;
}

/* ============================================
   Payment Methods
   ============================================ */
.airtime-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.airtime-payment-method-card {
    padding: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.airtime-payment-method-card:hover {
    border-color: #0066cc;
    background: #f0f7ff;
}

.airtime-payment-method-card.selected {
    border-color: #0066cc;
    background: #f0f7ff;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.airtime-payment-method-card input[type="radio"] {
    display: none;
}

.airtime-payment-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.airtime-payment-name {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

.airtime-payment-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

[dir="rtl"] .airtime-payment-badge {
    right: auto;
    left: -10px;
}

/* ============================================
   Terms Checkbox
   ============================================ */
.airtime-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.airtime-terms-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

.airtime-terms-checkbox label {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.airtime-terms-checkbox a {
    color: #0066cc;
    text-decoration: none;
}

.airtime-terms-checkbox a:hover {
    text-decoration: underline;
}

/* ============================================
   Loading Overlay
   ============================================ */
.airtime-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.airtime-loading-overlay.active {
    display: flex;
}

.airtime-loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.airtime-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: airtime-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes airtime-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Hidden Class
   ============================================ */
.hidden {
    display: none !important;
}

/* ============================================
   Form Row
   ============================================ */
.airtime-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .airtime-checkout-layout {
        grid-template-columns: 1fr;
    }

    .airtime-hero-content h1 {
        font-size: 32px;
    }

    .airtime-hero-stats {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .airtime-countries-grid,
    .airtime-operators-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .airtime-amounts-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .airtime-user-type-selector,
    .airtime-payment-methods {
        grid-template-columns: 1fr;
    }

    .airtime-form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RTL Support
   ============================================ */
[dir="rtl"] .airtime-search-box i {
    right: 16px;
    left: auto;
}

[dir="rtl"] .airtime-form-control {
    padding: 14px 50px 14px 16px;
}
/* ✅ تنسيق بطاقات المبالغ */
.airtime-amounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.airtime-amount-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.airtime-amount-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.airtime-amount-card.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.airtime-amount-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.airtime-amount-card.selected .airtime-amount-value {
    color: white;
}

.airtime-amount-currency {
    font-size: 13px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.airtime-amount-card.selected .airtime-amount-currency {
    color: rgba(255, 255, 255, 0.9);
}

/* ✅ تنسيق وصف المبلغ - هذا المهم! */
.airtime-amount-description {
    font-size: 11px;
    line-height: 1.4;
    color: #666;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    font-weight: 500;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.airtime-amount-card.selected .airtime-amount-description {
    color: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* ✅ Responsive */
@media (max-width: 768px) {
    .airtime-amounts-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .airtime-amount-card {
        padding: 12px;
    }
    
    .airtime-amount-value {
        font-size: 20px;
    }
    
    .airtime-amount-description {
        font-size: 10px;
        min-height: 25px;
    }
}
