/* SatoshiCoin Support Network Custom Styles */
body {
    background-color: #0a0a0c;
    color: #e0e0e0;
}

.navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 2px solid #0f3460;
    /* Sticky (not fixed): the navbar wraps to two rows with all admin links,
       so a fixed navbar overlapped/clipped page headings. Sticky keeps it in
       the normal flow, so content always starts below it. */
    position: sticky;
    top: 0;
    z-index: 1030;
}

.nav-link {
    color: #ff6b81 !important;
    font-weight: 500;
}

.nav-link:hover {
    color: #ffa0b0 !important;
}

.card {
    background: #1a1a2e;
    border: 1px solid #2a2a4e;
    color: #e0e0e0;
}

.card-header {
    background: #16213e;
    border-bottom: 1px solid #2a2a4e;
    color: #ff6b81;
}

.btn-primary {
    background-color: #c9184a;
    border-color: #c9184a;
    color: #fff;
}

.btn-primary:hover {
    background-color: #a8143d;
    border-color: #a8143d;
    color: #fff;
}

.btn-dark {
    background-color: #16213e;
    border-color: #16213e;
}

.btn-dark:hover {
    background-color: #0f3460;
    border-color: #0f3460;
}

.btn-success {
    background-color: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

.btn-success:hover {
    background-color: #276b29;
    border-color: #276b29;
    color: #fff;
}

.btn-info {
    background-color: #2196f3;
    border-color: #2196f3;
}

.btn-info:hover {
    background-color: #1e88e5;
    border-color: #1e88e5;
}

.table {
    color: #e0e0e0;
}

.table th {
    color: #e94560;
    border-top: 1px solid #2a2a4e;
}

.table td {
    border-top: 1px solid #2a2a4e;
}

.form-control {
    background: #16213e;
    border: 1px solid #2a2a4e;
    color: #e0e0e0;
}

.form-control:focus {
    background: #16213e;
    border-color: #e94560;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.2rem rgba(233, 69, 96, 0.25);
}

.label-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    border-radius: 0.25rem;
    font-size: 0.75em;
    font-weight: 600;
}

.bg-verified {
    background-color: #28a745;
    color: white;
}

.bg-pending {
    background-color: #ffc107;
    color: #000;
}

.politician-card {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid #2a2a4e;
    transition: transform 0.2s;
}

.politician-card:hover {
    transform: translateY(-2px);
    border-color: #e94560;
}

