/*
 * VialLen brand theme: dark maroon + light grey + orange-brown accent.
 * Loaded last in app.blade.php (after Metronic + DataTables/Select2) so these
 * rules win the cascade without needing to recompile Metronic's SASS.
 *
 * Metronic bakes each Bootstrap button variant's colors into literal hex
 * values inside its own component-scoped custom properties at SASS-compile
 * time (e.g. .btn-primary{--bs-btn-bg:#50cd89}), so overriding the root
 * --bs-primary/--bs-dark variables alone only reaches the *utility* classes
 * (.bg-dark, .text-dark, .bg-primary, .text-primary, ...) — buttons need
 * their own explicit override block below.
 */
:root {
    --bs-dark: #6d1f2e;
    --bs-dark-rgb: 109, 31, 46;
    --bs-primary: #b5651d;
    --bs-primary-rgb: 181, 101, 29;
    --bs-light: #f4f1ef;
    --bs-light-rgb: 244, 241, 239;
    --bs-light-bg-subtle: #f7f5f3;

    /* Shared data-table typography (Inter) */
    --viallen-table-font: 'Inter', Helvetica, Arial, sans-serif;
    --viallen-table-font-size: 1rem;
    --viallen-table-header-size: 0.9rem;
    --viallen-table-control-size: 0.95rem;
    --viallen-table-btn-size: 0.875rem;
}

/* Safety net for CDN widgets that ship their own font stack. */
body,
.swal2-popup,
.select2-container,
.dataTables_wrapper,
.table,
.table-compact {
    font-family: var(--viallen-table-font);
}

.btn-dark {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: #6d1f2e;
    --bs-btn-border-color: #6d1f2e;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #591926;
    --bs-btn-hover-border-color: #4d1521;
    --bs-btn-focus-shadow-rgb: 109, 31, 46;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #4d1521;
    --bs-btn-active-border-color: #4d1521;
    --bs-btn-disabled-bg: #6d1f2e;
    --bs-btn-disabled-border-color: #6d1f2e;
}

.btn-outline-dark {
    --bs-btn-color: #6d1f2e;
    --bs-btn-border-color: #6d1f2e;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #6d1f2e;
    --bs-btn-hover-border-color: #6d1f2e;
    --bs-btn-focus-shadow-rgb: 109, 31, 46;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #6d1f2e;
    --bs-btn-active-border-color: #6d1f2e;
    --bs-btn-disabled-color: #6d1f2e;
    --bs-btn-disabled-border-color: #6d1f2e;
}

.btn-primary {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: #b5651d;
    --bs-btn-border-color: #b5651d;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #9c5419;
    --bs-btn-hover-border-color: #8a4a16;
    --bs-btn-focus-shadow-rgb: 181, 101, 29;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #8a4a16;
    --bs-btn-active-border-color: #8a4a16;
    --bs-btn-disabled-bg: #b5651d;
    --bs-btn-disabled-border-color: #b5651d;
}

.btn-outline-primary {
    --bs-btn-color: #b5651d;
    --bs-btn-border-color: #b5651d;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #b5651d;
    --bs-btn-hover-border-color: #b5651d;
    --bs-btn-focus-shadow-rgb: 181, 101, 29;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #b5651d;
    --bs-btn-active-border-color: #b5651d;
    --bs-btn-disabled-color: #b5651d;
    --bs-btn-disabled-border-color: #b5651d;
}

/* Sidebar: tie the persistent "here" nav-section highlight to the brand maroon */
.menu-item.here > .menu-link,
.menu-item.active .menu-link {
    color: #6d1f2e !important;
}
.menu-item.here > .menu-link .menu-icon i,
.menu-item.active .menu-link .menu-icon i {
    color: #6d1f2e !important;
}

/* Table header convention used across the app (bg-dark text-white) now
   reads as dark maroon via the --bs-dark override above; no extra rule
   needed here since .bg-dark/.text-dark already reference the CSS var. */

/* Standard data-table type scale (Inter) — used by station/model/user/role/
   predict/training listings. Row padding tightened; type size left readable. */
.table,
.table-sm,
.table-compact,
.dataTables_wrapper,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-family: var(--viallen-table-font);
    font-size: var(--viallen-table-font-size);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: normal;
    color: #3f4254;
}

.table th,
.table td,
.table-sm th,
.table-sm td,
.table-compact th,
.table-compact td {
    font-family: inherit;
    font-size: inherit;
    padding: 0.4rem 0.85rem;
    vertical-align: middle;
}

.table thead th,
.table-sm thead th,
.table-compact thead th {
    font-size: var(--viallen-table-header-size);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.table .badge,
.table-sm .badge,
.table-compact .badge {
    font-family: var(--viallen-table-font);
    font-size: 0.85rem;
    font-weight: 600;
}

.table .btn-sm,
.table-sm .btn-sm,
.table-compact .btn-sm {
    font-family: var(--viallen-table-font);
    font-size: var(--viallen-table-btn-size);
    font-weight: 500;
    padding: 0.3rem 0.7rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    font-family: var(--viallen-table-font);
    font-size: var(--viallen-table-control-size);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-family: var(--viallen-table-font);
    font-size: var(--viallen-table-control-size) !important;
    padding: 0.35em 0.85em !important;
}
