/* GLOBAL STYLES
-------------------------------------------------- */
/* Padding below the footer and lighter body text */

body {
    padding-bottom: 40px;
    color: #5a5a5a;
    background-image: linear-gradient(to bottom, #FFFFF3 0%, #FFFFEA 100%);
}

/* CUSTOMIZE THE NAVBAR
-------------------------------------------------- */

.navbar-wrapper > .container {
    padding-right: 0;
    padding-left: 0;
}
.navbar-wrapper .navbar {
    padding-right: 15px;
    padding-left: 15px;
}
.navbar-wrapper .navbar .container {
    width: auto;
}

/* Private navbar (tan/default) */
.navbar-private {
    background-color: #DDDFBE;
    border-bottom: 2px solid #8C241F;
}

.navbar-private .navbar-brand {
    color: #8C241F;
}

.navbar-logo-private {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.navbar-private .navbar-text {
    color: #8C241F;
}

.navbar-private .navbar-nav .nav-link {
    color: #8C241F;
}

/* Public navbar (dark red/inverse) */
.navbar-dark {
    background-color: #8C241F;
    border-color: #8C241F;
}
.navbar-dark .navbar-brand {
    color: #DDDFBE;
}
.navbar-dark .navbar-text {
    color: #DDDFBE;
}
.navbar-dark .navbar-nav .nav-link {
    color: #DDDFBE;
}

/* Public pages: offset for fixed-top navbar */
body.public-page {
    padding-top: 56px;
}

/* SIDEBAR NAVIGATION
-------------------------------------------------- */

.sidebar {
    width: 260px;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
}

.sidebar .offcanvas-header {
    background-color: #8C241F;
    color: #DDDFBE;
}

.sidebar .nav-section-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8C241F;
    padding: 0.75rem 1rem 0.25rem;
    margin-top: 0.5rem;
}

.sidebar .accordion-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: transparent;
    color: #333;
}

.sidebar .accordion-button:not(.collapsed) {
    background-color: rgba(140, 36, 31, 0.08);
    color: #8C241F;
    box-shadow: none;
}

.sidebar .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.sidebar .accordion-body {
    padding: 0;
}

.sidebar .accordion-body a {
    display: block;
    padding: 0.35rem 1rem 0.35rem 2rem;
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
}

.sidebar .accordion-body a:hover {
    background-color: rgba(140, 36, 31, 0.08);
    color: #8C241F;
}

.sidebar .nav-link-single {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
}

.sidebar .nav-link-single:hover {
    background-color: rgba(140, 36, 31, 0.08);
    color: #8C241F;
}

.sidebar .accordion-body a.active,
.sidebar .nav-link-single.active {
    background-color: rgba(140, 36, 31, 0.12);
    color: #8C241F;
    font-weight: 600;
}

/* Desktop: pin sidebar fixed, offset content */
@media (min-width: 992px) {
    .sidebar.offcanvas-lg {
        position: fixed !important;
        top: 56px;
        bottom: 0;
        left: 0;
        width: 260px !important;
        background-color: #f8f9fa !important;
        border-right: 1px solid #dee2e6;
        z-index: 1019;
        visibility: visible !important;
        transform: none !important;
    }

    .sidebar.offcanvas-lg .offcanvas-body {
        display: block !important;
        background-color: transparent !important;
        overflow-y: auto !important;
        height: 100%;
        padding: 0 !important;
    }

    .page-with-sidebar {
        margin-left: 260px;
        width: auto;
    }
}

/* Carousel and marketing content styles moved to avfd-modern.css */

/* Featurettes - Keep for About Us page */

.featurette-divider {
    margin: 80px 0;
}

.featurette-heading {
    font-weight: 300;
    line-height: 1;
    letter-spacing: -1px;
    color: #D91408;
}

.text-muted {
    color: #8295A6 !important;
}

@media (min-width: 768px) {
    .featurette-heading {
        font-size: 50px;
    }
}

@media (min-width: 992px) {
    .featurette-heading {
        margin-top: 120px;
    }
}

/* Heading colors */
h1 {
    color: #D91408;
}

h2 {
    color: #8295A6;
}

.no-padding {
    padding: 0;
}

.green{
  color: green;
}

.red{
    color:red;
}

.orange{
    color:orange;
}

.blue{
    color:blue;
}

.lightblue{
    color:#4B9CD3
}

/* Form validation feedback */
.invalid-feedback {
    font-size: 0.875rem;
}

/* Heading consistency for private pages */
h3 {
    color: #5a5a5a;
}

/* Enabling prettier tables */
.table td.no_left_border {
    border-left: none;
}

.table td.no_right_border {
    border-right: none;
}

.table td.thick_left_border {
    border-left: 1px solid black;
}

.table td.thick_right_border {
    border-right: 1px solid black;
}

.table th.thick_left_border {
    border-left: 1px solid black;
}

.table th.thick_right_border {
    border-right: 1px solid black;
}

.table th.thick_top_border {
    border-top: 1px solid grey;
}

.table td.thick_top_border {
    border-top: 1px solid grey;
}

.table td.thin_left_border {
    border-left: 1px solid #ddd;
}

