/*
 * theme-sunrise.css  —  BigRing Sunrise
 * The BigRingVR logo image: predawn sky transitioning from near-black navy at the
 * top through deep purplish night, then the horizon bursting into the brand red,
 * orange, and gold of a cycling dawn.
 *
 * Dark mode only. Activated via:
 *   activateTheme('dark', 'sunrise')
 *
 * Palette (colour-picked from the BigRingVR hero image):
 *   Night top       #06091a  — deepest black-blue, the crown of the sky
 *   Night navy      #0d1428  — dark card surfaces
 *   Mid sky         #111e38  — secondary surfaces / lighter cards
 *   Pre-dawn warm   #1a0d0a  — barely-warm dark at the base of the sky
 *   Brand red       #cc2200  — BigRingVR logo red — primary accent
 *   Hot red-orange  #e83800  — hotter sunrise band
 *   Sunrise orange  #f56400  — warm midglow
 *   Warm gold       #f89800  — golden horizon
 *   Body text       #e8dbd8  — warm off-white (the light catching clouds)
 *   Muted text      #9a8a8c  — warm grey secondary
 *
 * Structure:
 *   [data-theme="sunrise"]                      — brand red primary (both modes)
 *   [data-bs-theme="dark"][data-theme="sunrise"] — night-sky backgrounds, full theme
 */

/* ── Primary BigRingVR red — active in both light and dark ──────────────────── */
[data-theme="sunrise"] {
    --tblr-primary:        #cc2200;
    --tblr-primary-rgb:    204, 34, 0;
    --tblr-primary-darken: #a81c00;
    --tblr-primary-lt:     rgba(204, 34, 0, 0.12);
}

/* ── Full sunrise dark theme ─────────────────────────────────────────────────
   Night-sky backgrounds, sunrise red accent, warm off-white text.
   ─────────────────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] {
    /* Page / surface backgrounds */
    --tblr-body-bg:              #06091a;
    --tblr-bg-surface:           #0d1428;
    --tblr-bg-surface-secondary: #111e38;
    --tblr-bg-surface-tertiary:  #06091a;

    /* Borders — blue-tinted night sky seams */
    --tblr-border-color:             #1e3055;
    --tblr-border-color-translucent: rgba(30, 48, 85, 0.55);

    /* Text — warm off-white, like sky catching the first light */
    --tblr-body-color:      #e8dbd8;
    --tblr-secondary-color: #9a8a8c;
    --tblr-muted:           #5a5058;

    /* Status colours — keep functional, warm slightly */
    --tblr-success:     #16a34a;
    --tblr-success-rgb: 22, 163, 74;
    --tblr-danger:      #ef4444;
    --tblr-danger-rgb:  239, 68, 68;
    --tblr-warning:     #f59e0b;
    --tblr-warning-rgb: 245, 158, 11;
    --tblr-info:        #38bdf8;
    --tblr-info-rgb:    56, 189, 248;
}

/* ── Sidebar — the hero gradient ─────────────────────────────────────────────
   Mirrors the BigRingVR image: deep night-navy at top, creeping warmth below.
   The red never fully arrives — this is the sky just *before* the sunrise.
   ─────────────────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .navbar.navbar-vertical {
    background: linear-gradient(
        180deg,
        #06091a 0%,      /* crown: deepest night */
        #08101f 20%,     /* upper sky: near-black navy */
        #0d1630 45%,     /* mid sky: settled navy */
        #100d20 70%,     /* descent: slight purplish pre-dawn */
        #180c10 88%,     /* lower: warmth creeping in from below */
        #200909 100%     /* base: the dark red glow just out of frame */
    ) !important;
    border-right: 1px solid rgba(204, 34, 0, 0.18) !important;
}

/* Sidebar nav links — warm, readable */
[data-bs-theme="dark"][data-theme="sunrise"] .navbar.navbar-vertical .nav-link {
    color: #c8c0be;
}
[data-bs-theme="dark"][data-theme="sunrise"] .navbar.navbar-vertical .nav-link:hover {
    color: #f89898;
    background: rgba(204, 34, 0, 0.10);
}
[data-bs-theme="dark"][data-theme="sunrise"] .navbar.navbar-vertical .nav-link.active {
    color: #f87050;
    background: rgba(204, 34, 0, 0.16);
}

/* Sidebar section dividers */
[data-bs-theme="dark"][data-theme="sunrise"] .navbar.navbar-vertical .border-top {
    border-color: rgba(204, 34, 0, 0.20) !important;
}

