/*
In this file we override some Bootstrap default styles to better fit our application's design requirements.
In general, only override Bootstrap styles when absolutely necessary.
Never add general padding or margin to Bootstrap classes as it makes them hard to use consistently, stick to colors, fonts and the like.

I use colors from https://getbootstrap.com/docs/5.3/customize/color/ to keep things consistent.
Since we do not compile sass we need to define the colors :(
*/
:root {
    --bs-blue: #084298; /* $blue-700 */
}

.form-check.form-switch > .form-check-label {
    font-size: 0.8rem;
}

[data-bs-theme="light"] {
    --bs-link-color: var(--bs-blue);
    --bs-link-color-rgb: 8, 66, 152; /* $blue-700 */
}

[data-bs-theme="dark"] {
    --sidebar-header-bg: var(--bs-secondary-bg);
    .btn-outline-dark { /* pls do not do this kind of stuff elsewhere, this is a bandaid, dark button in dark modes becomes invisible, copied css from 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-focus-shadow-rgb: 248,249,250;
        --bs-btn-active-color: #000;
        --bs-btn-active-bg: #f8f9fa;
        --bs-btn-active-border-color: #f8f9fa;
        --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
        --bs-btn-disabled-color: #f8f9fa;
        --bs-btn-disabled-bg: transparent;
        --bs-btn-disabled-border-color: #f8f9fa;
        --bs-gradient: none;
    }
}

/* CSS overrides from different libraries, tablesorter, select2, etc */

[data-bs-theme="dark"] {
    .select2-selection, .select2-selection, .select2-dropdown{
        background-color: var(--bs-body-bg);
    }
    .select2-results__option[aria-selected="true"]{
     background-color: var(--bs-tertiary-bg);
    }
    .select2-selection__choice {
        background-color: var(--bs-secondary-bg) !important;
    }
    .select2-selection__rendered{
        color: var(--bs-body-color) !important;
    }
}

.form-check-input:checked {
    background-color: var(--bs-blue);
    border-color: var(--bs-blue);
}

.tablesorter {
    border-color: var(--bs-table-border-color) !important;
}

/* Remove underline from links that do not have a class assigned
Maybe remove this, it is only here to preserve the visuals from before bootstrap upgrade*/
a:not([class]) {
    text-decoration: none;
}
a:not([class]):hover {
    text-decoration: underline;
}