/* Modern Calendar Widget Styles */
:root {
    --primary: #435ebe;
    --primary-light: #f0f4ff;
    --text-dark: #25396f;
    --text-muted: #a0a0a0;
    --border-color: #e5e7eb;
}

#dashboardCalendar {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    padding: 10px;
    background: #fff;
    border-radius: 12px;
}

/* Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.calendar-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: capitalize;
    color: var(--text-dark);
}

.calendar-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.calendar-header button:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Days Header (Sun, Mon, Tue...) */
.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px; /* Spacing between days */
}

/* Individual Day Cell */
.calendar-day {
    aspect-ratio: 1; /* Perfect square */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 50%; /* Circle shape */
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.calendar-day:hover:not(.empty) {
    background-color: var(--primary-light);
    color: var(--primary);
    transform: scale(1.1);
}

.calendar-day.today {
    background-color: var(--primary);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(67, 94, 190, 0.3);
}

.calendar-day.selected {
    border: 2px solid var(--primary);
    background-color: transparent;
    color: var(--primary);
    font-weight: bold;
}

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

/* Event Indicator Dot */
.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background-color: #ff5b5c; /* Red dot for events */
    border-radius: 50%;
}

.calendar-day.today.has-event::after {
    background-color: white;
}

/* Animation */
.calendar-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Holiday Styles */
.calendar-day.holiday {
    color: #dc3545; /* Red text for holidays */
    font-weight: bold;
    background-color: rgba(220, 53, 69, 0.1);
}

.calendar-day.holiday:hover:not(.empty) {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.calendar-day.holiday.today {
    background: var(--primary);
    color: white;
}

.calendar-day.holiday::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 10;
    pointer-events: none;
}

.calendar-day.holiday:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: 110%;
}
