/* ==================================================
   ROOT VARIABLES
================================================== */
:root {
    --cvs-teal: #00928F;
    --cvs-teal-dark: #2D7D7B;
    --cvs-teal-light: #48B0AE;
    --cvs-teal-rgb: 54, 151, 149;
    --cvs-white-fade: rgba(255, 255, 255, 0.5);
	--cvs-cool-gray: #63666B;
	--cvs-warm-gray: #D8CFC6;
    --cvs-logo: #FFFFFF;
    --logo-size: 28px;
    --dot-diameter: 7px;
	--widget-bg: #FFFFFF;
    --widget-stripe: rgba(189, 189, 189, 0.1);
}

body {
	font-family: "Ubuntu", sans-serif;
}

[data-bs-theme='dark'] {
    /* Adjust these for a professional dark EHR look */
    --widget-bg: #212529; 
    --widget-stripe: rgba(0, 0, 0, 0.2);
}

/* ==================================================
   DATATABLES
================================================== */
.dataTables_scrollHead table {
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

thead th {
    font-size: 10pt;
    font-weight: 400;
    border-bottom: 1px solid #00928F !important;
    box-shadow: none !important;
}

tbody tr:first-child td {
    border-top: none !important;
}
tbody tr td {
    font-size: 10pt;
}

/* ==================================================
   UBUNTU FONT
================================================== */
.ubuntu-light {
  font-family: "Ubuntu", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.ubuntu-regular {
  font-family: "Ubuntu", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.ubuntu-medium {
  font-family: "Ubuntu", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.ubuntu-bold {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.ubuntu-light-italic {
  font-family: "Ubuntu", sans-serif;
  font-weight: 300;
  font-style: italic;
}

.ubuntu-regular-italic {
  font-family: "Ubuntu", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.ubuntu-medium-italic {
  font-family: "Ubuntu", sans-serif;
  font-weight: 500;
  font-style: italic;
}

.ubuntu-bold-italic {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-style: italic;
}

/* ==================================================
   NAVBAR BASE
================================================== */

.navbar-custom {
    background-color: var(--cvs-teal);
    display: flex;
    align-items: center;
    padding: 0;
	height: 52px;	
}

/* Force consistent navbar height */
.custom-nav {
    height: 52px;	
}
.widgetColumn {
    /* The first gradient is the stripe texture, the second is the solid background */
    background-image: 
        repeating-linear-gradient(
            135deg, 
            var(--widget-stripe) 0px, 
            var(--widget-stripe) 2px,
            transparent 2px, 
            transparent 4px
        ),
        linear-gradient(
            90deg, 
            var(--widget-bg), 
            var(--widget-bg)
        );
    
    /* Optional: Add a subtle border to define the column in dark mode */
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-image 0.3s ease; /* Smooth transition when toggling */
}
/* ==================================================
   NAV ITEMS
================================================== */

.custom-nav .nav-link,
.custom-nav .theme-toggle-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.875rem;
    line-height: 1;
    color: var(--cvs-white-fade);
    text-decoration: none;
    white-space: nowrap;
}

/* Hover + Active States */
.custom-nav .nav-link:hover,
.custom-nav .nav-link.active,
.custom-nav .theme-toggle-btn:hover {
    color: #D8CFC6;
}

/* ==================================================
   ICONS
================================================== */

.custom-nav .nav-link i,
.custom-nav .theme-toggle-btn i {
    display: block;
    font-size: 1rem;
    line-height: 1;
    margin-bottom: 4px;
}

.nav-link {
	width: 60px;
}
.nav-link span {
    font-size: 0.75rem;   /* change to whatever size you want */
}
/* ==================================================
   THEME TOGGLE BUTTON
================================================== */

.theme-toggle-btn {
    border: none;
    background: none;
    box-shadow: none;
}

.theme-toggle-btn:focus,
.theme-toggle-btn:active {
    outline: none;
    box-shadow: none;
}


/* ==================================================
   DIVIDER
================================================== */

.border-start {
    border-color: rgba(255, 255, 255, 0.2) !important;
    height: 30px;
    align-self: center;
}

/* ==================================================
   CUSTOM BUTTONS
================================================== */

.btn-azccc {
    --bs-btn-bg: var(--cvs-teal);
    --bs-btn-border-color: var(--cvs-teal);
    --bs-btn-hover-bg: var(--cvs-teal-dark);
    --bs-btn-hover-border-color: var(--cvs-teal-dark);
    --bs-btn-focus-shadow-rgb: var(--cvs-teal-rgb);
	color: #fff;
}

/* ==================================================
   FORM FOCUS
================================================== */

.form-control:focus,
.form-select:focus {
    border-color: var(--cvs-teal-light);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(var(--cvs-teal-rgb), 0.25);
}

/* ==================================================
   BRAND / LOGO
================================================== */

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
}

.logo-wrapper,
.logo-grid-icon {
    width: var(--logo-size);
    height: var(--logo-size);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo {
    position: relative;
    width: 0;
    height: 0;
}

.logo .center {
    position: absolute;
    width: var(--dot-diameter);
    height: var(--dot-diameter);
    background-color: var(--cvs-logo);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.logo .arm {
    position: absolute;
    width: 2px;
    height: calc(var(--logo-size) / 6);
    background-color: var(--cvs-logo);
    left: -1px;
    transform-origin: top center;
    transform: rotate(calc(var(--i) * 45deg))
               translateY(calc(var(--dot-diameter) / 2));
}

.logo .arm::after {
    content: '';
    position: absolute;
    width: var(--dot-diameter);
    height: var(--dot-diameter);
    background-color: var(--cvs-logo);
    border-radius: 50%;
    bottom: calc(var(--dot-diameter) * -1);
    left: 50%;
    transform: translateX(-50%);
}

.logo-text {
	font-family: "Nunito Sans", sans-serif;
	font-size: 21pt;
	letter-spacing: -0.9px;
	color: var(--cvs-logo);
}

/* ==================================================
   UTILITIES
================================================== */

.flex-1 {
    flex: 1;
}

/* ==================================================
   WIDGETS (Audited & Optimized)
================================================== */
.widget-title {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cvs-teal);
}

[data-bs-theme="dark"] .widget-title {
    color: var(--cvs-teal-light);
}

.widget-timestamp {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

/* 2x2 Grid Layout */
.ios-widget-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden; /* Keeps borders contained */
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto; /* Locks header to its own height */
    width: 100%;
}

/* This is the magic container that fills the rest of the card */
.widget-stats-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    flex: 1; /* Takes up all remaining vertical space */
    width: 100%;
    gap: 0;
    margin: auto 0; /* Centers the grid vertically within the flex space */
}

.stat-item {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers numbers vertically inside their cell */
    align-items: center;    /* Centers numbers horizontally */
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* Precision "+" Borders */
.stat-item:nth-child(odd) {
    border-right: 1px solid rgba(128, 128, 128, 0.15);
}

.stat-item:nth-child(1),
.stat-item:nth-child(2) {
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}


.stat-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 100; /* Ultra-light weight */
    color: var(--bs-emphasis-color);
    letter-spacing: -0.5px;
    line-height: 1;
    margin-bottom: 4px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    color: var(--cvs-teal);
}

/* Glassmorphism & Card Style */
.card.widgetColumn {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease;
}

[data-bs-theme="dark"] .card.widgetColumn {
    background: rgba(33, 37, 41, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Pulse Animation for update element*/
.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #28a745;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0px rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0px rgba(40, 167, 69, 0); }
}

/* Sonar Animation for leaflet markers */
.pulse-wrapper {
    position: relative;
    overflow: visible; 
}

.marker-shared-active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 1;
    background-color: currentColor; 
    animation: sonar-pulse 2s infinite;
    pointer-events: none;
}

@keyframes sonar-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    70% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Bootstrap themed popups */
/* Spinner Container */
#map-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Frosted glass effect */
    padding: 2rem;
    border-radius: 1rem;
    background-color: rgba(var(--bs-body-bg-rgb), 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--bs-border-color-translucent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    /* Smooth fade out */
    transition: opacity 0.4s ease, visibility 0.4s;
    pointer-events: none; /* Prevents blocking map clicks while fading */
}

/* Spinner Animation Thickness */
.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.25em;
}

.leaflet-popup-content-wrapper {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
	width: 320px;
}

.leaflet-popup-tip {
    background: var(--bs-body-bg);
}
/* Align checkbox and text vertically */
.leaflet-control-layers-overlays label {
    display: flex !important;
    align-items: center !important; /* This does the vertical centering */
    gap: 10px; /* Provides consistent space between box and text */
    margin-bottom: 6px;
    cursor: pointer;
    color: var(--bs-body-color);
	line-height: 0.5 !important;
}
.leaflet-control-layers-overlays span {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}
/* Fix for the checkbox itself to prevent it from shifting */
.leaflet-control-layers-selector {
    margin: 0 !important;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    cursor: pointer;
	margin-right: 6px !important;
	line-height: 1 !important;
	accent-color: #369795;
}

/* Ensure the text spans don't have extra padding */
.leaflet-control-layers-overlays span {
    display: inline-block;
    line-height: 1; /* Keeps text height tight to the font size */
}

/* 3. Ensure the container background is clean */
#layersContainer {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}
/* 1. Ensure the popup content can use the full width */
.leaflet-popup-content {
    width: 100% !important;
    margin: 12px 0 !important;
    padding: 0 12px; /* Small side-breathing room */
    box-sizing: border-box;
}

/* 2. Container: Force a 2-column grid */
.badge-container {
    display: grid !important;
    /* This creates 2 columns of exactly equal width */
    grid-template-columns: 1fr 1fr !important; 
    gap: 8px !important;    /* Space between columns and rows */
    width: 100% !important;
    margin-top: 15px !important;
}

/* 3. Badges: Fill the grid slots identically */
.division-badge {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;   /* Fill the grid cell */
    padding: 2px 4px !important;
    
    text-align: center !important;
    font-size: 0.65rem !important; /* Slightly smaller to fit "Gynecologic Oncology" */
    font-weight: 700 !important;
    color: white !important;
    border-radius: 50px !important;
    box-sizing: border-box !important;
    
    /* Prevent text from breaking the uniform box */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.division-badge:last-child:nth-child(odd) {
    grid-column: span 2;
}

.ios-widget-content {
    padding: 0.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

#secretToggle {
	transition: opacity 0.2s ease-in-out;
}

/* SIDE MENU STYLIN */
.nav-label {
    font-weight: 100;
    letter-spacing: -0.3px;
}

.nav-item {
    font-weight: 100;
    letter-spacing: -0.3px;
}

.accordion-button:not(.collapsed) .nav-label {
    font-weight: 100;
}
/* 1. Remove default Bootstrap UI artifacts */
#sidebarAccordion .accordion-button::after {
    display: none;
}

/* 2. Base Interaction Styling */
#sidebarAccordion .accordion-button,
#sidebarAccordion .nav-link {
    background: transparent !important;
    color: inherit !important;
    transition: color .2s ease;
}

/* 3. Global Interaction State (Hover & Active) */
#sidebarAccordion .accordion-button:hover,
#sidebarAccordion .accordion-button:not(.collapsed),
#sidebarAccordion .nav-link:hover,
#sidebarAccordion .nav-link.active {
    color: #00928F !important;
    box-shadow: none;
}

/* 4. Caret (Chevron) Logic */
#sidebarAccordion .accordion-caret {
    transition: transform .2s ease;
    /* color: inherit; already handled by parent */
}

