/* re-design */
:root {
    /* Default: Light Mode */
    --primary-color: #f9d25f;
    --primary-accent-color: #0B0B0B;
    --primary-color-2: #fff8dc;
    --logo-filter: invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(4.3%) contrast(100%);

    --correct-color: #B4C424;
    --incorrect-color: #E25822;
    /* This updates the utility classes like .text-success and .bg-danger */
    --bs-success-rgb: 180, 196, 36;
    /* RGB version of #B4C424 */
    --bs-danger-rgb: 226, 88, 34;
    /* RGB version of #E25822 */
    --bs-primary-rgb: 249, 210, 95;
    /* RGB version of #F9d25F */

    /* Update the hex values for specific components */
    --bs-success: var(--correct-color);
    --bs-danger: var(--incorrect-color);
    --bs-primary: var(--primary-color);
}

[data-theme="dark"] {
    /* Dark Mode Overrides */
    --primary-color: #0B0B0B;
    --primary-accent-color: #f9d25f;
    --primary-color-2: #2c2c2c;
    --logo-filter: invert(86%) sepia(20%) saturate(1400%) hue-rotate(-25deg) brightness(95%) contrast(89%);
}

* {
    padding: 0; margin: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    overflow: hidden;
}

.loading-overlay-container {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow-y: hidden;
}

.overlay-child {
    position: absolute;
    inset: 0;
}

.hidden {
    display: none !important;
}

#map-error {
    color: #f00;
}

#map-pending {
    background-color: rgba(0, 0, 0, 0.5);
}

#map-error, #map-pending {
    display: flex;
    justify-content: center;
    align-items: center;
}

.map {
    height: 100%;
    width: 100%;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.bg-site {
    background-color: #224abe !important;
}

/* .site-font-blue {
    color: #224abe !important;
} */

.container-fluid {
    padding: 0;
    padding-left: 0;
    padding-right: 0;
    border-top: 1px rgba(128, 128, 128, 0.1) solid;
	box-shadow: 0 .5rem 1rem rgba(0,0,0,.35) !important;
}

/* .sidebar-link:hover {
    opacity: 0.5;
}

.sidebar-link.active {
    font-weight: 500 !important;
}
.sidebar-link.active, .sidebar-link.active > i {
    color: white;
    opacity: 0.9;
} */
.chart-container {
  width: 100%;
  max-height: 400px;
  overflow-y: auto;
}
#userRolesContainer {
    padding-top: 0;
    padding-left: 1rem;
}

/* re-design */
body {
    background-color: #0B0B0B;
    background-image: none;
}

.sidebar .sidebar-link,
.sidebar .sidebar-brand {
    color: #E6C34A;
}

.topbar {
    background-color: #fff8dc;
}

.card {
    background-color: #0B0B0B;
    color: #E6C34A;
}

.site-font-blue {
    color: #E6C34A;
}

.btn-view-chart {
    border-color: #E6C34A;
    color: #E6C34A;
}

.btn-view-chart:hover,
.btn-view-chart:active,
.btn-view-chart:focus,
.btn-view-chart:focus-visible {
    background-color: #E6C34A;
    border-color: #0B0B0B;
    color: #0B0B0B;
    opacity: 0.75;
}

.btn-view-chart:hover,
.btn-view-chart:active {
    opacity: 0.75;
}

.btn-view-chart:focus,
.btn-view-chart:focus-visible {
    opacity: 1;
}

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

body > .footer {
    color: #E6C34A;
}

.fa-file-medical-alt::before,
.fa-file-waveform::before {
    /*clear the default icon/image */
    content: "" !important;
    display: inline-block;

    /*set the exact size you want (e.g., 40px image) */
    width: 40px;
    height: 40px;

    /*apply the image as a background */
    background-image: url('../img/logo_transp.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    filter: var(--logo-filter);

    /*alignment with text */
    vertical-align: middle;
    margin-right: 5px;
}

.sidebar .sidebar-link,
.sidebar .sidebar-brand {
    color: var(--primary-accent-color);
}

.sidebar .sidebar-brand .sidebar-brand-icon {
    transform: rotate(0deg);
}

.sidebar-brand-text.mx-3 {
    margin-left: 0 !important;
}

/* Toggle Container */
.theme-toggle {
    --toggle-h: 20px;
    --toggle-w: 40px;
    --knob-size: 14px;
    /* Slightly smaller for a "floating" look */
    --bg-light: #e0e0e050;
    --bg-light-hover: #e0e0e07c;
    --bg-dark: #33333388;
    --bg-dark-hover: #333333b2;

    position: relative;
    display: inline-block;
    width: var(--toggle-w);
    height: var(--toggle-h);
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The Slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-dark);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--toggle-h);
}

.slider:hover {
    background-color: var(--bg-dark-hover);
}

input:checked+.slider {
    background-color: var(--bg-light);
}

input:checked+.slider:hover {
    background-color: var(--bg-light-hover);
}

/* The Circle (Sun/Moon) */
.slider:before {
    content: "";
    position: absolute;
    height: var(--knob-size);
    width: var(--knob-size);
    left: 3px;
    top: 3px;
    background-color: white;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked+.slider:before {
    background-color: #f1c40f;
    /* Calculation: TotalWidth - KnobSize - (LeftMargin * 2) */
    /* 40 - 14 - 6 = 20px */
    transform: translateX(20px);
}