﻿/*
 * Restores Bootstrap 5 default blue (#0d6efd) overridden by DevExpress Office White theme.
 *
 * WHY THIS FILE EXISTS (instead of editing office-white.bs5.css directly):
 *   - office-white.bs5.css is a vendor-generated file ("Do not edit directly").
 *   - Any DevExpress upgrade overwrites it, wiping out manual changes.
 *   - Keeping overrides in a separate file survives upgrades and keeps the
 *     vendor CSS pristine.
 *
 * Load order: this file MUST load AFTER office-white.bs5.min.css in index.html
 * so its rules win the cascade for the selectors below.
 *
 * Coverage by component:
 *   1. :root                  — primary, link, emphasis/subtle variables
 *   2. Buttons                — .btn-primary, .btn-outline-primary, .btn-link
 *   3. Progress               — .progress bar fill
 *   4. Form checks            — .form-check-input (checked, indeterminate, focus)
 *   5. Form range             — .form-range slider thumbs
 *   6. Form select            — .form-select:focus
 *   7. Form control           — .form-control:focus (late !important override)
 *   8. Select options         — select.form-control > option:checked
 *   9. Accordion              — .accordion focus & active-icon
 *  10. Dropdown               — .dropdown-menu, .dropdown-menu-dark active-bg
 *  11. Pagination             — .pagination active & focus
 *  12. Nav pills              — .nav-pills active-bg
 *  13. List group             — .list-group active
 *  14. Nav tabs               — .nav-tabs active underline
 *  15. Dark theme             — [data-bs-theme=dark] emphasis/subtle vars
 */

/* ==========================================================================
   1. ROOT-LEVEL CSS VARIABLES
   ========================================================================== */

:root {
    /* Primary brand */
    --bs-primary: #0d6efd;
    --bs-primary-rgb: 13, 110, 253;

    /* Link colors */
    --bs-link-color: #0d6efd;
    --bs-link-color-rgb: 13, 110, 253;
    --bs-link-hover-color: #0a58ca;

    /* Emphasis / subtle / border — derived accent colors.
       These feed .alert-primary, .table-primary, .bg-primary-subtle,
       .text-primary-emphasis, .border-primary-subtle, .accordion, etc. */
    --bs-primary-text-emphasis: #052c65;
    --bs-primary-bg-subtle: #cfe2ff;
    --bs-primary-border-subtle: #9ec5fe;
}

/* ==========================================================================
   2. BUTTONS
   ========================================================================== */

/* --- Solid primary (.btn-primary) --- */
.btn-primary {
    --bs-btn-bg: #0d6efd;
    --bs-btn-border-color: #0d6efd;
    --bs-btn-hover-bg: #0b5ed7;
    --bs-btn-hover-border-color: #0a58ca;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-bg: #0a58ca;
    --bs-btn-active-border-color: #0a53be;
    --bs-btn-disabled-bg: #0d6efd;
    --bs-btn-disabled-border-color: #0d6efd;
}

/* --- Outline primary (.btn-outline-primary) --- */
.btn-outline-primary {
    --bs-btn-color: #0d6efd;
    --bs-btn-border-color: #0d6efd;
    --bs-btn-hover-bg: #0d6efd;
    --bs-btn-hover-border-color: #0d6efd;
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-bg: #0d6efd;
    --bs-btn-active-border-color: #0d6efd;
    --bs-btn-disabled-color: #0d6efd;
    --bs-btn-disabled-border-color: #0d6efd;
}

/* --- Link button (.btn-link) — used by ManagementTray sort icons --- */
.btn-link {
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
}

/* ==========================================================================
   3. PROGRESS BAR
   ========================================================================== */

.progress {
    --bs-progress-bar-bg: #0d6efd;
}

/* ==========================================================================
   4. FORM CHECKS — .form-check-input
   ========================================================================== */

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input[type="checkbox"]:indeterminate {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ==========================================================================
   5. FORM RANGE — slider thumb
   ========================================================================== */

.form-range::-webkit-slider-thumb {
    background-color: #0d6efd;
}

.form-range::-webkit-slider-thumb:active {
    background-color: #b6d4fe;
}

.form-range::-moz-range-thumb {
    background-color: #0d6efd;
}

/* ==========================================================================
   6. FORM SELECT — .form-select:focus
   ========================================================================== */

.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ==========================================================================
   7. FORM CONTROL — .form-control:focus (late !important override)
   ========================================================================== */

.form-control:focus {
    border-color: #86b7fe !important;
}

/* ==========================================================================
   8. SELECT OPTION CHECKED
   ========================================================================== */

select.form-control > option:checked {
    background-color: #0d6efd;
}

/* ==========================================================================
   9. ACCORDION
   ========================================================================== */

.accordion {
    --bs-accordion-btn-focus-border-color: #86b7fe;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23052c65'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* ==========================================================================
   10. DROPDOWN — .dropdown-menu & .dropdown-menu-dark
   ========================================================================== */

.dropdown-menu {
    --bs-dropdown-link-active-bg: #0d6efd;
}

.dropdown-menu-dark {
    --bs-dropdown-link-active-bg: #0d6efd;
}

/* ==========================================================================
   11. PAGINATION
   ========================================================================== */

.pagination {
    --bs-pagination-active-bg: #0d6efd;
    --bs-pagination-active-border-color: #0d6efd;
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ==========================================================================
   12. NAV PILLS
   ========================================================================== */

.nav-pills {
    --bs-nav-pills-link-active-bg: #0d6efd;
}

/* ==========================================================================
   13. LIST GROUP
   ========================================================================== */

.list-group {
    --bs-list-group-active-bg: #0d6efd;
    --bs-list-group-active-border-color: #0d6efd;
}

/* ==========================================================================
   14. NAV TABS — active indicator underline
   ========================================================================== */

.nav-tabs .nav-link.active::before {
    border-bottom-color: #0d6efd;
}

/* ==========================================================================
   15. DARK THEME — emphasis / subtle / border for [data-bs-theme="dark"]
   ========================================================================== */

[data-bs-theme="dark"] {
    --bs-primary-text-emphasis: #6ea8fe;
    --bs-primary-bg-subtle: #031633;
    --bs-primary-border-subtle: #084298;
}