/* Rotate caret when open */
#sidebarAccordion .accordion-button:not(.collapsed) .accordion-caret {
    transform: rotate(90deg);
}

/* 5. Sidebar Layout Integrity */
#sidebarAccordion .nav-link {
    white-space: nowrap;
    overflow: hidden;
	width: 240px;
}

#sidebarAccordion .nav-link.active {
    color: #00928F;
	box-shadow: none;
}


/* SORT THIS SHIT OUT */
body, main {
    overflow: hidden !important;
}

/* Ensure the table container is the only scrollable area */
.flex-grow-1.overflow-auto {
    scrollbar-gutter: stable; /* Prevents layout jump when scrollbar appears */
}
/* Remove Bootstrap default caret */
#sidebarAccordion .accordion-button::after{
    display:none;
}

/* Base accordion button styling */
#sidebarAccordion .accordion-button{
    color:var(--bs-body-color);
    background:transparent;
}

/* Hover state */
#sidebarAccordion .accordion-button:hover{
    color:#00928F;
}

/* Expanded state */
#sidebarAccordion .accordion-button:not(.collapsed){
    color:#00928F;
}

/* Caret styling */
#sidebarAccordion .accordion-caret{
    transition:transform .2s ease;
    color:var(--bs-body-color);
}

/* Rotate caret + color when open */
#sidebarAccordion .accordion-button:not(.collapsed) .accordion-caret{
    transform:rotate(90deg);
    color: #00928F;
}

