/* Calendar sheet is opened from the single calendar button in the thread header. */
.calendar-sheet.sheet { max-width:420px; }
.calendar-sheet .sheet-header { padding:16px 18px 8px; border:0; }
.calendar-sheet .sheet-header h2 { font-size:18px; }
.calendar-content { padding:0 16px calc(16px + var(--safe-bottom)); }
.calendar-navigation { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:2px 0 8px; }
.calendar-navigation button { min-height:44px; background:transparent; color:var(--accent); border-radius:var(--radius-pill); }
.calendar-step { width:44px; font-size:30px; line-height:1; flex:none; }
.calendar-period { padding:6px 12px; font-size:16px; font-weight:600; text-transform:capitalize; }
.calendar-period::after { content:'⌄'; margin-left:7px; font-size:16px; }
.calendar-weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
.calendar-weekdays { color:var(--muted); text-align:center; font-size:12px; line-height:28px; }
.calendar-day,.calendar-blank { height:43px; min-width:0; }
.calendar-day { display:grid; place-items:center; font-size:16px; border-radius:50%; background:transparent; color:var(--text); font-variant-numeric:tabular-nums; }
.calendar-day.has-messages { position:relative; font-weight:600; }
.calendar-day.has-messages::after { content:""; position:absolute; left:50%; bottom:4px; width:4px; height:4px; border-radius:50%; background:var(--accent); transform:translateX(-50%); }
.calendar-day.has-messages.selected::after { background:var(--file-button-text); }
.calendar-day:disabled { color:color-mix(in srgb,var(--muted) 56%,transparent); cursor:default; }
.calendar-day.today:disabled { box-shadow:none; color:var(--muted); }
@media (hover:hover) and (pointer:fine) {
  .calendar-day:hover { background:var(--surface); }
}
.calendar-day.today { box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 60%,transparent); color:var(--accent); }
.calendar-day.selected { color:var(--file-button-text); background:var(--accent); box-shadow:none; font-weight:600; }
.calendar-months { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:12px 0; min-height:273px; }
.calendar-month { min-height:50px; border-radius:var(--radius-pill); background:var(--surface); color:var(--text); font-size:14px; text-transform:capitalize; }
.calendar-month.selected { background:var(--soft-accent); color:var(--accent); }
.calendar-selection { color:var(--muted); font-size:13px; min-height:20px; line-height:20px; margin:14px 0 6px; text-align:center; }
.calendar-shortcuts { display:flex; justify-content:space-between; gap:8px; margin-bottom:8px; }
.calendar-shortcuts button { min-height:40px; padding:8px 10px; border-radius:var(--radius-pill); background:transparent; color:var(--accent); font-size:14px; }
.calendar-apply { display:block; width:100%; min-height:var(--control-height); border-radius:var(--radius-pill); padding:12px; background:var(--accent); color:var(--file-button-text); font-size:15px; font-weight:600; }
.calendar-apply:disabled { cursor:default; }
@media(max-width:700px) { .calendar-sheet.sheet { width:100%; margin:0 auto; left:0; right:0; border-radius:var(--radius-panel) var(--radius-panel) 0 0; } }

.calendar-day{width:100%;max-width:44px;aspect-ratio:1;height:auto;justify-self:center}
