/* Styles for shared/month-calendar.js */

.cal { padding: 0; overflow: hidden; border-top: 3px solid var(--brand); }
.cal-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-head .cal-title { margin: 0 0 0 auto; font-size: 20px; font-weight: 400; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays div { padding: 6px 8px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); text-align: right; }
.cal-day {
  min-height: 108px; padding: 4px 6px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; outline: none;
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover, .cal-day:focus-visible { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.cal-day.other { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.cal-day.other .cal-num { opacity: .45; }
.cal-num { text-align: right; font-size: 14px; }
.cal-day.today { background: color-mix(in srgb, var(--warning) 14%, transparent); }
.cal-day.today .cal-num { font-weight: 700; }
.cal-day.today .cal-num::before { content: 'Today '; font-size: 11px; font-weight: 400; color: var(--muted); }
.cal-day.chosen { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-events { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-event {
  display: flex; gap: 4px; align-items: baseline; justify-content: flex-start; width: 100%; min-height: 0;
  padding: 1px 6px; border: 0; border-radius: 3px; font-size: 12.5px; line-height: 1.5; text-align: left;
  background: color-mix(in srgb, var(--brand) 16%, var(--card)); color: var(--text);
  border-left: 3px solid var(--brand); overflow: hidden;
}
.cal-event.all-day { background: var(--brand); color: var(--brand-ink); border-left-color: var(--brand); }
.cal-time { font-weight: 700; flex: none; }
.cal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-more { font-size: 12px; color: var(--muted); padding-left: 6px; }
.cal-dots { display: none; gap: 3px; justify-content: center; margin-top: auto; }
.cal-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* Narrow screens: dots instead of names; the page lists the chosen day below. */
@media (max-width: 760px) {
  .cal-day { min-height: 56px; padding: 4px; }
  .cal-events { display: none; }
  .cal-dots { display: flex; }
  .cal-num { text-align: center; }
  .cal-day.today .cal-num::before { content: ''; }
  .cal-weekdays div { text-align: center; padding: 6px 2px; font-size: 12px; }
  .cal-head .cal-title { font-size: 17px; }
}

/* Public holidays, in green */
.cal-day.holiday { background: color-mix(in srgb, var(--ok) 12%, transparent); }
.cal-day.holiday .cal-num { color: var(--ok); font-weight: 700; }
.cal-holiday {
  font-size: 11.5px; font-weight: 600; color: #fff; background: var(--ok);
  border-radius: 3px; padding: 0 5px; line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.holiday-note {
  display: flex; gap: 8px; align-items: center; margin: 0 0 12px; padding: 8px 12px;
  border-radius: var(--radius); background: color-mix(in srgb, var(--ok) 14%, var(--card));
  border-left: 4px solid var(--ok); font-weight: 600;
}
@media (max-width: 760px) {
  .cal-holiday { font-size: 0; padding: 0; height: 4px; margin: 0 4px; border-radius: 2px; }
}
