/*
 * Copyright (c) 2026 Palm Beach Software Design, Inc. All rights reserved.
 * GroupMiles — Proprietary and confidential. Unauthorized copying,
 * distribution, or use is prohibited.
 *
 * FullCalendar v6 — Print-friendly overrides.
 * Applied via media="print" so ALL rules here only affect printed output.
 *
 * Week view strategy: a clean HTML table (#fc-print-view) is pre-built
 * by JS whenever the user is in week view.  At print time this CSS hides
 * the FC calendar and shows the print table instead.  In month view the
 * print table is empty so the FC calendar prints normally.
 */

/* ===================================================================
   PAGE SETUP
   =================================================================== */
@page {
    size: landscape;
    margin: 0.4in;
}

#eventCalendar {
    width: 100% !important;
    overflow: visible !important;
}

/* ===================================================================
   WEEK VIEW — PRINT TABLE SWAP
   #fc-print-view is populated by JS when in week view, empty otherwise.
   =================================================================== */

/* Always show the print view in print (it's harmless when empty) */
#fc-print-view {
    display: block !important;
}

/* When the print table has content (week view), hide the real calendar */
#fc-print-view:not(:empty) ~ #fc-calendar {
    display: none !important;
}

/* :has() fallback — fc-print-view comes AFTER fc-calendar in DOM */
#fc-calendar:has(~ #fc-print-view:not(:empty)) {
    display: none !important;
}

/* ===================================================================
   HIDE NON-PRINT ELEMENTS
   =================================================================== */
.fc .fc-header-toolbar .fc-button-group,
.fc .fc-header-toolbar .fc-button,
.fc .fc-header-toolbar .fc-today-button {
    display: none !important;
}

/* Override Bootstrap 3: a[href]:after { content: "(" attr(href) ")" } */
a[href]:after,
.fc a[href]:after,
#eventCalendar a[href]:after {
    content: none !important;
    display: none !important;
}

/* ===================================================================
   TITLE
   =================================================================== */
.fc .fc-toolbar-title {
    font-size: 18px !important;
    font-weight: bold !important;
    text-align: center !important;
    width: 100% !important;
}

.fc .fc-header-toolbar {
    justify-content: center !important;
    margin-bottom: 8px !important;
}

/* ===================================================================
   SCROLLER CHAIN FIX (month view)
   =================================================================== */
.fc {
    max-width: 100% !important;
    font-size: 12px !important;
}

.fc .fc-view-harness {
    height: auto !important;
    overflow: visible !important;
}

.fc .fc-scroller-harness,
.fc .fc-scroller-harness-liquid {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
}

.fc .fc-scroller,
.fc .fc-scroller-liquid,
.fc .fc-scroller-liquid-absolute {
    position: static !important;
    overflow: visible !important;
    height: auto !important;
}

.fc .fc-scrollgrid {
    border-collapse: collapse !important;
    width: 100% !important;
    table-layout: fixed !important;
}

.fc .fc-scrollgrid-section,
.fc .fc-scrollgrid-section > td {
    height: auto !important;
}

/* ===================================================================
   COLUMN HEADERS
   =================================================================== */
.fc .fc-col-header {
    width: 100% !important;
    table-layout: fixed !important;
}

.fc .fc-col-header-cell {
    font-weight: bold !important;
    text-align: center !important;
    padding: 4px 2px !important;
    background: #f5f5f5 !important;
    border: 1px solid #ccc !important;
}

/* ===================================================================
   MONTH VIEW (dayGrid)
   =================================================================== */
.fc .fc-daygrid-body {
    width: 100% !important;
    height: auto !important;
}

.fc .fc-daygrid-body table {
    width: 100% !important;
    height: auto !important;
    table-layout: fixed !important;
}

.fc .fc-daygrid-day {
    height: auto !important;
    min-height: 0 !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
}

.fc .fc-daygrid-day-frame {
    min-height: 60px !important;
    height: auto !important;
}

.fc .fc-daygrid-day-number {
    color: #333 !important;
    font-weight: 600 !important;
    padding: 2px 4px !important;
}

.fc .fc-day-today {
    background: #fffde7 !important;
}

/* ===================================================================
   EVENTS — MONTH VIEW
   =================================================================== */
.fc .fc-event,
.fc .fc-daygrid-event {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #888 !important;
    border-radius: 0 !important;
    page-break-inside: avoid;
    font-size: 10px !important;
    line-height: 1.3 !important;
}

.fc .fc-daygrid-event-dot {
    border-color: #333 !important;
}

.fc .fc-daygrid-event-harness,
.fc .fc-daygrid-event-harness-abs {
    position: relative !important;
    visibility: visible !important;
}

.fc .fc-daygrid-more-link {
    display: none !important;
}

.fc .fc-more-popover {
    display: none !important;
}

/* ===================================================================
   GENERAL BORDERS
   =================================================================== */
.fc th,
.fc td {
    border-color: #ccc !important;
}
