
/* Environment: dev - Generated styles */

.debug-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    z-index: 9999;
}
/**
 * Monthly Calendar Widget CSS for the Auburn Event Calendar.
 * This file provides specific styling for the monthly calendar view,
 * extending the base calendar styles.
 */

/* Monthly Calendar Grid - Using CSS Grid for consistent layout */
.calendar-month-grid {
    display: grid;
    grid-template-rows: auto 1fr;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    background: #e0e0e0; /* Grid gap color */
    gap: 1px;
}

/* Week Header */
.calendar-week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    gap: 1px;
}

.calendar-weekday-header {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f5f5f5;
}

/* Calendar Body - Grid container for all weeks */
.calendar-month-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
}

/* Calendar Week Row - No longer needed as individual containers */
.calendar-week {
    display: contents; /* Makes children participate in parent grid */
}

/* Day Cell Styling - Fixed width with CSS Grid */
.calendar-day {
    min-height: 100px;
    width: 100%; /* Ensures full grid cell width */
    padding: 0.5rem;
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover {
    background: #f8f9fa;
    box-shadow: inset 0 0 0 1px #4b6cb7;
}

.calendar-day:focus {
    outline: 2px solid #4b6cb7;
    outline-offset: -2px;
    z-index: 1;
}

/* Day Cell States */
.calendar-day--today {
    background: #fff3e0;
    border-color: #ff9800;
}

.calendar-day--today:hover {
    background: #ffecb3;
}

.calendar-day--other-month {
    background: #fafafa;
    color: #bdbdbd;
}

.calendar-day--other-month:hover {
    background: #f0f0f0;
}

.calendar-day--past {
    background: #f5f5f5;
    color: #9e9e9e;
}

.calendar-day--past:hover {
    background: #eeeeee;
}

.calendar-day--weekend {
    background: #fafafa;
}

.calendar-day--weekend:hover {
    background: #f0f0f0;
}

.calendar-day--focused {
    background: #e3f2fd;
    border-color: #2196f3;
    box-shadow: inset 0 0 0 2px #2196f3;
}

/* Day Number */
.calendar-day-number {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
    flex-shrink: 0;
}

.calendar-day--today .calendar-day-number {
    color: #f57c00;
    font-weight: 700;
    background: #fff;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.calendar-day--other-month .calendar-day-number {
    color: #bdbdbd;
}

.calendar-day--past .calendar-day-number {
    color: #9e9e9e;
}

/* Day Events Container */
.calendar-day-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    overflow: hidden;
}

/* Monthly Calendar Events */
.calendar-event--monthly {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 3px;
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 1.2rem;
}

