/*
 * Brand color override for the DashUI admin theme.
 * Repoints the theme's "primary" color to the GoMedAid brand green (#0B8A34),
 * without modifying the vendor theme.min.css file. Must be loaded after
 * theme.min.css so these rules win the cascade.
 */

/* ---- CSS custom properties (drive nav links, borders, alerts, etc.) ---- */
:root,
[data-bs-theme=light] {
    --dashui-primary: #0b8a34;
    --dashui-primary-rgb: 11, 138, 52;
    --dashui-primary-text: #086426;
    --dashui-primary-bg-subtle: #e9fcef;
    --dashui-primary-border-subtle: #c4f8d5;
    --dashui-link-color: #0b8a34;
    --dashui-link-color-rgb: 11, 138, 52;
    --dashui-link-hover-color: #086426;
    --dashui-link-hover-color-rgb: 8, 100, 38;
}

[data-bs-theme=dark] {
    --dashui-primary-text: #5ae286;
    --dashui-primary-bg-subtle: #0b2d16;
    --dashui-primary-border-subtle: #164b27;
    --dashui-link-color: #5ae286;
    --dashui-link-hover-color: #92e8ad;
    --dashui-link-color-rgb: 90, 226, 134;
    --dashui-link-hover-color-rgb: 146, 232, 173;
}

/* Theme's own light/dark toggle (separate from Bootstrap's [data-bs-theme]) */
[data-theme=dark] {
    --dashui-primary: #0b8a34;
}

/* ---- Sidebar: rounded "pill" highlight behind the active nav item ---- */
.navbar-vertical .navbar-nav .nav-item .nav-link {
    border-radius: .5rem;
    margin: 0 .75rem;
    width: auto;
}

.navbar-vertical .navbar-nav .nav-item .nav-link.active {
    background-color: var(--dashui-primary-bg-subtle);
}

/* ---- Components that bake the primary color in as static hex values ---- */

.table-primary {
    --dashui-table-bg: #e9fcef;
    --dashui-table-border-color: #c4f8d5;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 .25rem rgba(11, 138, 52, .25);
}

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

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

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px #f1f5f9, 0 0 0 .25rem rgba(11, 138, 52, .25);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px #f1f5f9, 0 0 0 .25rem rgba(11, 138, 52, .25);
}

.form-range::-webkit-slider-thumb,
.form-range::-moz-range-thumb {
    background-color: #0b8a34;
}

.btn-primary {
    --dashui-btn-bg: #0b8a34;
    --dashui-btn-border-color: #0b8a34;
    --dashui-btn-hover-bg: #096e29;
    --dashui-btn-hover-border-color: #06511f;
    --dashui-btn-focus-shadow-rgb: 51, 157, 87;
    --dashui-btn-active-bg: #06511f;
    --dashui-btn-active-border-color: #043b17;
    --dashui-btn-disabled-bg: #0b8a34;
    --dashui-btn-disabled-border-color: #0b8a34;
}

.btn-outline-primary {
    --dashui-btn-color: #0b8a34;
    --dashui-btn-border-color: #0b8a34;
    --dashui-btn-hover-bg: #0b8a34;
    --dashui-btn-hover-border-color: #0b8a34;
    --dashui-btn-focus-shadow-rgb: 11, 138, 52;
    --dashui-btn-active-bg: #0b8a34;
    --dashui-btn-active-border-color: #0b8a34;
    --dashui-btn-disabled-color: #0b8a34;
    --dashui-btn-disabled-border-color: #0b8a34;
}

.nav-pills {
    --dashui-nav-pills-link-active-bg: #0b8a34;
}

.pagination {
    --dashui-pagination-focus-box-shadow: 0 0 0 .25rem rgba(11, 138, 52, .25);
    --dashui-pagination-active-bg: #0b8a34;
    --dashui-pagination-active-border-color: #0b8a34;
}

.progress,
.progress-stacked {
    --dashui-progress-bar-bg: #0b8a34;
}

.list-group {
    --dashui-list-group-active-bg: #0b8a34;
    --dashui-list-group-active-border-color: #0b8a34;
}

.btn-close {
    --dashui-btn-close-focus-shadow: 0 0 0 .25rem rgba(11, 138, 52, .25);
}

.accordion {
    --dashui-accordion-btn-focus-box-shadow: 0 0 0 .25rem rgba(11, 138, 52, .25);
    --dashui-accordion-btn-active-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23086426'%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");
}

.text-bg-primary {
    background-color: rgba(11, 138, 52, var(--dashui-bg-opacity, 1)) !important;
}

.link-primary {
    color: #0b8a34 !important;
}

.link-primary:focus,
.link-primary:hover {
    color: #086426 !important;
}

.bg-primary {
    background-color: #0b8a34 !important;
}

.bg-primary-soft {
    background-color: rgba(11, 138, 52, .3) !important;
}

[data-theme=dark] .btn-primary {
    --dashui-btn-bg: #0b8a34;
    --dashui-btn-border-color: #0b8a34;
    --dashui-btn-hover-bg: #096e29;
    --dashui-btn-hover-border-color: #06511f;
    --dashui-btn-focus-shadow-rgb: 51, 157, 87;
    --dashui-btn-active-bg: #06511f;
    --dashui-btn-active-border-color: #043b17;
    --dashui-btn-disabled-bg: #0b8a34;
    --dashui-btn-disabled-border-color: #0b8a34;
}

[data-theme=dark] .bg-primary {
    background-color: #0b8a34 !important;
}

[data-theme=dark] .text-primary {
    color: #5ae286 !important;
}

.avatar-primary .avatar-initials {
    background-color: #0b8a34;
}

.btn-dashed:hover {
    border-color: #0b8a34 !important;
    color: #0b8a34 !important;
}

.btn-primary-soft {
    background-color: rgba(11, 138, 52, .1);
    color: #0b8a34;
}

.btn-primary-soft:hover {
    background-color: rgba(11, 138, 52, .9) !important;
    border-color: rgba(11, 138, 52, .9) !important;
}

.badge-primary-soft {
    background-color: rgba(11, 138, 52, .1);
    color: #0b8a34;
}

.choices[data-type*=select-one] .choices__button:focus {
    box-shadow: 0 0 0 2px #0b8a34;
}

.choices__list--multiple .choices__item {
    background-color: #0b8a34;
    border-color: #075b22;
}

/* ---- Sidebar "Need Help" card ---- */
.sidebar-help-card {
    background-color: var(--dashui-card-background);
    border: 1px solid var(--dashui-border-color);
    border-radius: .75rem;
    padding: .875rem 1rem;
}

/* ---- Executive Dashboard cards ---- */
.exec-card {
    border-radius: .875rem;
    border: none;
}

.needs-attention-chip {
    transition: background-color .15s ease-in-out;
}

.needs-attention-chip:hover {
    background-color: var(--dashui-gray-100);
}

/* ---- Executive Dashboard header date-range control ---- */
.exec-date-range {
    background-color: var(--dashui-card-background);
    color: var(--dashui-headings-color);
    box-shadow: none !important;
}

.exec-date-range:hover,
.exec-date-range:focus {
    background-color: var(--dashui-card-background);
    box-shadow: none !important;
}

#execDateRangeChevron {
    transition: transform .15s ease-in-out;
}

.exec-date-range-panel {
    z-index: 1050;
    width: 230px;
    background-color: var(--dashui-card-background);
    border: 1px solid var(--dashui-border-color);
}

/* This theme's Bootstrap build omits the min-w-0 utility, needed so flex
   children (e.g. truncated labels) shrink instead of overflowing their column. */
.min-w-0 {
    min-width: 0 !important;
}
