/* Application styles */
:root {
    --bs-primary-bg-subtle: #f0f0f0;
}
label[required]:after {
  content: ' *';
  color: red;
}
.navbar {
    margin-bottom: 0;
    background: black;
}
.link {
    color: white;
}
.btn-primary {
    color: white;
    border-color: white;
}
.svg-inline--fa {
    display:var(--fa-display,inline-block);
    height:1em;
    overflow:visible;
    vertical-align:-.125em;
}
.va-125 {
    vertical-align:-.125em;
}
.accordion-button-errors {
    background-color: #f8d7da !important;
    color: #58151c !important;
}
.accordion-actions {
    margin-left: auto;
}
.accordion-button.accordion-with-actions::after {
    margin-left: 10px;
}

.tab-body {
    border: 1px solid #dee2e6;
    min-height: 200px;
    padding: 20px;
}

.nav-link.active {
    background-color: #0d6efd !important;
    color: white !important;
}

.program-overview-card {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 24px;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
}

.overview-value {
    font-size: 60px;
    font-weight: bold;
}

.filter-outline {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding-top: 20px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
}

.truncate {
    display: block; /* or inline-block, depending on your layout */
    white-space: nowrap; /* Prevents the text from wrapping */
    overflow: hidden; /* Hide the overflow text */
    text-overflow: ellipsis; /* Add ellipsis (...) at the end of the truncated text */
    width: 100%; /* Adjust this as needed, can be a fixed width or percentage */
}

.toast {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 9999;
}

@keyframes bgHighlight {
    0% { background-color: rgba(201, 228, 240, 1); }
    100% { background-color: rgba(201, 228, 240, 0); }
  }
  
.highlight > td {
    animation-name: bgHighlight;
    animation-duration: 5s;
    animation-timing-function: ease-out;
}

.stepper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.step {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

.step .step-number {
    width: 20px;
    height: 20px;
    background-color: #ddd;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    margin-right: 10px;
}

.step.active .step-number {
    background-color: #007bff;
    color: white;
}

.step .step-label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-decoration: none !important;
}

.step-label > a {
    color: #333;
    text-decoration: none;
}

.background-light-blue {
    background-color: rgba(201, 228, 240, 1) !important;
}

.match-customer-header {
    position: sticky;
    top: 0;
    background-color: #fff !important; /* Ensure the fixed row has a solid background */
    z-index: 1; /* Ensure it stays above other content */
    border-collapse: none !important; /* Ensure it doesn't collapse */
}

.match-customer-header td {
    background-color: rgba(201, 228, 240, 1) !important;
}

.border-collapse-none {
    border-collapse: unset !important;
    border-spacing: 0 !important;
}

.grid {
    display: grid;
    gap: 10px; /* Optional: Adds some space between the grid items */
}

.pac-container{
    z-index: 9999;
}

.google-map{
    width:100%;
    height: 98vw;
    margin-top: 5px!important;
    max-height: 420px;
    margin-top: -10px;
}

.custom-map-control-button {
    background-color: #fff;
    border: 0;
    border-radius: 2px;
    box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3);
    margin: 10px;
    padding: 0 0.5em;
    font: 400 18px Roboto, Arial, sans-serif;
    overflow: hidden;
    height: 40px;
    cursor: pointer;
  }
  
  .custom-map-control-button:hover {
    background: #ebebeb;
  }

  input[readonly] {
    pointer-events: none;
  }

  label[readonly] {
    pointer-events: none;
  }

  .td-bottom-border  {
    padding: .5rem .5rem;
    color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));
    background-color: var(--bs-table-bg);
    border-bottom-width: var(--bs-border-width);
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
}

.disabled-link {
    pointer-events: none;
    cursor: default;
    color: gray;
    text-decoration: none;
}

.bordered{
    border: 2px solid #000;
}

.error-highlight {
    background-color: #ff6666 !important;
    transition: background-color 0.5s ease-in-out;
}

.form-check-visual-complete .form-check-input-lg {
    width: 1.3em;
    height: 1.3em;
    margin-top: 0.15em;
    background-size: contain;
}
  
.form-check-visual-complete .form-check-label {
    padding-left: 0.3em;
    transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
}
  
.form-check-visual-complete .form-check-input:checked + .form-check-label {
    color: var(--bs-success);
    opacity: 0.8;
}

.form-check-visual-complete .form-check-input:checked {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

.text-info-dark {
    color: #0caecf !important;
    text-decoration-color: #0caecf !important;
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 56px;
}

/* Sidebar base - dark theme */
.sidebar {
    width: var(--sidebar-width);
    background: black;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

/* Main content offset for sidebar */
.main-content-wrapper {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
}

/* Desktop: sidebar always visible */
@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }
}

/* Mobile: sidebar hidden by default, shown when body has .sidebar-open */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    /* Backdrop when sidebar is open on mobile */
    body.sidebar-open::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1029;
    }

    .main-content-wrapper {
        margin-left: 0;
    }
}

/* Sidebar logo */
.sidebar-logo {
    max-height: 40px;
    width: auto;
}

/* Nav section headers */
.nav-section-header {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    padding: 1rem 1rem 0.5rem 1rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

.nav-section-header:first-child {
    margin-top: 0;
}

/* Nav links styling */
.sidebar .nav-link {
    border-radius: 0;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
}

.sidebar .nav-link i {
    width: 1.25rem;
    text-align: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Sidebar scrollable nav area */
.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Sidebar dropdowns - use fixed positioning to escape overflow clipping */
.sidebar .nav-item.dropdown {
    position: static;
}

.sidebar .dropdown-menu {
    position: fixed !important;
    z-index: 1050;
    left: var(--sidebar-width) !important;
    transform: none !important;
    margin: 0 !important;
    min-width: 200px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Ensure sidebar nav doesn't clip dropdowns */
.sidebar-nav {
    overflow: visible;
}

.sidebar-content {
    overflow-y: auto;
    overflow-x: visible;
}

/* ========================================
   TOPBAR STYLES
   ======================================== */

.topbar {
    height: var(--topbar-height);
    z-index: 1020;
    background-color: #fff;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Mobile: full container width */
@media (max-width: 991.98px) {
    main.container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}