/* Nav link styling */
#sidebarAccordion .nav-link {
	width: 200px;
    color: var(--bs-body-color);
    white-space: nowrap; /* Prevents text from dropping to the next line */
    overflow: hidden;    /* Prevents text from overlapping the table if too long */
}

#sidebarAccordion .nav-link:hover{
    color:#00928F;
}

#sidebarAccordion .nav-link.active{
    color:#00928F;
}
.command-bar a{
    text-decoration: none;
    color: var(--bs-body-color);
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .4rem;
}

.command-bar a:hover{
    color: #00928F;
}
.breadcrumb a{
	font-size: .85rem;
    text-decoration: none;
    color: inherit;
}

.breadcrumb-item.active {
    color: #00928F;
}
/* Ensure the table header stays pinned and opaque */
.sticky-top {
    position: sticky;
    top: -1px;
    background-color: transparent !important; /* Match your dark theme background exactly */
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.1); /* Subtle bottom border */
}

/* Optional: Make the scrollbar thin and dark to match your UI */
.overflow-auto::-webkit-scrollbar {
    width: 6px;
	
}
.overflow-auto::-webkit-scrollbar-track {
    background: transparent;
}
.overflow-auto::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
.scroll-container {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    height: 100%;
}

.table thead, 
.table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.table tbody {
    display: block;
    height: calc(100vh - 242px); 
    overflow-y: auto;
    width: 100%;
}

