/* NOTE: css stylesheets loaded in alphabetical order */

/**************************************************************************************/
/*Override Bootstrap color defaults for "primary" color to one that matches VR palette*/
/* 1. Global Theme Variables for Utilities (bg-primary, text-primary, etc.) */
/* Using 'html' increases specificity to ensure it overrides Bootstrap's defaults */
html:root,
html[data-bs-theme="light"],
html[data-bs-theme="dark"] {
    --bs-primary: #2D577B;
    --bs-primary-rgb: 45, 87, 123;

    /* Variables for subtle backgrounds and text emphasis (used by alert-primary, list-group, etc.) */
    --bs-primary-bg-subtle: #d5dfe6; /* Lighter shade for alert backgrounds */
    --bs-primary-border-subtle: #abc0cd; /* Border for alerts */
    --bs-primary-text-emphasis: #122331; /* Darker shade for alert text */
}

/* 2. Button Overrides (.btn-primary) */
.btn-primary {
    --bs-btn-bg: #2D577B;
    --bs-btn-border-color: #2D577B;

    /* Slightly darker shades for hover/active states */
    --bs-btn-hover-bg: #264a69;
    --bs-btn-hover-border-color: #244662;
    --bs-btn-active-bg: #244662;
    --bs-btn-active-border-color: #22425c;

    --bs-btn-disabled-bg: #2D577B;
    --bs-btn-disabled-border-color: #2D577B;
}


/* 3. Outline Button Overrides (.btn-outline-primary) */
.btn-outline-primary {
    --bs-btn-color: #2D577B;
    --bs-btn-border-color: #2D577B;
    --bs-btn-hover-bg: #2D577B;
    --bs-btn-hover-border-color: #2D577B;
    --bs-btn-active-bg: #2D577B;
    --bs-btn-active-border-color: #2D577B;
}

/* 4. Alert Specific Overrides (.alert-primary) */
.alert-primary {
    --bs-alert-bg: var(--bs-primary-bg-subtle);
    --bs-alert-border-color: var(--bs-primary-border-subtle);
    --bs-alert-color: var(--bs-primary-text-emphasis);
    --bs-alert-link-color: var(--bs-primary-text-emphasis);
}
/*                              END - update primary color                            */
/**************************************************************************************/



/******************************************************************************/
/* On Form Errors, Style the default .field_with_errors class that rails adds*/
.field_with_errors {
    display: contents; /* don't disturb Bootstrap's grid/spacing */
}

.field_with_errors .form-control,
.field_with_errors .form-select {
    border-color: var(--bs-danger);
}

/* optional: match Bootstrap's focus glow */
.field_with_errors .form-control:focus,
.field_with_errors .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb), 0.25);
}
/*    END - Form Errors, Style the default .field_with_errors class fixes     */
/******************************************************************************/



/**********************************************************/
/*  Bootstrap Outline Buttons Light Mode Fixes           */
/* Accessibility (WCAG AAA) Text Colors for Dark Mode    */
[data-bs-theme="light"] .btn-outline-secondary {
    --bs-btn-color: #53595F;
    --bs-btn-border-color: #53595F;
}

[data-bs-theme="light"] .btn-outline-success {
    --bs-btn-color: #12633D;
    --bs-btn-border-color: #12633D;
}

[data-bs-theme="light"] .btn-outline-info {
    --bs-btn-color: #065E6F;
    --bs-btn-border-color: #065E6F;
}

[data-bs-theme="light"] .btn-outline-warning {
    --bs-btn-color: #6D5303;
    --bs-btn-border-color: #6D5303;
}

[data-bs-theme="light"] .btn-outline-danger {
    --bs-btn-color: #A91E2C;
    --bs-btn-border-color: #A91E2C;
}

[data-bs-theme="light"] .btn-outline-light {
    --bs-btn-color: #53595F;
    --bs-btn-border-color: #53595F;
}
/*    END - Bootstrap Outline Buttons Light Mode Fixes    */
/**********************************************************/



