/* --- New Calendar Page Layout --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Allow filters to wrap on smaller screens */
}

/* NEW: Add a gap between the filter dropdowns */
#calendar-filters {
    display: flex;
    gap: 10px;
}

#calendar-filters select {
    background: var(--chip);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 16px;
    min-width: 120px;
}

/* Grid for the 12 months */
.year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Styles for each individual month */
.month-view {
    background: var(--card);
    border-radius: 16px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.month-header {
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--fg);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-grid .day,
.calendar-grid .weekday {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 32px;
    width: 32px;
    font-size: 13px;
}

.calendar-grid .weekday {
    color: var(--muted);
    font-weight: 700;
}

.calendar-grid .day.other-month {
    visibility: hidden; /* Hide days from other months */
}

.calendar-grid .day.today {
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    animation: pulse-today 2s infinite;
}

.calendar-grid .day.holiday {
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
}

/* --- Tooltip Styles --- */
.tippy-box[data-theme~='whatime'] {
  background-color: #f9fafb;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  box-shadow: var(--shadow);
}
.tippy-box[data-theme~='whatime'][data-placement^='top'] > .tippy-arrow::before {
  border-top-color: #f9fafb;
}

html.light body .tippy-box[data-theme~='whatime'] {
  background-color: #111827;
  color: #f9fafb;
  border: 1px solid #374151;
}
html.light body .tippy-box[data-theme~='whatime'][data-placement^='top'] > .tippy-arrow::before {
  border-top-color: #111827;
}

.tippy-content {
  padding: 4px 8px;
  line-height: 1.5;
}


@media (max-width: 900px) {
    .year-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .year-grid {
        grid-template-columns: 1fr;
    }
    #calendar-filters {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}


@keyframes pulse-today {
0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(224, 63, 86, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(224, 63, 86, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(224, 63, 86, 0);
  }
}

#calendar-filters {
    display: flex;
    gap: 10px; /* Adds space between dropdowns */
    flex-wrap: wrap;
}