/* Page Header & Layout Structure */
.css-3feivy {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 24px;
    height: auto !important;
}

.css-1sg2lsz {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.css-i9gxep {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

/* Sub-navigation Tabs (Month/Week/Day/Birthdays/Settings) */
.sub-nav {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
    display: flex;
    gap: 32px;
}

.nav-tab {
    padding: 14px 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab .material-symbols-outlined {
    font-size: 20px;
    color: inherit;
}

.nav-tab:hover {
    color: #111827;
}

.nav-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: 600;
}

/* Date Picker & Actions Toolbar */
#datePicker {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin: 0 0 20px;
    width: fit-content;
    max-width: calc(100% - 48px);
}

#datePicker .buttonOutline {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    height: 36px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #4b5563;
    font-weight: 500;
    padding: 0 12px;
    font-size: 14px;
}

#datePicker .buttonOutline:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

#calendar-header,
#dateRange {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    min-width: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

/* Segmented Control Rail (Filters) */
.view-style.timeFrames {
    display: inline-flex;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 10px;
    gap: 2px;
    margin: 0 4px;
    border: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.view-style.timeFrames button {
    border: none !important;
    background: transparent;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
}

/* Selected States for Filters — match month-event-bar colors */
.selectedAllColorFrame,
.selectedALColorFrame,
.selectedMCColorFrame {
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

.selectedAllColorFrame {
    background-color: #9c27b0 !important;
}

.selectedALColorFrame {
    background-color: #3f51b5 !important;
}

.selectedMCColorFrame {
    background-color: #259b24 !important;
}

/* Form variant: full-width 3-segment community toggle (new-activity popup) */
.view-style.timeFrames.event-cal-toggle {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 4px;
    border-radius: 10px;
}

.view-style.timeFrames.event-cal-toggle button {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
    min-width: 0;
}

/* Print Button in Toolbar */
.btn-print-toolbar {
    margin-left: auto;
    padding-left: 12px;
    border-left: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.print-btn-accent {
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #2563eb !important;
    font-weight: 600 !important;
}

.print-btn-accent:hover {
    background-color: #dbeafe !important;
    color: #1d4ed8 !important;
}

/* Date Cell Hover Effect (Monthly, Week, and Day Calendars) */
#calendar-dates .baseWidth,
.tableRow .td_row {
    transition: all 0.2s ease;
    cursor: pointer;
}

#calendar-dates .baseWidth:hover,
.tableRow .td_row:hover {
    background-color: #f8fafc !important;
    box-shadow: inset 0 0 0 1px #4f46e5 !important;
    z-index: 10;
    position: relative;
}

/* Day Calendar Table Header */
.table-day-header {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#staff-table {
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

/* Utilities */
#selectCalEvents {
    margin-left: 12px !important;
}

#goToToday,
#showCustomCal {
    margin-left: 8px !important;
}

@media (max-width: 1024px) {
    .sub-nav {
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 16px;
    }

    .nav-tab {
        flex-shrink: 0;
        padding: 12px 16px;
    }
}