/****************************************************/
/*    Bootstrap Outline Buttons Dark Mode Fixes     */
[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #AECEFE;
    --bs-btn-border-color: #AECEFE;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0d6efd;
    --bs-btn-hover-border-color: #0d6efd;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0d6efd;
    --bs-btn-active-border-color: #0d6efd;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #CCCCCC;
    --bs-btn-border-color: #CCCCCC;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #6c757d;
    --bs-btn-hover-border-color: #6c757d;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #6c757d;
    --bs-btn-active-border-color: #6c757d;
}

[data-bs-theme="dark"] .btn-outline-success {
    --bs-btn-color: #AFD5C4;
    --bs-btn-border-color: #AFD5C4;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #198754;
    --bs-btn-hover-border-color: #198754;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #198754;
    --bs-btn-active-border-color: #198754;
}

[data-bs-theme="dark"] .btn-outline-info {
    --bs-btn-color: #5FDDF7;
    --bs-btn-border-color: #5FDDF7;
}

[data-bs-theme="dark"] .btn-outline-warning {
    --bs-btn-color: #FFC30F;
    --bs-btn-border-color: #FFC30F;
}

[data-bs-theme="dark"] .btn-outline-danger {
    --bs-btn-color: #F8BFC4;
    --bs-btn-border-color: #F8BFC4;
}

[data-bs-theme="dark"] .btn-outline-dark {
    --bs-btn-color: #dee2e6;
    --bs-btn-border-color: #dee2e6;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #dee2e6;
    --bs-btn-hover-border-color: #dee2e6;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #dee2e6;
    --bs-btn-active-border-color: #dee2e6;
}

[data-bs-theme="dark"] .btn-outline-light {
    --bs-btn-color: #f8f9fa;
    --bs-btn-border-color: #f8f9fa;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #f8f9fa;
    --bs-btn-hover-border-color: #f8f9fa;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #f8f9fa;
    --bs-btn-active-border-color: #f8f9fa;
}
/*  END - Bootstrap Outline Buttons Dark Mode Fixes */
/****************************************************/



/*********************************************************/
/* Accessibility (WCAG AAA) Text Colors for Light Mode   */
/* Background: #FFFFFF                                   */
/*********************************************************/
[data-bs-theme="light"] {
    --bs-body-color: #212529;
    --bs-secondary-color: #53595F;
    --bs-primary: #2D577B;
    --bs-success: #12633D;
    --bs-info: #065E6F;
    --bs-warning: #6D5303;
    --bs-danger: #A91E2C;
    --bs-light: #53595F; /* Use secondary for light on white */
    --bs-white: #000000; /* Use black for white on white */
}

