/* ==============================================================================
   CP2026 CALENDAR STYLES
   - Desktop: Full bars with titles
   - Mobile:  Clean dots only
   ============================================================================== */

/* --- 1. CONTAINER & VARIABLES --- */
#cp2026-calendar-view {
    max-width: 100%;
    margin: 0 auto 60px auto;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Adjust to match site font */
    background: #fff;
    
    /* FullCalendar Overrides */
    --fc-border-color: #E5E5E5;         /* Light grey grid lines */
    --fc-today-bg-color: transparent;   /* Remove yellow today highlight */
    --fc-highlight-color: rgba(108, 144, 64, 0.05); /* Custom selection color */
    --fc-button-text-color: #333;
    --fc-button-bg-color: transparent;
    --fc-button-border-color: #E5E5E5;
    --fc-button-hover-bg-color: #f9f9f9;
    --fc-button-hover-border-color: #ccc;
    --fc-button-active-bg-color: #f0f0f0;
}

/* --- 2. HEADER TOOLBAR --- */
.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 24px !important;
    padding: 0 4px;
}

/* Title (e.g., "December 2025") */
.fc .fc-toolbar-title {
    font-size: 24px;
    font-weight: 300; /* Thin, elegant font */
    color: #333;
}

/* Buttons (Prev, Next, Today) */
.fc .fc-button {
    background: transparent;
    border: 1px solid #E5E5E5;
    color: #333;
    border-radius: 0; /* Square buttons */
    box-shadow: none !important;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.fc .fc-button:hover {
    background-color: #f5f5f5;
    color: #000;
    border-color: #ccc;
}

.fc .fc-button-primary:not(:disabled):active, 
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #e0e0e0;
    color: #000;
    border-color: #bbb;
}

/* Icons (Arrows) */
.fc .fc-icon {
    font-size: 1.2em; /* Slightly smaller arrows */
}

/* --- 3. GRID STRUCTURE --- */

/* Day Headers (MON, TUE...) */
.fc .fc-col-header-cell-cushion {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 500;
    color: #999; /* Light grey text */
    padding: 12px 0;
    text-decoration: none; /* Remove links */
}

/* The Grid Table */
.fc-theme-standard td, 
.fc-theme-standard th {
    border-color: #f0f0f0; /* Very subtle borders */
}

/* Day Cells */
.fc-daygrid-day-number {
    font-size: 13px;
    color: #888;
    padding: 8px 12px !important;
    text-decoration: none;
    width: 100%;
    text-align: right; /* Default to right, mobile changes this */
}

/* Desktop Cell Height */
.fc-daygrid-day-frame {
    min-height: 110px; /* Ensure space for bars */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Hover Effect on Cells */
.fc-daygrid-day:hover {
    background-color: #fafafa;
}

/* --- 4. EVENTS (DESKTOP DEFAULT) --- */
.fc-event {
    border: none;
    border-radius: 0; /* Square bars */
    font-size: 11px;
    margin-top: 2px;
    padding: 0px 0px;
    cursor: pointer;
    box-shadow: none;
    transition: opacity 0.2s;
}

.fc-event:hover {
    opacity: 0.9;
}

/* The Title Text inside the bar */
.fc-event-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: grey; /* White text on colored background */
}

/* Remove default FullCalendar background to use our inline styles */
.fc-h-event {
    background-color: transparent; 
    border: none;
}
.fc-event-main-frame {
    /* Ensures the color fills the custom div structure */
    height: 100%;
    width: 100%;
}

/* --- 5. SELECTED STATE --- */
.fc-day-selected {
    background-color: rgba(108, 144, 64, 0.1) !important; /* Brand color tint */
}


/* ==============================================================================
   MOBILE STYLES (Max-Width 768px)
   - Converts Grid to "Dot View"
   ============================================================================== */

@media (max-width: 768px) {
    
    /* Toolbar Stack */
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px !important;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    
    /* Simplify Header Text */
    .fc .fc-toolbar-title {
        font-size: 20px;
    }

    /* --- GRID MODIFICATIONS --- */
    
    /* Make cells shorter */
    .fc-daygrid-day-frame {
        min-height: 55px !important; /* Compact squares */
        display: flex;
        flex-direction: column;
        align-items: center; /* Center everything horizontally */
        justify-content: flex-start;
        padding-top: 4px;
    }

    /* Center the Date Number */
    .fc-daygrid-day-top {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }
    
    .fc-daygrid-day-number {
        text-align: center;
        padding: 0 !important;
        font-size: 14px;
        margin-bottom: 4px;
        color: #555;
    }

    /* --- EVENT DOTS --- */
    
    /* This container holds the dots (FullCalendar generates this) */
    .fc-daygrid-day-events {
        display: flex;
        justify-content: center;
        flex-wrap: wrap; /* Allow wrapping if many dots */
        gap: 3px;
        margin: 0 !important;
        min-height: 10px;
        width: 100%;
    }

    /* Hide the standard event harness (the rows) to prevent stacking issues */
    .fc-daygrid-event-harness {
        margin: 0 !important;
        top: 0 !important; /* Reset positioning */
    }

    /* The Dot Itself (Generated by JS) */
    .fc-mobile-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        display: block;
        flex-shrink: 0;
    }
    
    /* Remove default event styling interactions on mobile */
    .fc-event {
        background: transparent !important;
        padding: 0 !important;
    }
}