.table th.thin_left_border {
    border-left: .5px solid #ddd;
}

/* ── Today column highlight ── */
.duty-calendar th.today-col,
.duty-calendar td.today-col {
    background-color: rgba(26, 35, 50, 0.06);
}
.duty-calendar thead th.today-col {
    font-weight: 700;
}
/* Preserve staffing colors over today highlight */
.duty-calendar td.today-col.staffing-threshold-met { background-color: #d4edda; }
.duty-calendar td.today-col.staffing-objective-met { background-color: #28a745; color: white; }

/* ── Empty cell indicator ── */
.duty-calendar td .cell-empty {
    color: #ccc;
    font-size: 0.85em;
}

/* ── Legend grid ── */
.schedule-legend {
    font-size: 0.85rem;
}
.schedule-legend .legend-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.schedule-legend .legend-group-label {
    font-weight: 600;
    min-width: 80px;
}
.schedule-legend .legend-item {
    white-space: nowrap;
}

/* ── Collapsible shift group headers ── */
.shift-group-header {
    cursor: pointer;
    user-select: none;
    background-color: #f8f9fa;
}
.shift-group-header:hover {
    background-color: #e9ecef;
}
.shift-group-header td {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-top: 2px solid #dee2e6;
}
.shift-group-header .toggle-icon {
    transition: transform 0.2s;
    display: inline-block;
}
.shift-group-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}
.shift-row.hidden-by-group,
.shift-row.hidden-by-filter {
    display: none;
}

/* ── Role filter bar ── */
.role-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.role-filter-bar .btn {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
}
.role-filter-bar .btn.active {
    font-weight: 600;
}

/* ── Urgent sign-up styling ── */
.signup-urgent {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background-color: #e67e22;
    border-radius: 0.25rem;
    text-decoration: none;
}
.signup-urgent:hover {
    background-color: #d35400;
    color: #fff;
    text-decoration: none;
}

/* ── Consistent cell formatting ── */
.shift-entry { margin-bottom: 0.15rem; }
.shift-entry + .shift-entry { padding-top: 0.15rem; border-top: 1px dotted #eee; }
.shift-member { font-weight: 500; }
.shift-badges { font-size: 0.8em; opacity: 0.85; }
.shift-notes { display: block; font-size: 0.8em; color: #888; font-style: italic; }

/* ── Staffing summary dots (inline in table headers & mobile tabs) ── */
.summary-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.2rem;
    vertical-align: middle;
}
.summary-dot.status-green { background-color: #28a745; }
.summary-dot.status-yellow { background-color: #ffc107; }
.summary-dot.status-red { background-color: #dc3545; }
.summary-dot.status-gray { background-color: #ccc; }

/* ── Staffing indicator borders (column headers & mobile tabs) ── */
.staffing-border-faint { border-top: 4px solid #c8e6c9 !important; }
.staffing-border-light { border-top: 4px solid #81c784 !important; }
.staffing-border-full { border-top: 4px solid #28a745 !important; }
.staffing-border-gray { border-top: 4px solid #ccc !important; }

/* ── Mobile card view ── */
.mobile-schedule { display: none; }
.mobile-day-tabs {
    display: flex;
    overflow-x: auto;
    gap: 0;
    border-bottom: 2px solid #dee2e6;
    -webkit-overflow-scrolling: touch;
}
.mobile-day-tabs .day-tab {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    color: #666;
}
.mobile-day-tabs .day-tab.active {
    color: #CC3333;
    border-bottom-color: #CC3333;
    font-weight: 700;
}
.mobile-day-panel { display: none; }
.mobile-day-panel.active { display: block; }
.mobile-shift-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.mobile-shift-card-header {
    background-color: #f8f9fa;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid #dee2e6;
}
.mobile-shift-card-body { padding: 0; }
.mobile-position-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    gap: 0.5rem;
}
.mobile-position-row:last-child { border-bottom: none; }
.mobile-position-label {
    font-weight: 500;
    font-size: 0.85rem;
    min-width: 110px;
    flex-shrink: 0;
    color: #555;
}
.mobile-position-content {
    flex: 1;
    font-size: 0.85rem;
    text-align: right;
}
.mobile-position-content .cell-empty { color: #ccc; }

/* ── Responsive: hide desktop table, show mobile on small screens ── */
@media (max-width: 991.98px) {
    .desktop-schedule { display: none !important; }
    .mobile-schedule { display: block !important; }
}
@media (min-width: 992px) {
    .desktop-schedule { display: block; }
    .mobile-schedule { display: none; }
}

/* Duty schedule calendar desktop responsive */
@media (max-width: 768px) {
    .duty-calendar td, .duty-calendar th {
        font-size: 0.75rem;
        padding: 0.25rem;
    }
}

/* Staffing standard highlighting - positive reinforcement only */
.staffing-threshold-met,
.table td.staffing-threshold-met {
    background-color: #d4edda;
}

.staffing-objective-met,
.table td.staffing-objective-met {
    background-color: #28a745;
    color: white;
}

.table td.staffing-objective-met a {
    color: white;
}
