/* Volunteer pages: hours, events, shifts, plot cover, calendar feeds.
   Built on the shared patterns in app.css (.ph, .toolbar, .group, .fields, .split). */
.vol-gap { margin-bottom: 1rem; }
.vol-gap-top { margin-top: .75rem; }
.vol-block { display: block; }
.vol-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.vol-chips:empty { display: none; }
.vol-desc { margin: .35rem 0 0; }
/* Social events: guest count and a note, as a small labelled form row under the event. */
.vol-guests { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .9rem; margin-top: .6rem; }
.vol-guests-field { display: flex; flex-direction: column; gap: .2rem; }
.vol-guests-field label { margin: 0; color: var(--muted); }
.vol-guests-field input[name=guests] { width: 5.5em; }
.vol-guests-note { flex: 1 1 14rem; max-width: 26rem; }
.vol-guests-ask { margin-top: .45rem; }
details.disclose.vol-guests-ask > summary { display: inline-flex; min-height: 2.75rem; gap: .5rem; font-size: .9375rem; font-weight: 400; color: var(--tint); }
.vol-actions { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: flex-end; align-items: center; flex: none; }
.vol-sub { font-size: .95rem; font-weight: 600; margin: 1.25rem 0 .2rem; }
.vol-warn { margin-top: .35rem; font-size: .875rem; color: var(--amber); }
.vol-more { margin: .75rem 0 0; }
.vol-asks { margin: .75rem 0 0; }
.vol-actions-tight { margin-top: 0; }
.vol-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; }
.vol-checks > * + * { margin-top: .6rem; }

/* Groups that sit in a two-column grid line up at the top. */
.grid > .group + .group { margin-top: 0; }
.vol-groups { margin-top: 1.5rem; }
.vol-top + .group { margin-top: 1.5rem; }

/* Progress */
.vol-progress-meta { margin: 0; }
.big-number + .vol-progress-meta { margin-top: .75rem; }
.vol-progress-meta + .help { margin-top: .25rem; }