.table thead {
    position: relative;
    background-color: var(--bs-body-bg);
}

.table th:nth-child(1), .table td:nth-child(1) { width: 50px; }

.bg-azccc {
	background-color: #00928F; 
	color: #fff;
}
/* Custom Checkbox Styling */
.form-check-input:checked {
    background-color: #00928F;
    border-color: #00928F;
}

.form-check-input:focus {
    border-color: #00928F;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(0, 146, 143, 0.25); /* Subtle glow using your color */
}

.form-check-input:active {
    filter: brightness(90%); /* Darkens slightly when clicked */
}

/* Optional: Style for the indeterminate state (if you use it for "Select All") */
.form-check-input:indeterminate {
    background-color: #00928F;
    border-color: #00928F;
}
/* Highlight selected rows slightly */
.table-active {
    background-color: rgba(0, 146, 143, 0.1) !important;
}

/* Ensure your custom teal checkboxes apply to the header too */
#selectAll:checked {
    background-color: #00928F;
    border-color: #00928F;
}

.action-col{
    width: 50px;
    min-width: 50px;
    text-align: center;
}

select option {
    background-color: transparent !important;
    color: var(--bs-body-color) !important;
}

select option[disabled] {
    color: var(--bs-body-color) !important;
	font-size: 0.8rem;
}

/* Hide scrollbars but allow scrolling */
.flex-grow-1 {
    overflow: auto;                 /* enable scrolling */
    -ms-overflow-style: none;       /* IE & Edge */
    scrollbar-width: none;          /* Firefox */
    -webkit-overflow-scrolling: touch; /* smooth iOS scrolling */
}

/* Chrome, Safari, Opera */
.flex-grow-1::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.flex-grow-1 tbody {
    display: block;
    overflow-y: auto;
    -ms-overflow-style: none; 
    scrollbar-width: none;
}

.flex-grow-1 tbody::-webkit-scrollbar {
    width: 0;
}

.flex-grow-1 thead, .flex-grow-1 tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

#resetTableBtn {
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: color 0.2s ease-in-out;
}

/* Specific hover color for Reset */
#resetTableBtn:hover {
    color: #00928F !important;
    text-decoration: none;
}

/* Optional: Slight dimming for the Birdeye link when truly disabled */
#birdeyeUploadLink.disabled {
    color: #6c757d !important;
    opacity: 0.5;
}

#chart-wrapper {
    height: calc(100vh - 50px); /* Adjust '150px' to account for your header/controls */
    width: 100%;
    overflow: hidden;
}

#chart {
    height: 100%;
    width: 100%;
}

.custom-apex-legend {
    position: fixed !important; /* Locks it to the viewport */
    bottom: 14px;               /* Stays 20px up from the very bottom */
    left: 16.6666%;             /* Matches the start of a Bootstrap col-10 */
    right: 0;                   /* Extends to the right edge */
    width: 83.3333%;            /* Explicitly set to the width of col-10 */
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px;
    backdrop-filter: blur(5px);        /* Adds a touch of glassmorphism */
    z-index: 9999;                     /* Ensures it stays above the chart SVG */
    font-family: "Ubuntu", sans-serif;
    font-size: 13px;
}

.legend-item {
    display: flex;
    align-items: center;
    white-space: nowrap; /* Prevents text from breaking mid-sentence */
    cursor: pointer;
    transition: opacity 0.2s;
}

.legend-item:hover {
    opacity: 0.8;
}

.legend-marker {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 10px;
    display: inline-block;
}

.disabled-link {
  opacity: 0.5;
  pointer-events: none; /* Prevents clicking */
  cursor: not-allowed;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

/* Target the anchor tags within that specific container */
.d-flex.gap-3 a.text-muted {
    transition: color 0.2s ease-in-out;
    text-decoration: none; /* Removes underline if any */
}

/* Change color on hover */
.d-flex.gap-3 a.text-muted:hover {
    color: #00928F !important;
}

/* Optional: Handle the disabled link so it doesn't show the hover color */
.d-flex.gap-3 a.disabled-link:hover {
    color: inherit !important;
    cursor: not-allowed;
}