/* Explicit class overrides to ensure application */
[data-bs-theme="light"] .text-body { color: #212529 !important; }
[data-bs-theme="light"] .text-muted { color: #4E545A !important; }
[data-bs-theme="light"] .text-secondary { color: #53595F !important; }
[data-bs-theme="light"] .text-primary { color: #2D577B !important; }
[data-bs-theme="light"] .text-success { color: #12633D !important; }
[data-bs-theme="light"] .text-info { color: #065E6F !important; }
[data-bs-theme="light"] .text-warning { color: #6D5303 !important; }
[data-bs-theme="light"] .text-danger { color: #A91E2C !important; }
[data-bs-theme="light"] .text-light { color: #53595F !important; }
[data-bs-theme="light"] .text-white { color: #000000 !important; }
/* END - Accessibility (WCAG AAA) Text Colors for Light Mode   */
/***************************************************************/



/***************************************************************/
/*     Accessibility (WCAG AAA) Text Colors for Dark Mode      */
/*     Background: #212529 (L = 1.6%)                          */
/***************************************************************/
[data-bs-theme="dark"] {
    --bs-body-color: #f0f0f0;
    --bs-secondary-color: #CCCCCC;
    --bs-primary: #AECEFE;
    --bs-success: #AFD5C4;
    --bs-info: #9eeaf9;
    --bs-warning: #ffe69c;
    --bs-danger: #F5C2C5;
    --bs-light: #f8f9fa;
    --bs-dark: #dee2e6;
    --bs-white: #ffffff;
}

/* Explicit class overrides to ensure application */
[data-bs-theme="dark"] .text-body { color: #f0f0f0 !important; }
[data-bs-theme="dark"] .text-muted { color: #CCCCCC !important; }
[data-bs-theme="dark"] .text-secondary { color: #CCCCCC !important; }
[data-bs-theme="dark"] .text-primary { color: #AECEFE !important; }
[data-bs-theme="dark"] .text-success { color: #AFD5C4 !important; }
[data-bs-theme="dark"] .text-info { color: #9eeaf9 !important; }
[data-bs-theme="dark"] .text-warning { color: #ffe69c !important; }
[data-bs-theme="dark"] .text-danger { color: #F5C2C5 !important; }
[data-bs-theme="dark"] .text-light { color: #f8f9fa !important; }
[data-bs-theme="dark"] .text-dark { color: #dee2e6 !important; }
[data-bs-theme="dark"] .text-white { color: #ffffff !important; }
/* END - Accessibility (WCAG AAA) Text Colors for Dark Mode    */



/***************************************************************/
/* Dark Mode: bg-light container text color overrides          */
/* bg-light in dark mode: lighter than body bg (#212529)       */
/***************************************************************/
[data-bs-theme="dark"] .bg-light { background-color: #2E3338 !important; color: #f0f0f0; }
[data-bs-theme="dark"] .bg-light .text-muted { color: #CCCCCC !important; }
[data-bs-theme="dark"] .bg-light.text-muted { color: #CCCCCC !important; }
/* END - Dark Mode bg-light text overrides */



/***************************************************************/
/*                Tom Select - Dark Mode Fixes                 */
/* tom-select_v2dot6.css hardcodes a DARK (#343a40) chevron    */
/* SVG for the single-select caret. In dark mode this dark     */
/* arrow, combined with the background shorthand reset applied */
/* on the active control (which resets background-repeat to    */
/* its "repeat" default), causes the caret to tile across the  */
/* control as a row of "vvvv" chevrons when clicked. We force  */
/* a single, light-stroked, non-repeating chevron and make the */
/* control/dropdown text light so it stays readable.           */
/***************************************************************/

/* Readable text for the control, its input, and the dropdown */
[data-bs-theme="dark"] .ts-control,
[data-bs-theme="dark"] .ts-control input,
[data-bs-theme="dark"] .ts-dropdown,
[data-bs-theme="dark"] .ts-dropdown .option,
[data-bs-theme="dark"] .ts-dropdown .active {
    color: var(--bs-body-color) !important;
}

/* Single, light-stroked, non-repeating caret chevron.
   !important + explicit repeat/position/size override the
   background shorthand reset applied on the active control. */
[data-bs-theme="dark"] .ts-wrapper.single .ts-control,
[data-bs-theme="dark"] .ts-wrapper.single.input-active .ts-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f0f0f0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
}
/* END - Tom Select Dark Mode Fixes */
/***************************************************************/



/****************************************************************************************/
/* Remove the dark border border that appears when clicking dropdowns within the navbar */
.nav-link.dropdown-toggle:focus,
.nav-link.dropdown-toggle:focus-visible {
    box-shadow: none !important;
}
/* END - remove the border from navbar */



/****************************************************************************************/
/* Subtle hover feedback for navbar items, as well as dropdown items.                   */
.dropdown-menu .dropdown-item.bg-primary:hover,
.dropdown-menu .dropdown-item.bg-primary:focus,
.nav-link.nav-hover-bg-darker:hover {
    background-color: #264a69 !important;
}
/* END - subtle background change for hovering over navbar items                        */
/****************************************************************************************/



/****************************************************************************************/
/* Subtle hover feedback for link-style buttons (e.g. the Case Services card buttons).  */
/* These buttons are transparent by default. On hover we very subtly shift the          */
/* background: slightly DARKER in light mode and slightly LIGHTER in dark mode. Using    */
/* translucent black/white keeps the effect subtle and preserves text contrast, so no   */
/* !important is needed (the theme-scoped selectors out-specify Bootstrap's .btn).       */
[data-bs-theme="light"] .btn-hover-subtle:hover,
[data-bs-theme="light"] .btn-hover-subtle:focus-visible {
    background-color: rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .btn-hover-subtle:hover,
[data-bs-theme="dark"] .btn-hover-subtle:focus-visible {
    background-color: rgba(255, 255, 255, 0.06);
}
/* END - subtle hover for link-style buttons                                            */
/****************************************************************************************/
