/* ==========================================
   1. تنظيف الحاويات الأساسية
   ========================================== */

.inner-page-content-premium {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
}

#services,
.bg-white {
    background-color: transparent !important;
}

.payout-section {
    padding: 40px 15px;
    position: relative;
    z-index: 10;
}

.payout-card {
    background: var(--site-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--shadow-color, rgba(15, 23, 42, 0.05));
    padding: 30px 20px;
    transition: 0.3s ease;
}

html[data-theme="dark"] body .payout-card {
    background: #111827 !important;
    border-color: #334155 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.payout-header {
    text-align: center;
    margin-bottom: 30px;
}

.payout-header h2 {
    font-weight: 800;
    color: var(--site-title, #0f172a);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.payout-header p {
    color: var(--site-text, #475569);
    font-size: 1rem;
}

html[data-theme="dark"] body .payout-header h2 {
    color: #ffffff !important;
}

html[data-theme="dark"] body .payout-header p {
    color: #94a3b8 !important;
}


/* ==========================================
   2. الزراير (التابات)
   ========================================== */

body #payoutTabs.nav-tabs {
    border-bottom: none !important;
    margin-bottom: 25px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding-left: 0 !important;
}

body #payoutTabs.nav-tabs>li {
    margin: 0 !important;
    list-style: none !important;
}

body #payoutTabs.nav-tabs>li>a {
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #475569 !important;
    border-radius: 50px !important;
    padding: 8px 18px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    display: inline-block !important;
}

html[data-theme="dark"] body #payoutTabs.nav-tabs>li>a {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

body #payoutTabs.nav-tabs>li>a.active,
body #payoutTabs.nav-tabs>li>a:hover {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    border-color: #0d6efd !important;
}

html[data-theme="dark"] body #payoutTabs.nav-tabs>li>a.active,
html[data-theme="dark"] body #payoutTabs.nav-tabs>li>a:hover {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}


/* ==========================================
   3. 🚨 الجدول المضغوط (إزالة الفراغات المزدوجة) 🚨
   ========================================== */

.tab-content {
    width: 100% !important;
    padding: 0 !important;
}

.table-responsive {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
}

html[data-theme="dark"] body .table-responsive {
    border-color: #334155 !important;
}

body .table-custom {
    width: 100% !important;
    table-layout: fixed !important;
    margin: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    border: none !important;
}


/* تظبيط الخلايا عشان النص يكسر براحته بدون خطوط طولية زحمة */

body .table-custom th,
body .table-custom td {
    white-space: normal !important;
    word-wrap: break-word !important;
    vertical-align: middle !important;
    padding: 12px 10px !important;
    text-align: center !important;
    border-left: none !important;
    border-right: none !important;
}


/* محاذاة اسم الدولة لليسار */

body .table-custom td:first-child,
body .table-custom th:first-child {
    text-align: left !important;
}


/* الهيدر الأساسي */

body .table-custom th {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

html[data-theme="dark"] body .table-custom th {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-bottom: 2px solid #334155 !important;
}


/* الصف الفرعي (Desktop / Mobile) */

body .table-custom tr:nth-child(2) td {
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-weight: 800 !important;
}

html[data-theme="dark"] body .table-custom tr:nth-child(2) td {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-bottom: 1px solid #334155 !important;
}


/* الخلايا العادية والحدود السفلية */

body .table-custom td {
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: none !important;
    color: #475569 !important;
    background-color: #ffffff !important;
    font-weight: 600 !important;
}

html[data-theme="dark"] body .table-custom td {
    border-bottom: 1px solid #334155 !important;
    background-color: #111827 !important;
    color: #e2e8f0 !important;
}


/* إخفاء الخط الأخير عشان ميبقاش فيه خطين تحت بعض مع الإطار الخارجي */

body .table-custom tr:last-child td {
    border-bottom: none !important;
}


/* ألوان الأسعار الخضراء */

body .table-custom td:nth-child(2),
body .table-custom td:nth-child(3) {
    color: #10b981 !important;
}


/* ==========================================
   4. حماية الأعلام
   ========================================== */

.flag-icon {
    border-radius: 3px !important;
    margin-right: 8px !important;
    font-size: 1.2em !important;
}

html[data-theme="dark"] body .flag-icon {
    background-color: transparent !important;
    background-blend-mode: normal !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* ==========================================
   5. تظبيط الموبايل (عصر الجدول)
   ========================================== */

@media (max-width: 768px) {
    .payout-section {
        padding: 15px 10px !important;
    }
    .payout-card {
        padding: 15px 5px !important;
        border-radius: 12px !important;
    }
    body #payoutTabs.nav-tabs>li>a {
        padding: 8px 14px !important;
        font-size: 0.85rem !important;
    }
    body .table-custom th,
    body .table-custom td {
        padding: 8px 4px !important;
        font-size: 0.75rem !important;
    }
    body .table-custom th:first-child,
    body .table-custom td:first-child {
        width: 44% !important;
    }
    body .table-custom td:nth-child(2),
    body .table-custom td:nth-child(3),
    body .table-custom th:nth-child(2) {
        width: 28% !important;
    }
    body .table-custom tr:nth-child(2) td i {
        display: none !important;
    }
    .flag-icon {
        margin-right: 4px !important;
        font-size: 1em !important;
    }
}