/* The home page's "Change season" drop-down (templates/home/_season_picker.html.twig, season_picker.js, src/Seasons.php picker()).
   The same four groups as the iPhone app's season sheet. A panel under the button on a desktop, a sheet along the foot of the screen
   on a phone. Hairlines, no glow. The pill itself (.hh-season summary) is styled in hymn_page.css, as "Other days" was. */
.hh-season { position: relative; }
.hh-season summary:focus-visible, .spk-row:focus-visible, .spk-cell:focus-visible, .spk-done:focus-visible, .spk-back a:focus-visible, .hh-back:focus-visible {
    outline: var(--ts-size-focus-ring, 2px) solid var(--ts-focus); outline-offset: 1px; }
.hh-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--ts-sienna); font-size: 14px; font-weight: 600; text-decoration: none; }
.hh-back:hover { text-decoration: underline; }

.spk-panel { box-sizing: border-box; width: 400px; max-width: calc(100vw - 2 * var(--ts-gutter-phone)); max-height: min(72vh, 680px); overflow-y: auto; overscroll-behavior: contain;
    margin-top: 8px; padding: 6px 8px 8px; background: var(--ts-white); border: 1px solid var(--ts-border-control); border-radius: var(--ts-radius-card);
    box-shadow: var(--ts-shadow-raised); color: var(--ts-text); font-family: var(--ts-font-sans); }
.hh-season[open] > .spk-panel { position: absolute; z-index: var(--ts-z-sticky); left: 0; top: 100%; }
.spk-top { display: none; }

.spk-group { margin: 0; padding: 6px 0 2px; }
.spk-group + .spk-group { border-top: 1px solid var(--ts-border); }
.spk-group h2 { margin: 6px 8px 4px; font-family: var(--ts-font-sans); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ts-text-muted); }
.spk-group h2 span { font-weight: 500; letter-spacing: 0; text-transform: none; }
.spk-list, .spk-grid { margin: 0; padding: 0; list-style: none; }

.spk-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 8px; border-radius: var(--ts-radius-md); color: var(--ts-text); text-decoration: none; }
.spk-row:hover { background: var(--ts-surface-raised); }
.spk-row.is-shown { background: var(--ts-surface-raised); }
.spk-ic { flex: none; display: block; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--ss, var(--ts-surface-raised)); }
.spk-ic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.spk-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.spk-txt b { font-size: 16px; font-weight: 600; color: var(--ts-ink); }
.spk-txt span { font-size: 13px; color: var(--ts-text-muted); }
.spk-trail { flex: none; font-size: 13px; color: var(--ts-text-muted); white-space: nowrap; }
.spk-check { flex: none; font-size: 16px; color: var(--ts-sienna); }

.spk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 2px; padding: 0 0 4px; }
.spk-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; padding: 8px 4px 6px; border-radius: var(--ts-radius-md);
    color: var(--ts-text); font-size: 12px; line-height: 1.2; text-align: center; text-decoration: none; }
.spk-cell:hover { background: var(--ts-surface-raised); }
.spk-cell .spk-ic { width: 56px; height: 56px; }
.spk-cell.is-shown .spk-ic, .spk-row.is-shown .spk-ic { outline: 2px solid var(--ts-brown); outline-offset: 2px; }
.spk-cell.is-shown span:not(.spk-ic) { font-weight: 700; color: var(--ts-ink); }

.spk-back { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--ts-border); }
.spk-back a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; color: var(--ts-sienna); font-size: 14px; font-weight: 600; text-decoration: none; }
.spk-back a:hover { text-decoration: underline; }

/* phone: a sheet along the foot of the screen, over a pale scrim; every tap target 44px or more */
@media (max-width: 760px) {
    .hh-season summary { min-height: 44px; }
    .hh-season[open]::before { content: ""; position: fixed; inset: 0; z-index: calc(var(--ts-z-overlay) - 1); background: rgba(35, 27, 24, .28); }
    .hh-season[open] > summary { position: relative; z-index: var(--ts-z-overlay); }
    .hh-season[open] > .spk-panel { position: fixed; z-index: var(--ts-z-overlay); left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; max-height: 86vh; margin: 0;
        padding: 0 var(--ts-gutter-phone) calc(12px + env(safe-area-inset-bottom)); border-width: 1px 0 0; border-radius: var(--ts-radius-card) var(--ts-radius-card) 0 0; box-shadow: none; }
    .spk-top { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; padding: 14px 0 6px; background: var(--ts-white); }
    .spk-top::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--ts-border-control); }
    .spk-top b { font-family: var(--ts-font-display); font-weight: 400; font-size: 20px; color: var(--ts-brown); }
    .spk-done { display: none; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ts-sienna); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
    .hh-season.spk-js .spk-done { display: inline-flex; align-items: center; }
    .spk-row { min-height: 60px; }
    .spk-back a { min-height: 48px; }
    html.spk-lock { overflow: hidden; }
}
