/* =========================================================================
   INLINE TITLE & NAVIGATION LAYOUT
========================================================================= */




#calendar .fc-toolbar .fc-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
}

#calendar .fc-toolbar h2 {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    color: #ffffff !important;
}

#calendar .fc-prev-button,
#calendar .fc-next-button {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.2rem !important;
    padding: 4px 8px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    outline: none !important;
}

#calendar .fc-today-button,
#calendar .fc-month-button,
#calendar .fc-toolbar .fc-left,
#calendar .fc-toolbar .fc-right {
    display: none !important;
}




/* =========================================================================
   APPOINTLY SYSTEM calendar ENGINE - CORE STRUCTURE COMPONENT
========================================================================= */

/* Complete Structural Borderless Reset */
#calendar table, 
#calendar table th,
#calendar table td,
#calendar table tr,
.fc-unthemed th,
.fc-unthemed td,
.fc-unthemed thead,
.fc-unthemed tbody, 
.fc-unthemed .fc-divider,
.fc-unthemed .fc-row,
.fc-unthemed .fc-content {
    border: none !important;
    border-style: none !important;
    border-width: 0 !important;
    border-collapse: collapse !important;
}

.fc-unthemed td.fc-today {
    background: transparent !important;
}

/* Force layout tables to span full available width across all websites */
#calendar table,
#calendar .fc-view-container,
#calendar .fc-view,
#calendar .fc-basic-view {
    width: 100% !important;
    table-layout: fixed !important;
}

/* Fixed Day Headers spacing row grid */
#calendar .fc-day-header {
    width: calc(100% / 7) !important;
    display: table-cell !important;
    text-align: center !important;
    padding: 12px 0 !important;
    text-transform: uppercase;
    font-size: 11px !important;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--cal-text-muted, #b2bec3); /* Weak fallback */
    white-space: normal !important; 
    overflow: visible !important;
    text-indent: 0 !important; 
}

/* Force layout rows to grow taller structurally */
#calendar .fc-basic-view .fc-body .fc-row,
#calendar .fc-row.fc-week {
    min-height: 75px !important;
    height: auto !important;
}

#calendar .fc-scroller,
#calendar .fc-day-grid-container {
    height: auto !important;
    overflow: visible !important;
}

/* Floating Date Numbers Grid Alignment */
#calendar .fc-day-number {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    margin: 6px auto !important;
    font-weight: 500;
    font-size: 14px;
    padding: 8px !important;
    border-radius: 12px;
    color: var(--cal-text-primary, #2d3436); /* Weak fallback */
    transition: all 0.2s ease;
}

