/*
 * theme-midnight.css  —  Midnight Blue
 * "Serious sports app" — very deep navy, electric blue accent. Pro peloton aesthetic.
 *
 * Dark mode only. Activated via:
 *   activateTheme('dark', 'midnight')
 *
 * Structure:
 *   [data-theme="midnight"]                      — electric blue primary
 *   [data-bs-theme="dark"][data-theme="midnight"] — deep navy backgrounds, borders, text
 */

/* ── Primary electric blue — active in both light and dark ──────────────────── */
[data-theme="midnight"] {
    --tblr-primary:        #3b82f6;
    --tblr-primary-rgb:    59, 130, 246;
    --tblr-primary-darken: #2563eb;
    --tblr-primary-lt:     rgba(59, 130, 246, 0.12);
}

/* ── Full midnight navy ───────────────────────────────────────────────────────
   Deep navy backgrounds, electric blue accent, cool slate text.
   ─────────────────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="midnight"] {
    /* Page / surface backgrounds */
    --tblr-body-bg:              #0a0f1e;
    --tblr-bg-surface:           #0f1729;
    --tblr-bg-surface-secondary: #162040;
    --tblr-bg-surface-tertiary:  #0a0f1e;

    /* Borders */
    --tblr-border-color:             #1e3a5f;
    --tblr-border-color-translucent: rgba(30, 58, 95, 0.6);

    /* Text */
    --tblr-body-color:      #e2e8f0;
    --tblr-secondary-color: #94a3b8;
    --tblr-muted:           #64748b;

    /* Status colours */
    --tblr-success:     #10b981;
    --tblr-success-rgb: 16, 185, 129;
    --tblr-danger:      #ef4444;
    --tblr-danger-rgb:  239, 68, 68;
    --tblr-warning:     #f59e0b;
    --tblr-warning-rgb: 245, 158, 11;
    --tblr-info:        #06b6d4;
    --tblr-info-rgb:    6, 182, 212;
}

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

/* ── DataTables ──────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable thead th,
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable thead td {
    background-color: #0f1729;
    border-bottom-color: #1e3a5f;
    color: #94a3b8;
}
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable tbody td {
    background-color: #162040;
    color: #e2e8f0;
}
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable tbody tr {
    border-bottom-color: #1e3a5f;
}
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable tbody tr:hover > td {
    background-color: #1c2d55 !important;
}
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable tbody a {
    color: #60a5fa;
}
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable tbody a:hover {
    color: #93c5fd;
}
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable tbody tr.child td,
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable tbody tr.dt-hasChild + tr td {
    background: rgba(255, 255, 255, 0.02);
    color: #e2e8f0;
}
/* Sort arrows */
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable thead .sorting::after {
    border-top-color: #64748b;
}
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable thead .sorting_asc::after {
    border-bottom-color: #3b82f6;
}
[data-bs-theme="dark"][data-theme="midnight"] table.dataTable thead .sorting_desc::after {
    border-top-color: #3b82f6;
}
/* DataTables controls */
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_filter input,
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_length select {
    background-color: #0f1729;
    border-color: #1e3a5f;
    color: #e2e8f0;
}
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_filter input:focus,
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_length select:focus {
    border-color: #3b82f6;
}
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_filter label,
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_length label,
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_info {
    color: #94a3b8;
}
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_paginate {
    border-top-color: #1e3a5f;
}
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
    color: #3b82f6 !important;
}
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff !important;
}
[data-bs-theme="dark"][data-theme="midnight"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #1e3a5f !important;
}

/* ── br_rides expanded child row ─────────────────────────────────────────────── */
[data-bs-theme="dark"][data-theme="midnight"] .ride-expand-body {
    background: #0f1729;
    border-top-color: #1e3a5f;
}
[data-bs-theme="dark"][data-theme="midnight"] .ride-expand-lbl { color: #64748b; }
[data-bs-theme="dark"][data-theme="midnight"] .ride-expand-val { color: #cbd5e1; }

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

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

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