.calendar-event--monthly:hover {
    background: #bbdefb;
    border-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.calendar-event--monthly:focus {
    outline: 2px solid #4b6cb7;
    outline-offset: 1px;
    z-index: 3;
}

.calendar-event--monthly .event-title {
    font-weight: 500;
    color: #1565c0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.calendar-event--monthly .event-time {
    font-size: 0.65rem;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Category-specific colors for monthly view */
.calendar-event--monthly.calendar-event--community {
    background: #e8f5e8;
    border-color: #4caf50;
}

.calendar-event--monthly.calendar-event--community .event-title {
    color: #2e7d32;
}

.calendar-event--monthly.calendar-event--community:hover {
    background: #c8e6c9;
    border-color: #388e3c;
}

.calendar-event--monthly.calendar-event--arts-culture {
    background: #f3e5f5;
    border-color: #9c27b0;
}

.calendar-event--monthly.calendar-event--arts-culture .event-title {
    color: #7b1fa2;
}

.calendar-event--monthly.calendar-event--arts-culture:hover {
    background: #e1bee7;
    border-color: #8e24aa;
}

.calendar-event--monthly.calendar-event--sports-recreation {
    background: #fff3e0;
    border-color: #ff9800;
}

.calendar-event--monthly.calendar-event--sports-recreation .event-title {
    color: #f57c00;
}

.calendar-event--monthly.calendar-event--sports-recreation:hover {
    background: #ffe0b2;
    border-color: #fb8c00;
}

.calendar-event--monthly.calendar-event--food-drink {
    background: #fce4ec;
    border-color: #e91e63;
}

.calendar-event--monthly.calendar-event--food-drink .event-title {
    color: #c2185b;
}

.calendar-event--monthly.calendar-event--food-drink:hover {
    background: #f8bbd9;
    border-color: #d81b60;
}

.calendar-event--monthly.calendar-event--business-networking {
    background: #e0f2f1;
    border-color: #009688;
}

.calendar-event--monthly.calendar-event--business-networking .event-title {
    color: #00695c;
}

.calendar-event--monthly.calendar-event--business-networking:hover {
    background: #b2dfdb;
    border-color: #00796b;
}

.calendar-event--monthly.calendar-event--education {
    background: #fff8e1;
    border-color: #ffc107;
}

.calendar-event--monthly.calendar-event--education .event-title {
    color: #f9a825;
}

.calendar-event--monthly.calendar-event--education:hover {
    background: #ffecb3;
    border-color: #ffb300;
}

/* Past events in monthly view */
.calendar-event--monthly.calendar-event--past {
    opacity: 0.6;
    background: #f5f5f5;
    border-color: #bdbdbd;
}

.calendar-event--monthly.calendar-event--past .event-title {
    color: #757575;
}

.calendar-event--monthly.calendar-event--past .event-time {
    color: #9e9e9e;
}

/* All-day events */
.calendar-event--monthly.calendar-event--all-day {
    border-left: 4px solid #4b6cb7;
    padding-left: 0.3rem;
    font-weight: 600;
}

/* More Events Indicator */
.calendar-more-events {
    font-size: 0.7rem;
    color: #666;
    text-align: center;
    padding: 0.2rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
    margin-top: 0.125rem;
    background: #f0f0f0;
    border: 1px solid #ddd;
}

.calendar-more-events:hover {
    background: #e0e0e0;
    border-color: #bbb;
    color: #333;
}

.calendar-more-events:focus {
    outline: 2px solid #4b6cb7;
    outline-offset: 1px;
}

/* Day Events Popup */
.calendar-day-popup {
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    max-height: 400px;
    overflow: hidden;
    outline: none;
}

.calendar-day-popup-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.calendar-day-popup-header {
    background: #4b6cb7;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-day-popup-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.calendar-day-popup-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.calendar-day-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.calendar-day-popup-events {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.calendar-day-popup-event {
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day-popup-event:last-child {
    margin-bottom: 0;
}

.calendar-day-popup-event:hover {
    background: #f8f9fa;
    border-color: #4b6cb7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-day-popup-event .event-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.calendar-day-popup-event .event-time {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.calendar-day-popup-event .event-location {
    font-size: 0.8rem;
    color: #888;
}

.calendar-day-popup-event .event-categories {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

.calendar-day-popup-event.past-event {
    opacity: 0.7;
    background: #f8f8f8;
}

.calendar-day-popup-event.past-event .event-title {
    color: #666;
}

.no-events-message {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 2rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-month-grid {
        gap: 1px; /* Maintain consistent gap */
    }
    
    .calendar-month-body {
        gap: 1px; /* Maintain consistent gap */
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 0.25rem;
        width: 100%; /* Ensure full grid cell width */
    }
    
    .calendar-day-number {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .calendar-day--today .calendar-day-number {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.8rem;
    }
    
    .calendar-event--monthly {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
        min-height: 1rem;
    }
    
    .calendar-event--monthly .event-time {
        font-size: 0.6rem;
    }
    
    .calendar-more-events {
        font-size: 0.65rem;
        padding: 0.15rem;
    }
    
    .calendar-weekday-header {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .calendar-day-popup {
        min-width: 280px;
        max-width: 90vw;
        max-height: 70vh;
    }
    
    .calendar-day-popup-header {
        padding: 0.75rem;
    }
    
    .calendar-day-popup-events {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .calendar-month-grid {
        gap: 1px; /* Maintain consistent gap */
    }
    
    .calendar-month-body {
        gap: 1px; /* Maintain consistent gap */
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 0.2rem;
        width: 100%; /* Ensure full grid cell width */
    }
    
    .calendar-day-number {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    
    .calendar-day--today .calendar-day-number {
        width: 1.1rem;
        height: 1.1rem;
        font-size: 0.75rem;
    }
    
    .calendar-event--monthly {
        font-size: 0.65rem;
        padding: 0.1rem 0.25rem;
        min-height: 0.9rem;
        gap: 0.15rem;
    }
    
    .calendar-event--monthly .event-time {
        display: none; /* Hide time on very small screens */
    }
    
    .calendar-weekday-header {
        padding: 0.4rem 0.15rem;
        font-size: 0.7rem;
    }
    
    .calendar-more-events {
        font-size: 0.6rem;
        padding: 0.1rem;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1200px) {
    .calendar-month-grid {
        gap: 1px; /* Maintain consistent gap */
    }
    
    .calendar-month-body {
        gap: 1px; /* Maintain consistent gap */
    }
    
    .calendar-day {
        min-height: 120px;
        padding: 0.75rem;
        width: 100%; /* Ensure full grid cell width */
    }
    
    .calendar-day-number {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .calendar-day--today .calendar-day-number {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }
    
    .calendar-event--monthly {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        min-height: 1.4rem;
    }
    
    .calendar-event--monthly .event-time {
        font-size: 0.7rem;
    }
    
    .calendar-weekday-header {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .calendar-day {
        border-width: 2px;
    }
    
    .calendar-event--monthly {
        border-width: 2px;
        font-weight: 600;
    }
    
    .calendar-day-popup {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .calendar-day,
    .calendar-event--monthly,
    .calendar-more-events,
    .calendar-day-popup-event {
        transition: none;
    }
    
    .calendar-event--monthly:hover,
    .calendar-day-popup-event:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .calendar-day-popup {
        display: none;
    }
    
    .calendar-day {
        min-height: 80px;
        border: 1px solid #000;
    }
    
    .calendar-event--monthly {
        background: #fff;
        border: 1px solid #000;
        color: #000;
    }
    
    .calendar-more-events {
        background: #fff;
        border: 1px solid #000;
        color: #000;
    }
}

/* Focus Management */
.calendar-day:focus-within {
    box-shadow: inset 0 0 0 2px #4b6cb7;
}

/* Accessibility Improvements */
.calendar-day[aria-selected="true"] {
    background: #e3f2fd;
    border-color: #2196f3;
}

.calendar-event--monthly[aria-pressed="true"] {
    background: #1976d2;
    color: #fff;
}

.calendar-event--monthly[aria-pressed="true"] .event-title {
    color: #fff;
}

/* Loading State for Monthly Calendar */
.calendar-month-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.calendar-month-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #4b6cb7;
    border-radius: 50%;
    animation: calendar-spin 1s linear infinite;
    z-index: 10;
}

/* Compact Monthly Calendar Variant */
.calendar-widget--compact .calendar-month-grid {
    gap: 1px;
}

.calendar-widget--compact .calendar-month-body {
    gap: 1px;
}

.calendar-widget--compact .calendar-day {
    min-height: 60px;
    padding: 0.25rem;
    width: 100%;
}

.calendar-widget--compact .calendar-day-number {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.calendar-widget--compact .calendar-event--monthly {
    font-size: 0.65rem;
    padding: 0.15rem 0.25rem;
    min-height: 1rem;
}

.calendar-widget--compact .calendar-weekday-header {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
}

/* Large Monthly Calendar Variant */
.calendar-widget--large .calendar-month-grid {
    gap: 1px;
}

.calendar-widget--large .calendar-month-body {
    gap: 1px;
}

.calendar-widget--large .calendar-day {
    min-height: 140px;
    padding: 1rem;
    width: 100%;
}

.calendar-widget--large .calendar-day-number {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.calendar-widget--large .calendar-event--monthly {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    min-height: 1.6rem;
}

.calendar-widget--large .calendar-weekday-header {
    padding: 1.25rem 1rem;
    font-size: 1rem;
}

/* Enhanced Navigation Controls */
.calendar-nav-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.nav-title-container {
    flex: 1;
    text-align: center;
    position: relative;
    min-width: 0;
}

.nav-title {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.nav-title:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-month-year-selectors {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    z-index: 100;
    display: flex;
    gap: 0.5rem;
    min-width: 200px;
}

.nav-month-select,
.nav-year-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
}

.nav-month-select:focus,
.nav-year-select:focus {
    outline: 2px solid #4b6cb7;
    outline-offset: 1px;
}

.nav-month-select {
    flex: 2;
}

.nav-year-select {
    flex: 1;
}

.nav-today:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}