:root {
  --yes: #2e9e5b;
  --maybe: #e0a526;
  --line: var(--pico-muted-border-color);
}

.brand { font-weight: 800; font-size: 1.5rem; text-decoration: none; letter-spacing: -0.03em; }
.brand span { color: var(--pico-primary); }

.description { white-space: pre-wrap; }
.chosen { padding: 0.75rem 1rem; border-radius: var(--pico-border-radius); background: color-mix(in srgb, var(--yes) 15%, transparent); border-left: 4px solid var(--yes); }
.warn { color: var(--pico-del-color); }
.scroll { overflow-x: auto; }

/* Poll type switch on the create form, no JS needed. */
form:has([name=kind][value=days]:checked) [data-kind=window],
form:has([name=kind][value=window]:checked) [data-kind=days] { display: none; }

.weekdays { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-bottom: 0.5rem; }
.weekdays label { margin: 0; }

/* Month calendars */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.5rem; margin: 1rem 0; }
.month strong { display: block; margin-bottom: 0.5rem; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.days .wd { font-size: 0.75rem; color: var(--pico-muted-color); }
.days > span, .days button { aspect-ratio: 1; display: grid; place-items: center; font-size: 0.9rem; }
.days .out { color: var(--pico-muted-color); opacity: 0.4; }
.days button {
  margin: 0; padding: 0; width: auto; border-radius: 6px; line-height: 1;
  background: transparent; color: inherit; border: 1px solid var(--line); /* Pico redefines --pico-color inside buttons */
}
.days button.holiday { text-decoration: underline wavy var(--pico-del-color); }
.days button.sel { background: var(--pico-primary-background); color: var(--pico-primary-inverse); border-color: transparent; }
.days button.yes, .key.yes, .answers td.yes { background: var(--yes); color: #fff; border-color: transparent; }
.days button.maybe, .key.maybe, .answers td.maybe { background: var(--maybe); color: #222; border-color: transparent; }
.key { padding: 0 0.4rem; border-radius: 4px; }

/* Availability painter */
.window-grid { border-collapse: collapse; user-select: none; -webkit-user-select: none; width: auto; margin: 0.5rem 0 1rem; }
.window-grid th, .window-grid td { padding: 0 0.25rem; border: 0; font-size: 0.75rem; background: transparent; }
.window-grid thead th { white-space: nowrap; text-align: center; padding-bottom: 0.25rem; }
.window-grid tbody th { vertical-align: top; color: var(--pico-muted-color); transform: translateY(-0.5em); }
.window-grid td {
  min-width: 3.5rem; height: 0.9rem; cursor: pointer;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  touch-action: pan-x; /* vertical drags paint, horizontal swipes scroll */
}
.window-grid tr:nth-child(4n + 1) td { border-top: 1px solid var(--line); }
.window-grid tr:last-child td { border-bottom: 1px solid var(--line); }
.window-grid td.free { background: var(--yes); }

/* Results */
.option { padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.option.is-chosen { outline: 3px solid var(--yes); }
.option.is-blocked { opacity: 0.6; }
.answers { font-size: 0.85rem; }
.answers td, .answers thead th { text-align: center; white-space: nowrap; }
.answers tbody th, .answers thead th:first-child { white-space: nowrap; text-align: left; }
form.inline { display: inline; margin: 0; }
form.inline.end { float: right; margin-left: 0.5rem; }
form.inline button, .actions button { width: auto; margin: 0; padding: 0.2rem 0.6rem; font-size: 0.8rem; }