/* Two or three short fields side by side, even in a narrow column. */
.fields.vol-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields.vol-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields.vol-three > :first-child { grid-column: 1 / -1; }
.vol-cost { margin: 0 0 .7rem .1rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.vol-cover { margin-top: 1.25rem; }

.vol-copy { display: flex; gap: .5rem; }
.vol-copy input { flex: 1; min-width: 0; font-size: .875rem; }
.vol-copy button { flex: none; }
.vol-feed-title { font-weight: 600; margin: 0 0 .5rem; }
.vol-feed-apps { display: flex; flex-wrap: wrap; gap: .5rem; }
.vol-feed-apps .btn { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.vol-feed-other { margin-top: .25rem; }
.vol-feed-more { border-top: .5px solid var(--sep); padding-top: .5rem; }
.vol-feed-more[open] > .vol-feed + .vol-feed-reset { margin-top: 1rem; }
.vol-feed-other > summary { font-weight: 400; font-size: .9375rem; color: var(--muted); }

/* Hours admin */
.vol-tabs { min-width: min(100%, 440px); }
.vol-sheet .vol-hours { width: 5.5rem; flex: none; min-height: 36px; padding: .35rem .6rem; }
.vol-sheet .check { align-items: center; }
.fields + .vol-sheet { margin-top: .25rem; }
@media (max-width: 520px) {
  .vol-tabs { width: 100%; }
  .vol-tabs button { padding-inline: .35rem; white-space: nowrap; }
}
.vol-decide { margin-top: 1rem; display: grid; gap: 1rem; }
.vol-decide-main { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.vol-decide-reject { display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap; padding-top: 1rem; box-shadow: inset 0 .5px 0 var(--sep); }
.vol-decide-reject .grow { flex: 1 1 240px; }
.vol-settings > .form-error { margin-top: 1rem; }

/* Rota form */
/* A grid, so the day checkboxes line up in columns when they wrap in the narrow side panel. */
.vol-days { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); gap: .5rem 1rem; }
.vol-days legend { grid-column: 1 / -1; }
.vol-days legend { font-size: .875rem; font-weight: 500; color: var(--muted); margin: 0 0 .4rem .1rem; padding: 0; }
.vol-days .check { font-size: .95rem; }

/* The four-week grid: the day shows once, rows of the same day sit together. */
.vol-grid .vol-day { white-space: nowrap; font-weight: 500; width: 1%; }
.vol-grid tr.vol-day-cont td { border-top-color: transparent; padding-top: .2rem; }
.vol-who { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.vol-who li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem; }

@media (max-width: 600px) {
  /* Phones: title and date take the full line, the buttons wrap underneath at full width.
     Covers both the plain rows (li.row-split) and the calendar rows (li > div.row-split). */
  .list > li.row-split:has(> .vol-actions), .list > li.row-split:has(> .row-actions),
  .list > li > .row-split:has(> .vol-actions) { flex-wrap: wrap; }
  :is(.list > li.row-split, .list > li > .row-split):has(> .vol-actions) > .grow { flex-basis: 100%; }
  .vol-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .vol-rsvp .small { max-width: none; }
}

/* Calendar: your RSVP shows as state beside the way to undo it */
.vol-rsvp { gap: .6rem; }
/* Calendar: a repeating rota folds into one row; open it to see each shift */
.vol-rota > details.disclose > summary { min-height: 0; font-weight: 400; }
.vol-rota > details.disclose[open] > summary { margin-bottom: .6rem; }
.vol-rota > details.disclose > .list { box-shadow: inset 0 .5px 0 var(--sep); padding-top: .35rem; }
#feed:focus { outline: none; }

/* Coordinator shortcuts on member pages: one quiet line at the very bottom. */
.vol-coord { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.25rem; margin: 2rem 0 0 1.25rem; }
@media (max-width: 600px) {
  .vol-coord { margin-inline-start: 0; }
  /* Row buttons big enough to tap. */
  .vol-actions > button, .vol-actions > .btn { min-height: 40px; }
  .vol-actions > button.quiet { padding-inline: .25rem; }
}

/* Head farmer: My section (read-only) */
.vol-sec-help { margin: 0 0 1.25rem; max-width: 60ch; }
.vol-sec-facts { margin: 0 0 .5rem; }
.vol-sec .row-meta + .row-meta { margin-top: .3rem; }
.vol-sec .row-meta .chip { margin-inline-end: .25rem; }
/* The one-line "what is a head farmer" under the label wherever it's named on Home */
.hf-help { display: block; margin: .2rem 0 0; }

/* Hours admin: Members table. On phones the three number columns fold into one line under the name
   ("Approved 2 of 12 · 1.5 waiting") so the table fits without sideways scrolling. */
.vol-members .vol-narrow { display: none; }
.vol-filter { margin: 0 0 .75rem; }
@media (max-width: 600px) {
  .vol-members .vol-wide { display: none; }
  .vol-members .vol-narrow { display: block; }
  .vol-members td:nth-child(2) { white-space: normal; }
}

/* Waiting: each entry has its own Approve beside the tick. */
#q .list > li.row-split { align-items: flex-start; }
#q .vol-actions > button { min-height: 36px; }

/* A save that redraws a long list says so at the top, and the page scrolls to it. */
.vol-flash { margin: 0 0 1rem; }
.vol-flash:focus { outline: none; }

/* Name filter above the attendance and sign-in lists */
#att-q, #sq { max-width: 22rem; }
li[data-name][hidden] { display: none; }

/* Calendar: the RSVP is one toggle. Pressed (going) it reads as a soft green state; press again to cancel. */
.vol-toggle.on, .vol-toggle[aria-pressed="true"] { background: var(--tint-soft); color: var(--tint); box-shadow: inset 0 0 0 1px var(--tint); }
.vol-rsvp .small { max-width: 14rem; }

/* Log hours: one-tap chips under Date and Hours (Today, Yesterday; 1 h, 2 h, 3 h) */
.vol-picks { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.vol-pick { min-height: 36px; padding: .2rem .8rem; border-radius: 999px; background: var(--fill); color: var(--ink); font-weight: 500; box-shadow: none; }
.vol-pick[aria-pressed="true"] { background: var(--tint-soft); color: var(--tint); box-shadow: inset 0 0 0 1px var(--tint); }
.vol-awaiting { margin: .5rem 0 0; font-size: .95rem; }

/* Home: "Log 2 h Compost today" on the hours row, then "Sent ... Undo" in its place */
.vol-quick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.vol-quick [role=status] { color: var(--muted); }

/* Home "Coming up": "I'm going" beside a workday */
.ev-list > li.ev-has-go { display: flex; align-items: center; gap: .5rem; }
.ev-list > li.ev-has-go > .ev-row { flex: 1; min-width: 0; }
.ev-go { flex: none; min-height: 40px; }

/* Approval queue: a workday's self-logged entries, credited as attendance in one tap */
.vol-credit { margin-bottom: .75rem; }
.vol-actions-start { justify-content: flex-start; }
.vol-att-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1rem; }
.vol-fix { margin: .35rem 0 .25rem; }
.vol-fix form { margin-top: .5rem; }

/* Hours: a shared plot's hours, everyone's together */
.vol-shared { margin: .5rem 0 0; font-size: .95rem; }

/* Hours admin, Members: filter, sort and copy emails on one wrapping line */
.vol-member-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; margin: 0 0 .75rem; }
/* People who share a plot sit together; a soft mark at the start of their rows ties them up. */
.vol-members tr.vol-shared-row td:first-child { box-shadow: inset 3px 0 0 var(--tint-soft); }

/* Attendance: the running count above the list */
.vol-att-count { margin: 0; }
/* Owner decisions 4 and 17: your own hours wait for another approver; hours by garden role. */
.vol-second { margin-top: .35rem; font-size: .875rem; color: var(--muted); }
.vol-role-line { margin-top: .35rem; }
.vol-role-hours th[scope=row] { font-weight: 500; text-align: start; }
.vol-role-hours select { min-width: 0; max-width: 100%; }
.vol-role-credit { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.vol-role-credit .vol-hours { width: 5.5rem; }

/* Calendar: asking for plot cover and adding the calendar to your phone are occasional, so they sit folded at the
   foot of the page, one row each. */
.vol-more { margin-top: 1.5rem; padding-block: .25rem; }
.vol-more > details.disclose + details.disclose { border-top: .5px solid var(--sep); }
.vol-more > details.disclose > summary { min-height: 48px; }
.vol-more > details.disclose[open] { padding-bottom: 1rem; }
.vol-more .vol-cover { margin-top: 0; }
.vol-approve-all { margin: 0 0 .5rem; } .vol-approve-all .primary { width: 100%; }

/* Work credits: a month that came up short */
.vol-month-short { color: var(--amber-ink); }
