
/* ==========================================
   DAYS & DATES - ANNUAL CALENDAR MATRIX
========================================== */

.calendar-month-card {
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

/* Seven-column calendar grid */
.calendar-month-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
}

.calendar-weekdays {
    margin-bottom: 8px;
}

.calendar-weekday {
    min-width: 0;
    text-align: center;
    padding: 7px 0;
    font-size: 12px;
    font-weight: 700;
}

.calendar-days {
    grid-auto-rows: minmax(38px, auto);
}

/* Calendar dates */
.calendar-day {
    position: relative;
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.calendar-day-empty {
    pointer-events: none;
}

.calendar-day-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    border-radius: 9px;
    color: var(--text-primary, #202431);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s ease;
}

.calendar-day-link:hover {
    background: rgba(79, 70, 229, .10);
    color: #4f46e5;
}

/* Today */
.calendar-day.is-today .calendar-day-link {
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

/* Selected date */
.calendar-day.is-selected .calendar-day-link {
    background: rgba(139, 92, 246, .16);
    color: #6d28d9;
    outline: 2px solid #8b5cf6;
    outline-offset: -2px;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .10);
    font-weight: 800;
    z-index: 1;
}

.calendar-day.is-today.is-selected .calendar-day-link {
    background: #2563eb;
    color: #fff;
    outline-color: #a78bfa;
}

/* Event indicator */
.calendar-day.has-events .calendar-day-link::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f59e0b;
    transform: translateX(-50%);
}

.calendar-day.is-today.has-events .calendar-day-link::after {
    background: #fff;
}

/* Monthly events */
.calendar-month-events {
    border-top: 1px solid var(--border-color, #e5e7eb);
    margin-top: 14px;
    padding-top: 12px;
}

.calendar-month-event-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
    line-height: 1.45;
}

.calendar-month-event-date {
    flex: 0 0 28px;
    color: var(--text-muted, #777);
    font-weight: 700;
}

.calendar-month-event-item a {
    min-width: 0;
    color: var(--text-primary, #202431);
    text-decoration: none;
}

.calendar-month-event-item a:hover {
    color: var(--bs-primary, #2563eb);
}

/* Calendar legend */
.calendar-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    background: #f59e0b;
}

.calendar-legend-dot.is-today {
    background: #2563eb;
}

.calendar-legend-dot.is-selected {
    background: #8b5cf6;
}

.calendar-legend-dot.has-events {
    background: #f59e0b;
}

/* Mobile */
@media (max-width: 575.98px) {
    .calendar-month-grid {
        gap: 2px;
    }

    .calendar-day,
    .calendar-day-link {
        min-height: 34px;
    }

    .calendar-weekday {
        font-size: 11px;
    }

    .calendar-day-link {
        font-size: 12px;
    }
}

/* Print */
@media print {
    .calendar-month-card {
        break-inside: avoid;
        box-shadow: none !important;
    }

    .calendar-month-events {
        display: none;
    }

    .calendar-day-link {
        color: #111 !important;
    }
}
