/* W1 calendar (calendar-view.js) on the Mihwar design system r51 (B07). Tokens, .wk/.mo/.evt-*/.tl/.panel/.card and
   every state come from the verbatim lifeos.css (W0); this file only wires the board's grids to real data and resets
   the buttons that make each block keyboard-reachable. No new colors. */

.life-calendar, .cal-page, .cal-main, .cal-side { min-width: 0; }
.w1-cal-date .input { width: auto; min-height: 36px; padding-block: 4px; font-size: 14px; direction: ltr; }
.w1-cal-date .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cal-summary { gap: 6px 16px; }
.w1-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* week grid: header row, an all-day row, then the half-hour rows (28px) the board draws */
.w1-wk-wrap { border-radius: 12px; }
.w1-wk .hd { padding: 0; }
.w1-hd-btn { display: block; width: 100%; padding: 8px 4px; text-align: center; color: inherit; font: inherit; border-radius: 0; }
.w1-hd-btn:hover { background: var(--surface-2); }
.w1-wk .w1-allday { display: flex; flex-direction: column; gap: 3px; padding: 4px 3px; min-height: 40px; grid-auto-rows: auto; border-bottom: 1px solid var(--line); }
.w1-gutcol { display: grid; }
.w1-wk .evt { display: block; }
.w1-wk .w1-allday .evt { position: static; }
.w1-evt-btn { display: block; width: 100%; height: 100%; text-align: start; color: inherit; font: inherit; font-size: 12px; line-height: 1.3; cursor: pointer; overflow: hidden; }
.w1-evt-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 6px; }
.cal-cancelled { opacity: .6; }
.cal-cancelled .et, .cal-cancelled .w1-evt-title { text-decoration: line-through; }

/* month: the day number and pills are buttons (open the day / the record) */
.w1-dn { border: 0; padding: 0; font: inherit; cursor: pointer; text-align: start; align-self: flex-start; }
.mo button.pill { border: 0; cursor: pointer; text-align: start; width: 100%; font: inherit; font-size: 11.5px; }
.mo .md.today .w1-dn { display: grid; place-items: center; }

/* agenda rows and the event form */
.cal-agenda .tl .ev { grid-template-columns: 62px minmax(0, 1fr); }
.w1-evt-title { font-weight: 500; font-size: 14.5px; text-align: start; }
.cal-form .seg { align-self: flex-start; }
.cal-template .btn-row { margin-top: 2px; }

@media (max-width: 1023px) { .cal-side { order: 2; } }
@media (max-width: 640px) {
  .life-calendar .btn, .cal-page .btn, .life-calendar .seg button, .cal-page .seg button, .cal-page .chip-btn { min-height: 44px; }
  .life-calendar .pagehead .btn-row { width: 100%; }
  .mo .md { min-height: 64px; padding: 4px; }
  .mo button.pill { min-height: 24px; }
}
@media (prefers-reduced-motion: reduce) { .w1-hd-btn { transition: none; } }