/* Today Active Circle State Blueprint */
#calendar .fc-today .fc-day-number {
    background: var(--cal-accent-color, #6c5ce7); /* Removed !important */
    color: var(--cal-accent-text, #ffffff);     /* Removed !important */
    border-radius: 50% !important;
    box-shadow: 0 4px 10px var(--cal-accent-shadow, rgba(108, 92, 231, 0.3));
}

/* Selected Grid Highlight Framework */
.selected-day-highlight {
    background-color: var(--cal-accent-subtle, rgba(108, 92, 231, 0.1)); /* Removed !important */
    border-radius: 50% !important;
}

/* Complete Event Data Suppression across Grid Layers */
.fc-day-grid-event, 
.fc-event, 
.event-dot-marker, 
.fc-title, 
.fc-time {
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Minimal Toolbar Header Components Layout */
.fc-toolbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 10px !important;
    margin-bottom: 10px !important;
}

.fc-toolbar .fc-center h2 {
    font-size: 20px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 !important;
    color: var(--cal-text-primary, #2d3436); /* Weak fallback */
}

.fc-button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 22px !important;
    padding: 5px 15px !important;
    outline: none !important;
    color: var(--cal-text-muted, #636e72); /* Removed !important */
    transition: color 0.2s;
}

.fc-button:hover {
    color: var(--cal-accent-color, #6c5ce7);  Removed !important */
}



.fc-today-button {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    color: var(--cal-text-muted, #b2bec3); /* Removed !important */
}

.fc-toolbar .fc-left { order: 1; }
.fc-toolbar .fc-center { order: 2; }
.fc-toolbar .fc-right { order: 3; }

/* Responsive Media Controls */
@media (max-width: 767) {
    .fc-toolbar .fc-left,
    .fc-toolbar .fc-right { 
        display: none !important; 
    }
    
    .fc-toolbar {
        flex-direction: column !important; 
        margin-bottom: 30px !important; 
        padding-top: 20px !important;
    }
}

#calendar {
    scroll-margin-top: 80px; /* Leaves clean breathing room for your floating headers when anchored */
}


/* =========================================================
   1. FULL-DAY / HALF-DAY CLOSURES (calendar DATES)
   ========================================================= */

/* Closed day cell background */
.fc-day.day-closed {
    background-color: #18181b !important; /* Muted dark tone */
    cursor: pointer;
}

/* Red line running through the center of closed days */
.fc-day.day-closed .fc-daygrid-day-frame {
    position: relative;
}

.fc-day.day-closed .fc-daygrid-day-frame::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: #ef4444; /* Red strike line */
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 5;
}

/* Gray out date number on closed days */
.fc-day.day-closed .fc-daygrid-day-top {
    opacity: 0.5;
}

/* Optional Half-Day Off Tag */
.fc-day.day-half-off .fc-daygrid-day-frame::after {
    content: "Half Day";
    position: absolute;
    bottom: 4px;
    right: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #000;
    background-color: #f59e0b;
    padding: 1px 5px;
    border-radius: 4px;
    pointer-events: none;
}

/* Allow smooth vertical scrolling across all inner calendar elements */
#calendar,
#calendar .fc-view-container,
#calendar .fc-day-grid-container,
#calendar .fc-day-grid,
#calendar .fc-bg,
#calendar .fc-content-skeleton {
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
}




/* Past Times & Outside Operating Hours (Subtle, clean disabled look) */
.time-slot-item.slot-closed,
.time-slot-item.slot-past {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #6b7280; /* Soft dark grey */
    cursor: not-allowed;
    opacity: 0.4;
}

/* Custom Admin Block / Holiday (Warning Amber style) */
.time-slot-item.slot-blocked {
    background-color: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f59e0b; /* Bright warm amber */
    cursor: not-allowed;
    font-weight: 500;
    opacity: 0.85;
}

/* Hover prevention for disabled states */
.time-slot-item.slot-booked:hover,
.time-slot-item.slot-overlap:hover,
.time-slot-item.slot-closed:hover,
.time-slot-item.slot-blocked:hover {
    transform: none !important;
    box-shadow: none !important;
}



/* ===========================================
   2. CLOSED TIME SLOTS (HOUR BY HOUR / PARTIAL DAY OFF)
  ======================================== */

.time-slot.slot-closed {
    background-color: #27272a !important;
    border: 1px solid #3f3f46 !important;
    color: #71717a !important;
    cursor: not-allowed !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 14px !important;
    opacity: 0.65;
    border-radius: 8px !important;
}

/* Line across the time text */
.time-slot.slot-closed .slot-time {
    text-decoration: line-through !important;
    text-decoration-color: #ef4444 !important;
}

/* Badge displaying "CLOSED" */
.time-slot.slot-closed .slot-status {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.12) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
}


/* Past Times & Outside Operating Hours (Subtle, clean disabled look) */
.time-slot-item.slot-closed,
.time-slot-item.slot-past {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #6b7280; /* Soft dark grey */
    cursor: not-allowed;
    opacity: 0.4;
}

/* Custom Admin Block / Holiday (Warning Amber style) */
.time-slot-item.slot-blocked {
    background-color: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f59e0b; /* Bright warm amber */
    cursor: not-allowed;
    font-weight: 500;
    opacity: 0.85;
}

/* Hover prevention for disabled states */
.time-slot-item.slot-booked:hover,
.time-slot-item.slot-overlap:hover,
.time-slot-item.slot-closed:hover,
.time-slot-item.slot-blocked:hover {
    transform: none !important;
    box-shadow: none !important;
}
