/* Volunteers (migration 0014): the Follow / Ready to help control on a masjid's timetable page and the "Following" mark on
   its card (Find a Masjid), the volunteer page (/volunteer/, on top of account.css) and the managers' panel on /manage/
   (manage/volunteers-panel.js adds this file when the page hasn't). Tokens only; logical properties, so RTL works. */

/* ── Follow (Find a Masjid) ── */
.fw { margin: 14px 0 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.fw-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fw-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--gold); border-radius: 999px; background: transparent; color: var(--heading);
  font: 600 14px var(--font-body); text-decoration: none; cursor: pointer;
}
.fw-btn:hover { background: var(--gold-pale); }
.fw-btn[aria-pressed="true"] { background: var(--gold-pale); color: var(--gold-text); }
.fw-btn[aria-disabled="true"] { opacity: 0.6; cursor: wait; }
.fw-btn span[aria-hidden] { color: var(--gold); font-size: 16px; line-height: 1; }
.fw-hint { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.fw-ready { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; cursor: pointer; }
.fw-ready > span { display: grid; gap: 2px; font-size: 14px; color: var(--heading); }
.fw-ready b { font-weight: 600; }
.fw-msg { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--sage); }
.fw-msg:empty { display: none; }
.fw-msg[data-state="error"] { color: var(--danger); }
.fw-msg a, .fw-more a { color: var(--gold-text); font-weight: 600; }
.fw-more { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.fw-mark { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--gold-text); }
.fw-mark span { color: var(--gold); }

/* A switch (Ready to help): a checkbox with role="switch"; off = an outline, on = sage with the knob at the end. */
input[role="switch"] {
  appearance: none; flex: none; position: relative; width: 42px; height: 24px; margin: 1px 0 0;
  border: 1.5px solid var(--muted); border-radius: 12px; background: transparent; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
input[role="switch"]::before {
  content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--muted); transition: inset-inline-start 0.2s, background 0.2s;
}
input[role="switch"]:checked { border-color: var(--sage); background: var(--sage); }
input[role="switch"]:checked::before { inset-inline-start: 21px; background: var(--bg-alt); }
input[role="switch"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input[role="switch"]:disabled { opacity: 0.45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { input[role="switch"], input[role="switch"]::before { transition: none; } }

/* "Stop following?" (volunteer/follow.js ask()) */
.vol-dialog { max-width: 420px; }
.vol-dialog form { padding: 28px 24px 22px; }
.vol-ask-body { color: var(--muted); font-size: 14px; line-height: 1.65; }
.vol-ask-body p + p { margin-top: 6px; }
.vol-ask-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.vol-ask-actions > * { flex: 1 1 auto; padding: 12px 18px; }
.vol-dialog .btn-danger, .vol-dialog .btn-danger:hover { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }

/* ── The volunteer page (/volunteer/) ── */
.vol { max-width: 620px; }
.vol-cta { display: block; text-align: center; text-decoration: none; }
.vol-skills { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.vol-skills legend { margin-bottom: 8px; }
.vol-skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.vol-skill {
  display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13.5px; color: var(--text); cursor: pointer;
}
.vol-skill:has(input:checked) { border-color: var(--sage); background: var(--tint); color: var(--heading); font-weight: 600; }
.vol-skill input { flex: none; width: 17px; height: 17px; accent-color: var(--sage); }
.vol-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .vol-two { grid-template-columns: 1fr; } }

.vol-follows { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.vol-explain { margin: 8px 0 14px; padding: 12px 14px; border-radius: 10px; background: var(--gold-pale); color: var(--text); font-size: 13px; line-height: 1.6; }
.vol-explain p + p { margin-top: 6px; }
.vol-explain strong { color: var(--heading); }
.vol-list { list-style: none; display: grid; gap: 10px; }
.vol-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.vol-item-main { display: grid; gap: 2px; }
.vol-item-name { font-weight: 600; color: var(--heading); overflow-wrap: anywhere; }
a.vol-item-name:hover { color: var(--gold-text); }
.vol-item-where { font-size: 12.5px; color: var(--muted); }
.vol-item-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 8px; }
.vol-item-acts .fw-ready { margin-top: 0; align-items: center; }
.vol-item-acts .acct-textbtn { font-size: 13px; }
.vol-empty { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ── The managers' panel (/manage/: manage/volunteers-panel.js) ── */
.vp h2 { font-family: var(--font-display); font-size: calc(26px * max(var(--title-scale), 0.72)); font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.vp-counts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--text); }
.vp-intro { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.vp-rules { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: var(--gold-pale); color: var(--text); font-size: 12.5px; line-height: 1.6; }
.vp-tools { margin-top: 14px; max-width: 260px; }
.vp-list { list-style: none; display: grid; gap: 10px; margin-top: 12px; }
.vp-item { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.vp-name { font-weight: 600; color: var(--heading); overflow-wrap: anywhere; }
.vp-where, .vp-since { font-size: 12.5px; color: var(--muted); }
.vp-skills { display: flex; flex-wrap: wrap; gap: 4px; }
.vp-skills span { padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--tint); font-size: 12px; }
.vp-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.vp-acts a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 13.5px; text-decoration: none; }
.vp-acts a:hover { border-color: var(--gold); }
.vp-acts a bdi { font-family: 'DM Sans', sans-serif; color: var(--muted); }
.vp-status { margin-top: 12px; font-size: 14px; color: var(--muted); }
.vp-status[data-state="error"] { color: var(--danger); }
