/*
 * theme-adrenaline.css  —  Dark Red / Adrenaline
 * "High intensity" — near-black charcoal, crimson accent. Strava-adjacent energy.
 *
 * Dark mode only. Activated via:
 *   activateTheme('dark', 'adrenaline')
 *
 * Structure:
 *   [data-theme="adrenaline"]                      — crimson primary
 *   [data-bs-theme="dark"][data-theme="adrenaline"] — charcoal backgrounds, borders, text
 */

/* ── Primary crimson — active in both light and dark ────────────────────────── */
[data-theme="adrenaline"] {
    --tblr-primary:        #dc2626;
    --tblr-primary-rgb:    220, 38, 38;
    --tblr-primary-darken: #b91c1c;
    --tblr-primary-lt:     rgba(220, 38, 38, 0.12);
}

/* ── Full dark adrenaline ─────────────────────────────────────────────────────
   Near-black charcoal surfaces, crimson accent, neutral warm-grey text.
   ─────────────────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="adrenaline"] {
    /* Page / surface backgrounds */
    --tblr-body-bg:              #111111;
    --tblr-bg-surface:           #1a1a1a;
    --tblr-bg-surface-secondary: #222222;
    --tblr-bg-surface-tertiary:  #111111;

    /* Borders */
    --tblr-border-color:             #333333;
    --tblr-border-color-translucent: rgba(51, 51, 51, 0.6);

    /* Text */
    --tblr-body-color:      #f5f5f5;
    --tblr-secondary-color: #a3a3a3;
    --tblr-muted:           #737373;

    /* Status colours */
    --tblr-success:     #16a34a;
    --tblr-success-rgb: 22, 163, 74;
    --tblr-danger:      #dc2626;
    --tblr-danger-rgb:  220, 38, 38;
    --tblr-warning:     #d97706;
    --tblr-warning-rgb: 217, 119, 6;
    --tblr-info:        #0ea5e9;
    --tblr-info-rgb:    14, 165, 233;
}

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

/* ── DataTables ──────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable thead th,
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable thead td {
    background-color: #1a1a1a;
    border-bottom-color: #333333;
    color: #a3a3a3;
}
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable tbody td {
    background-color: #222222;
    color: #f5f5f5;
}
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable tbody tr {
    border-bottom-color: #333333;
}
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable tbody tr:hover > td {
    background-color: #2d1515 !important;
}
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable tbody a {
    color: #f87171;
}
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable tbody a:hover {
    color: #fca5a5;
}
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable tbody tr.child td,
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable tbody tr.dt-hasChild + tr td {
    background: rgba(255, 255, 255, 0.02);
    color: #f5f5f5;
}
/* Sort arrows */
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable thead .sorting::after {
    border-top-color: #737373;
}
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable thead .sorting_asc::after {
    border-bottom-color: #dc2626;
}
[data-bs-theme="dark"][data-theme="adrenaline"] table.dataTable thead .sorting_desc::after {
    border-top-color: #dc2626;
}
/* DataTables controls */
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_filter input,
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_length select {
    background-color: #1a1a1a;
    border-color: #333333;
    color: #f5f5f5;
}
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_filter input:focus,
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_length select:focus {
    border-color: #dc2626;
}
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_filter label,
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_length label,
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_info {
    color: #a3a3a3;
}
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_paginate {
    border-top-color: #333333;
}
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #f5f5f5 !important;
}
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
    color: #dc2626 !important;
}
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff !important;
}
[data-bs-theme="dark"][data-theme="adrenaline"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #333333 !important;
}

/* ── br_rides expanded child row ─────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="adrenaline"] .ride-expand-body {
    background: #1a1a1a;
    border-top-color: #333333;
}
[data-bs-theme="dark"][data-theme="adrenaline"] .ride-expand-lbl { color: #737373; }
[data-bs-theme="dark"][data-theme="adrenaline"] .ride-expand-val { color: #e5e5e5; }

/* ── Cards ────────────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="adrenaline"] .card {
    background-color: #1a1a1a;
    border-color: #333333;
}
[data-bs-theme="dark"][data-theme="adrenaline"] .card-header,
[data-bs-theme="dark"][data-theme="adrenaline"] .card-footer {
    border-color: #333333;
    background-color: #1a1a1a;
}

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

/* ── Gradient card ─────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="adrenaline"] .card-gradient {
    background: linear-gradient(to bottom, rgba(220,38,38,.22) 0%, transparent 100%) !important;
    border-color: rgba(220,38,38,.35) !important;
}