.acceptance-badge {
    background: linear-gradient(90deg, #4caf50, #45a049);
    color: white;
}

.rejection-badge {
    background: linear-gradient(90deg, #f44336, #d32f2f);
    color: white;
}

.pending-badge {
    background: linear-gradient(90deg, #ff9800, #f57c00);
    color: white;
}

.hero-section {
    background: linear-gradient(135deg, #0a0a0c 0%, #1a1a2e 100%);
    border-bottom: 2px solid #0f3460;
    padding: 4rem 0;
}

.stat-card {
    background: #16213e;
    border: 1px solid #2a2a4e;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #e94560;
}

.stat-label {
    font-size: 0.9rem;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* ============================================================
   Accessibility / contrast overrides
   ============================================================ */

/* Muted text must be readable on the dark page background */
.text-muted { color: #adb5bd !important; }

/* Light-background sections: force readable dark text on the
   section heading/intro only (cards inside keep their dark theme) */
.bg-light > .container > h1,
.bg-light > .container > h2,
.bg-light > .container > h3,
.bg-light > .container > p { color: #16181d !important; }
.bg-light > .container > p.text-muted { color: #495057 !important; }

/* Badges: dark text on light/bright backgrounds */
.badge.bg-info,
.badge.bg-warning,
.badge.bg-light { color: #000 !important; }
.badge.bg-success { background-color: #2e7d32 !important; color: #fff !important; }

/* Ensure buttons inside dark cards stay legible */
.card .btn-outline-secondary { color: #ced4da; border-color: #6c757d; }

/* Card headers using light Bootstrap background utilities need dark text */
.card-header.bg-warning,
.card-header.bg-info,
.card-header.bg-light { color: #000 !important; }

/* ============================================================
   Navbar: prevent horizontal overflow with many (admin) items
   ============================================================ */
html, body { max-width: 100%; overflow-x: hidden; }

.navbar > .container { flex-wrap: wrap; }
.navbar .navbar-collapse { min-width: 0; }
.navbar-nav { flex-wrap: wrap; }
.navbar-nav .nav-link {
    padding: .4rem .6rem;
    font-size: .95rem;
    white-space: nowrap;
}
@media (min-width: 992px) {
    .navbar > .container { row-gap: .25rem; }
    #navbarNav > .dropdown,
    #navbarNav > .d-flex { margin-top: .1rem; }
}

/* ============================================================
   Tables: Bootstrap paints cells with body-bg (white), which
   clashed with the dark theme. Theme them explicitly.
   ============================================================ */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: #e0e0e0;
    --bs-table-border-color: #2a2a4e;
    --bs-table-striped-bg: rgba(255, 255, 255, .04);
    --bs-table-striped-color: #e0e0e0;
    --bs-table-hover-bg: rgba(255, 255, 255, .07);
    --bs-table-hover-color: #ffffff;
    --bs-table-accent-bg: transparent;
    color: #e0e0e0;
    border-color: #2a2a4e;
}
.table th,
.table td { border-color: #2a2a4e; }
.table th { color: #ff6b81; }
.table > tbody > tr > td { color: #e0e0e0; }

/* Utility text colors need lighter variants on dark surfaces */
.text-primary { color: #6ea8fe !important; }
.text-success { color: #75b798 !important; }
.text-danger  { color: #ea868f !important; }
.text-info    { color: #6edff6 !important; }
.text-dark    { color: #16181d !important; }

/* Light sections keep Bootstrap's dark-on-light variants */
.bg-light .text-primary { color: #0a58ca !important; }
.bg-light .text-success { color: #0f5132 !important; }
.bg-light .text-danger  { color: #842029 !important; }

/* Outline buttons on the dark page background */
.btn-outline-secondary { color: #adb5bd; border-color: #6c757d; }
.btn-outline-secondary:hover { color: #0a0a0c; background-color: #adb5bd; border-color: #adb5bd; }

/* Custom stat-card accent colors (were undefined -> poor contrast) */
.text-purple { color: #b197fc !important; }
.text-blue   { color: #6ea8fe !important; }
.text-orange { color: #ffb86b !important; }
.text-teal   { color: #63e6be !important; }
.text-xs { font-size: .78rem; letter-spacing: .03em; }

/* Links on the dark page background */
a { color: #8ab4f8; }
a:hover, a:focus { color: #aecbfa; }
.navbar a, .btn { text-decoration: none; }

/* Muted text needs a lighter tone on dark surfaces */
.text-muted { color: #adb5bd !important; }
.bg-light .text-muted,
.card-header.bg-light .text-muted { color: #5c636a !important; }

/* Nested cards inside the half-width Quick Actions column must not collapse */
.card .card-body > .row > [class*="col-"] { min-width: 0; }

/* ============================================================
   Contrast fixes on dark surfaces (found by Playwright audit)
   ============================================================ */
/* .form-text (help text under profile inputs) kept Bootstrap's dark
   default (#212529 @75%) -> 1.1:1 on our dark cards. */
.form-text {
    color: #adb5bd !important;
}

/* Outline buttons on dark card backgrounds: Bootstrap's #0d6efd text was
   3.8:1 on the #1a1a2e cards. Lighten text + border for AA. */
.btn-outline-primary {
    color: #8bb9fe;
    border-color: #8bb9fe;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #0a0a0c;
    background-color: #8bb9fe;
    border-color: #8bb9fe;
}
.btn-outline-secondary {
    color: #ced4da;
    border-color: #6c757d;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: #0a0a0c;
    background-color: #ced4da;
    border-color: #ced4da;
}

/* Tighten nav so the link row needs less horizontal space on desktop */
@media (min-width: 992px) {
    .navbar-nav .nav-link { padding: .35rem .5rem; font-size: .9rem; }
    .navbar-brand { font-size: 1.05rem; }
}

/* Inline code (crypto addresses) used Bootstrap's pink #d63384 -> 3.8:1 */
code {
    color: #ff8fab;
}

/* ---------------------------------------------------------------------------
   Right-to-left (RTL) support
   Applied via <html dir="rtl"> for Arabic, Farsi, Urdu, Pashto and Hebrew.
   --------------------------------------------------------------------------- */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .text-start { text-align: right !important; }
[dir="rtl"] .text-end { text-align: left !important; }
[dir="rtl"] .ms-1 { margin-left: 0 !important; margin-right: .25rem !important; }
[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: .5rem !important; }
[dir="rtl"] .ms-3 { margin-left: 0 !important; margin-right: 1rem !important; }
[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: .25rem !important; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: .5rem !important; }
[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }
[dir="rtl"] .me-auto { margin-right: 0 !important; margin-left: auto !important; }
[dir="rtl"] .dropdown-menu-end { right: auto; left: 0; }
[dir="rtl"] .navbar-nav { padding-right: 0; }
[dir="rtl"] .fa-arrow-right, [dir="rtl"] .fa-arrow-left,
[dir="rtl"] .fa-chevron-right, [dir="rtl"] .fa-chevron-left { transform: scaleX(-1); }

/* ---------------------------------------------------------------------------
   Regional language mega menu (navbar)
   --------------------------------------------------------------------------- */
.language-mega-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 15rem;
    border-color: rgba(255, 255, 255, .35);
}
.language-mega-toggle:hover,
.language-mega-toggle:focus,
.language-mega-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .65);
    color: #fff;
}
.language-mega .dropdown-menu.language-mega-menu {
    width: min(980px, calc(100vw - 2rem));
    padding: 0;
    margin-top: .6rem;
    border: 1px solid #2a2a4e;
    border-radius: 14px;
    background: #121225;
    box-shadow: 0 22px 55px rgba(0, 0, 0, .6);
    overflow: hidden;
    z-index: 1060;
}
.language-mega-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.1rem;
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    border-bottom: 1px solid #2a2a4e;
}
.language-mega-title {
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
}
.language-mega-subtitle {
    color: #98a0b8;
    font-size: .72rem;
    margin-top: .15rem;
}
.language-current-badge {
    flex: 0 0 auto;
    background: #c9184a;
    color: #fff;
    font-weight: 500;
    font-size: .72rem;
    padding: .4rem .6rem;
    border-radius: 999px;
}
.language-mega-search {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: .75rem 1rem 0;
    padding: .45rem .7rem;
    background: #0d0d1c;
    border: 1px solid #2a2a4e;
    border-radius: 9px;
}
.language-mega-search .fa-search {
    color: #7c849c;
    font-size: .8rem;
}
.language-search-input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: 0;
    color: #e8ebf5;
    font-size: .85rem;
    outline: none;
}
.language-search-input::placeholder {
    color: #6f7793;
}
.language-mega-search:focus-within {
    border-color: #c9184a;
    box-shadow: 0 0 0 3px rgba(201, 24, 74, .18);
}
.language-mega-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .35rem 1rem;
    padding: 1rem;
    max-height: min(66vh, 540px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.language-no-results {
    margin: 0;
    padding: 1.4rem 1rem 1.6rem;
    color: #98a0b8;
    font-size: .85rem;
    text-align: center;
}
.language-region {
    padding: .25rem .15rem;
}
.language-region-title {
    margin: 0 0 .35rem;
    padding: 0 .5rem;
    color: #8b93ad;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.language-list {
    margin: 0;
}
.language-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .5rem;
    border-radius: 8px;
    color: #dfe3f0;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.language-item:hover,
.language-item:focus-visible {
    background: #1e2846;
    color: #fff;
    outline: none;
}
.language-item.active {
    background: rgba(201, 24, 74, .18);
    color: #ff9aac;
}
.language-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .86rem;
}
.language-code {
    flex: 0 0 auto;
    color: #7c849c;
    border: 1px solid #2a2a4e;
    border-radius: 4px;
    padding: .02rem .28rem;
    font-size: .58rem;
    letter-spacing: .05em;
}
.language-item.active .language-code {
    color: #ff9aac;
    border-color: rgba(255, 154, 172, .4);
}
.language-check {
    flex: 0 0 auto;
    color: #ff9aac;
    font-size: .7rem;
}
.language-mega-grid::-webkit-scrollbar {
    width: 8px;
}
.language-mega-grid::-webkit-scrollbar-thumb {
    background: #2f3a5c;
    border-radius: 8px;
}
.language-mega-grid {
    scrollbar-width: thin;
    scrollbar-color: #2f3a5c transparent;
}
[dir="rtl"] .language-item { text-align: right; }
[dir="rtl"] .language-region-title { text-align: right; }
[dir="rtl"] .language-mega-title,
[dir="rtl"] .language-mega-subtitle { text-align: right; }

@media (max-width: 1199.98px) {
    .language-mega-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 991.98px) {
    .language-mega {
        width: 100%;
        margin-right: 0 !important;
    }
    .language-mega-toggle {
        width: 100%;
        max-width: none;
        justify-content: space-between;
    }
    .language-mega .dropdown-menu.language-mega-menu {
        position: static;
        width: 100%;
        margin-top: .5rem;
        box-shadow: none;
    }
    .language-mega-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }
}
@media (max-width: 575.98px) {
    .language-mega-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .language-mega-grid {
        grid-template-columns: 1fr;
    }
}