/* Sidebar brand text */
[data-bs-theme="dark"][data-theme="sunrise"] .navbar-brand .text-primary {
    background: linear-gradient(90deg, #e83800 0%, #f89800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar toggler icon on mobile */
[data-bs-theme="dark"][data-theme="sunrise"] .navbar.navbar-vertical .navbar-toggler-icon {
    filter: invert(1);
}

/* ── Top header bar ──────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .navbar.navbar-expand-md:not(.navbar-vertical) {
    background-color: #08101f;
    border-bottom: 1px solid #1e3055;
}

/* ── Body / page text ────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] p,
[data-bs-theme="dark"][data-theme="sunrise"] li,
[data-bs-theme="dark"][data-theme="sunrise"] .card-text,
[data-bs-theme="dark"][data-theme="sunrise"] .page-body,
[data-bs-theme="dark"][data-theme="sunrise"] label:not(.form-check-label) {
    color: #e8dbd8;
}

/* ── Cards ────────────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .card {
    background-color: #0d1428;
    border-color: #1e3055;
}
[data-bs-theme="dark"][data-theme="sunrise"] .card-header,
[data-bs-theme="dark"][data-theme="sunrise"] .card-footer {
    border-color: #1e3055;
    background-color: #0d1428;
}

/* ── Gradient card — red-orange sunrise wash ─────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .card-gradient {
    background: linear-gradient(
        to bottom,
        rgba(204, 34, 0, .20) 0%,
        rgba(245, 100, 0, .08) 55%,
        transparent 100%
    ) !important;
    border-color: rgba(204, 34, 0, .30) !important;
}

/* ── DataTables ──────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable thead th,
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable thead td {
    background-color: #0d1428;
    border-bottom-color: #1e3055;
    color: #9a8a8c;
}
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable thead th:hover {
    color: #f87050;
}
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable tbody td {
    background-color: #111e38;
    color: #e8dbd8;
}
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable tbody tr {
    border-bottom-color: #1e3055;
}
/* Hover: the warm red pre-dawn creeping in */
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable tbody tr:hover > td {
    background-color: #1e1018 !important;
}
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable tbody a {
    color: #f07050;
}
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable tbody a:hover {
    color: #f8a080;
}
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable tbody tr.child td,
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable tbody tr.dt-hasChild + tr td {
    background: rgba(255, 255, 255, 0.02);
    color: #e8dbd8;
}
/* Sort arrows — sunrise orange when active */
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable thead .sorting::after {
    border-top-color: #5a5058;
}
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable thead .sorting_asc::after {
    border-bottom-color: #cc2200;
}
[data-bs-theme="dark"][data-theme="sunrise"] table.dataTable thead .sorting_desc::after {
    border-top-color: #cc2200;
}
/* DataTables search / length controls */
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_filter input,
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_length select {
    background-color: #0d1428;
    border-color: #1e3055;
    color: #e8dbd8;
}
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_filter input:focus,
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_length select:focus {
    border-color: #cc2200;
    box-shadow: 0 0 0 3px rgba(204, 34, 0, .18);
}
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_filter label,
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_length label,
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_info {
    color: #9a8a8c;
}
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_paginate {
    border-top-color: #1e3055;
}
/* Pagination */
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #e8dbd8 !important;
}
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(204, 34, 0, 0.12);
    border-color: #cc2200;
    color: #f07050 !important;
}
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #cc2200;
    border-color: #cc2200;
    color: #fff !important;
}
[data-bs-theme="dark"][data-theme="sunrise"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #2a2030 !important;
}

/* ── br_rides expanded child row ─────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .ride-expand-body {
    background: #0d1428;
    border-top-color: #1e3055;
}
[data-bs-theme="dark"][data-theme="sunrise"] .ride-expand-lbl { color: #5a5058; }
[data-bs-theme="dark"][data-theme="sunrise"] .ride-expand-val { color: #d8ccc8; }

/* ── dt-admin-header border ──────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .dt-admin-header {
    border-bottom-color: #1e3055;
}

/* ── Buttons — primary inherits red, add warm hover glow ─────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .btn-primary {
    background-color: #cc2200;
    border-color: #cc2200;
}
[data-bs-theme="dark"][data-theme="sunrise"] .btn-primary:hover {
    background-color: #e83800;
    border-color: #e83800;
    box-shadow: 0 4px 14px rgba(204, 34, 0, .38);
}

/* ── Form focus rings ────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .form-control:focus,
[data-bs-theme="dark"][data-theme="sunrise"] .form-select:focus {
    border-color: #cc2200;
    box-shadow: 0 0 0 3px rgba(204, 34, 0, .18);
}

/* ── Dropdowns ───────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .dropdown-menu {
    background-color: #0d1428;
    border-color: #1e3055;
}
[data-bs-theme="dark"][data-theme="sunrise"] .dropdown-item {
    color: #e8dbd8;
}
[data-bs-theme="dark"][data-theme="sunrise"] .dropdown-item:hover,
[data-bs-theme="dark"][data-theme="sunrise"] .dropdown-item:focus {
    background-color: rgba(204, 34, 0, 0.12);
    color: #f87050;
}
[data-bs-theme="dark"][data-theme="sunrise"] .dropdown-divider {
    border-color: #1e3055;
}
[data-bs-theme="dark"][data-theme="sunrise"] .dropdown-header {
    color: #9a8a8c;
}

/* ── Scrollbar — subtle warm-on-dark ────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
[data-bs-theme="dark"][data-theme="sunrise"] ::-webkit-scrollbar-track {
    background: #06091a;
}
[data-bs-theme="dark"][data-theme="sunrise"] ::-webkit-scrollbar-thumb {
    background: #2a1a10;
    border-radius: 3px;
}
[data-bs-theme="dark"][data-theme="sunrise"] ::-webkit-scrollbar-thumb:hover {
    background: #cc2200;
}

/* ── Page header title area ──────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .page-header {
    border-bottom-color: #1e3055;
}

/* ── Alerts ──────────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .alert-info {
    background-color: rgba(56, 189, 248, 0.10);
    border-color: rgba(56, 189, 248, 0.25);
    color: #93d8f8;
}
[data-bs-theme="dark"][data-theme="sunrise"] .alert-warning {
    background-color: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

/* ── Tables (non-DataTables) ─────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: #e8dbd8;
    --bs-table-border-color: #1e3055;
    --bs-table-hover-bg: rgba(204, 34, 0, 0.07);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.025);
}

/* ── Active navigation highlight in lang picker ──────────────────────────────── */
[data-bs-theme="dark"][data-theme="sunrise"] .lang-opt.active {
    font-weight: 600;
    background: rgba(204, 34, 0, 0.14);
    color: #f87050;
}
