/* Volunteering (web/js/pages/volunteer.js): need cards, commitments, the duty-roster month grid; the calendar's
   "your commitment" entries (web/js/pages/school.js) and the Dashboard card (web/js/pages/today.js). */
.jb-vol-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--chip); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.jb-tabs + #vtab { margin-top: 18px; }
.jb-vol-date { flex: 0 0 auto; width: 54px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); text-align: center; overflow: hidden; line-height: 1.1; }
.jb-vol-date .m { display: block; background: var(--maroon); color: var(--on-maroon, #fff); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 0; }
.jb-vol-date .d { display: block; font-family: var(--caps); font-size: 22px; font-weight: 600; color: var(--ink); padding-top: 3px; }
.jb-vol-date .w { display: block; font-size: 11px; color: var(--ink-3); padding-bottom: 4px; }

.jb-vol-need, .jb-vol-commit { display: flex; flex-direction: column; gap: 12px; }
.jb-vol-need.is-mine { border-color: var(--sage-line); box-shadow: inset 4px 0 0 var(--sage); }
.jb-vol-need.jb-vol-flash { animation: jb-vol-flash 1.6s ease-out 1; }
@keyframes jb-vol-flash { 0% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.jb-vol-needhead { display: flex; align-items: flex-start; gap: 14px; }
.jb-vol-title { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.2; margin: 2px 0 2px; }
.jb-vol-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: 0 0 auto; }
.jb-vol-desc { margin: 0; }
.jb-vol-more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--maroon-text); }
.jb-vol-more p, .jb-vol-instr { white-space: pre-line; }
.jb-vol-instr { background: var(--chip-soft); border-left: 3px solid var(--sage-soft, var(--line)); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 10px 14px; font-size: 14.5px; }
.jb-vol-slots { border-top: 1px solid var(--line-soft); }
.jb-vol-slots .jb-item { border-bottom: 1px solid var(--line-soft); }
.jb-vol-slots .jb-item:last-child { border-bottom: 0; }
.jb-vol-done { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--sage-ink); }
.jb-vol-done .jb-ico { width: 18px; height: 18px; }
.jb-vol-needfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.jb-vol-contact { display: flex; align-items: center; gap: 12px; min-width: 0; }
.jb-vol-needfoot .jb-vol-contact { flex: 1 1 260px; }
.jb-vol-contact a[href^="tel:"] { color: inherit; }
.jb-vol-what { display: flex; flex-direction: column; gap: 2px; }
.jb-vol-what b { font-size: 17px; }
.jb-vol-daynote { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-tint); color: var(--ink); border-radius: var(--r-sm); padding: 10px 14px; font-size: 14.5px; }
.jb-vol-daynote .jb-ico { flex: 0 0 auto; margin-top: 2px; }
.jb-vol-offers { border-color: var(--accent); }
.jb-vol-next { display: flex; flex-direction: column; gap: 8px; }
.jb-vol-interests { display: flex; flex-direction: column; gap: 10px; }
.jb-vol-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.jb-vol-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.jb-vol-chip span { color: var(--ink-4); font-weight: 700; }
.jb-vol-chip:hover { background: var(--chip-soft); }
.jb-vol-chip[aria-current="true"] { background: var(--maroon); border-color: var(--maroon); color: var(--on-maroon, #fff); }
.jb-vol-chip[aria-current="true"] span { color: inherit; opacity: .8; }
.jb-vol-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.jb-vol-roster { text-decoration: none; color: inherit; border-bottom: 1px solid var(--line-soft); }
.jb-vol-roster:hover b { color: var(--maroon-text); text-decoration: underline; }
.jb-vol-slotrow { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--chip-soft); }
.jb-vol-slotrow > .jb-form { flex: 1 1 auto; }
.jb-vol-pick { max-height: calc(40vh / var(--zf, 1)); overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; }
.jb-vol-pickrow { cursor: pointer; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.jb-vol-pickrow input { width: 18px; height: 18px; accent-color: var(--sage); margin: 0; }
.jb-vol-pattern .jb-check { flex-wrap: wrap; gap: 8px; }
.jb-vol-pattern select, .jb-vol-pattern input[type=date] { min-height: 36px; }
.jb-vol-pattern input[type=date] { min-width: 150px; flex: 0 0 auto; }
.jb-vol-dates { width: 100%; min-height: 36px; padding: 0 12px; border: 1px solid var(--line, #d9d6cc); border-radius: 10px; background: var(--chip-soft); color: inherit; font: inherit; }
.jb-vol-gapnote { display: flex; gap: 8px; align-items: center; background: var(--amber-tint); color: var(--amber); border-radius: var(--r-sm); padding: 8px 12px; font-size: 14px; font-weight: 600; margin: 10px 0 0; }

/* the roster's month grid (school days only, unless the roster runs on weekends) */
.jb-duty-grid { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 12px; }
.jb-duty-grid > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.jb-duty-grid .dow { background: var(--chip-soft); font-weight: 700; text-align: center; color: var(--ink-3); font-size: 12px; padding: 6px 0; }
.jb-duty-grid .cell { min-height: 92px; padding: 6px; background: var(--card); font: inherit; font-size: 12.5px; text-align: left; display: flex; flex-direction: column; gap: 3px; border-top: 0; border-left: 0; color: inherit; min-width: 0; }
.jb-duty-grid button.cell { cursor: pointer; }
.jb-duty-grid button.cell:hover { background: var(--maroon-wash); }
.jb-duty-grid button.cell:focus-visible { outline: 2px solid var(--maroon); outline-offset: -2px; }
.jb-duty-grid .cell.off { background: var(--chip-soft); }
.jb-duty-grid .cell.out .n { color: var(--ink-4); }
.jb-duty-grid .cell.is-today { box-shadow: inset 0 0 0 2px var(--maroon); }
.jb-duty-grid .cell.gap { background: var(--amber-tint); }
.jb-duty-grid .cell.holiday, .jb-duty-grid .cell.cancelled { background: var(--chip-soft); color: var(--ink-3); }
.jb-duty-grid .n { font-weight: 700; display: flex; align-items: center; gap: 4px; }
.jb-duty-grid .who { display: block; padding: 2px 6px; border-radius: 4px; background: var(--sage-tint); color: var(--sage-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.jb-duty-grid .who.offer { background: var(--amber-tint); color: var(--amber); outline: 1px dashed var(--amber); }
.jb-duty-grid .who.noshow { text-decoration: line-through; opacity: .7; }
.jb-duty-grid .tag { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.jb-duty-grid .tag.need { color: var(--amber); }
.jb-duty-note .jb-ico { width: 14px; height: 14px; color: var(--amber-ink); }
/* days with more parents than the roster needs (a gentle flag: someone could move to a day that needs them) */
.jb-duty-grid .cell.over { background: var(--accent-tint); }
.jb-duty-grid .tag.over { color: var(--amber-ink); }
.jb-chip.pill-over { background: var(--accent-tint); color: var(--amber-ink); }
.jb-vol-gapnote.is-over { background: var(--accent-tint); color: var(--amber-ink); }
.jb-vol-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; }
.jb-vol-puton { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.jb-vol-noone { margin: 2px 0 0; }
.jb-vol-slotmeter { margin-top: 12px; }
.jb-vol-slotnote { margin: 8px 0 2px; }
/* the "How often" choices: inline selects and dates get the same box as every other field */
.jb-vol-pattern select, .jb-vol-pattern input[type=date] { padding: 4px 10px; border: 1px solid #D5CFC2; border-radius: var(--r-sm); background: #fff; font-size: 15px; }
@media (max-width: 640px) {
  /* a row with one small icon button (Who's on it: take off) keeps it beside the name on phones */
  .jb-item.jb-vol-onrow { flex-wrap: nowrap; }
  .jb-item.jb-vol-onrow > .jb-grow { flex-basis: 0%; }
}
@media (max-width: 720px) {
  .jb-duty-grid .cell { min-height: 64px; padding: 3px; font-size: 10.5px; }
  .jb-duty-grid .who { padding: 1px 3px; }
  .jb-vol-needhead { flex-wrap: wrap; }
  .jb-vol-pills { justify-content: flex-start; width: 100%; padding-left: 68px; }
}

/* the calendar: a parent's own commitments */
.jb-cal .ev.mine { background: var(--accent-tint); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.jb-chip.pill-mine { background: var(--accent-tint); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.jb-cal .ev .rep, .jb-cal-row .rep { opacity: .7; font-size: .9em; }

/* a need's kinds of help: one picker per kind, × to remove, + to add another (pages/volunteer.js kindRow) */
.jb-vol-kinds > span { display: flex; align-items: center; gap: 6px; }
.jb-vol-kindlist { display: grid; grid-template-columns: minmax(0, 460px); gap: 8px; }
.jb-vol-kind { display: flex; align-items: center; gap: 6px; }
.jb-vol-kind select { flex: 1; min-width: 0; }
.jb-vol-kind .jb-iconbtn { flex: none; }
.jb-vol-addkind { justify-self: start; align-self: flex-start; margin-top: 2px; }
