/* Children and guardians: the guardian's phone view (js/ui-guardian.js) and Settings › Children (js/ui-kids.js). */
@layer views {
  .guardian .gvkid { margin-bottom: 12px; }
  .guardian .gvkid .mhome { color: var(--ink); }
  .guardian .gvtoday { display: grid; gap: 2px; margin: 6px 0 10px; }
  .guardian .gvtoday small { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
  .guardian .gvtoday b { font-size: 22px; }
  .guardian .gvkid.abs .gvtoday b { color: var(--red); }
  .guardian .gvkid .mbtn { width: 100%; }
  .guardian .gvwarn { background: #fff6e0; border: 1px solid #f0d58a; border-radius: var(--radius); padding: 6px 10px; font-size: 14px; margin: 0 0 10px; }
  .gvlist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
  .gvrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border-top: 1px solid var(--line); }
  .gvrow:first-child { border-top: 0; }
  .gvrow > span:first-child { display: grid; }
  .gvrow small { color: var(--muted); }
  .gvrow .gvt { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .gvrow.changed .gvt { color: var(--blue); font-weight: 600; text-align: right; }
  .gvrow .gvt small { display: block; font-weight: 400; }
  .gvlater { text-align: center; margin: 18px 0 6px; }
  .gvform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

  .kgroup { padding: 0; overflow: hidden; box-shadow: inset 4px 0 0 var(--gc); }
  .kgroup .khead { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; width: 100%; padding: 14px 18px; }
  .kgroup .khead:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
  .kgroup .khead i { margin-left: auto; font-style: normal; color: var(--muted); }
  .kgroup .scroll { padding: 0 18px 14px; }
  .kgroup td small { font-weight: 400; }
  .kgroup .kwarn { color: var(--red); font-weight: 600; }
  .ktry { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
}
@layer views {
  .guardian .gvall { width: 100%; margin-bottom: 12px; }
  .guardian .gvdl { margin: -4px 0 8px; }
  .gvrow .gvreq { grid-column: 1 / -1; color: var(--blue); font-weight: 600; margin-top: -4px; }
  .gvform .gvhours { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
  .gvform .gvhours.over { color: var(--red); font-weight: 600; }
  .kreqcard { box-shadow: inset 4px 0 0 var(--blue); }
  .kreqs { list-style: none; margin: 0; padding: 0; }
  .kreq { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
  .kreq:first-child { border-top: 0; }
  .kreqb { display: flex; gap: 8px; }
}
@layer views {
  /* "Open on your phone": two equal choices, staff or guardian; the QR code follows the choice */
  .phwho { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-top: 8px; border-radius: var(--radius); background: var(--bg, #f1ede7); border: 1px solid var(--line); }
  .phwho button { min-height: 44px; border: 0; background: transparent; box-shadow: none; font-weight: 600; color: var(--muted); transform: none !important; }
  .phwho button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
}
@layer views {
  /* Holiday survey (js/ui-holiday.js): the guardian's card and answer form, the school's results */
  .guardian .gvhol { margin-bottom: 12px; }
  .guardian .gvhol.done { border-left-color: var(--green, #2e7d4f); }
  .gvhol .gvholt { display: grid; gap: 2px; margin: 0 0 6px; }
  .gvhol .gvholt small, .gvhol .gvhols small { color: var(--muted); }
  .gvhol .gvhols { margin: 0 0 10px; }
  .gvhol .mbtn { width: 100%; }
  .hvrows { list-style: none; margin: 8px 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); }
  .hvrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px 6px 14px; border-top: 1px solid var(--line); }
  .hvrow:first-child { border-top: 0; }
  .hvseg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: var(--radius); background: var(--bg, #f1ede7); border: 1px solid var(--line); }
  .hvseg button { min-height: 40px; min-width: 96px; border: 0; background: transparent; box-shadow: none; font-weight: 600; color: var(--muted); transform: none !important; }
  .hvseg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
  .hvseg button.on.away { background: var(--blue); color: #fff; }
  .hvnew .hvdates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .hvprog { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
  .hvbar { flex: 1; max-width: 260px; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
  .hvbar i { display: block; height: 100%; background: var(--blue); }
  .hvtab td small { font-weight: 400; }
  
}
@media (max-width: 520px) {
  .hvseg button { min-width: 0; padding-inline: 10px; }
  .hvnew .hvdates { grid-template-columns: 1fr; }
}
@layer views {
  .hvrow .hvlab { display: grid; }
  .hvrow .hvlab small { color: var(--muted); }
}
@layer views {
  .hvlist { list-style: none; margin: 10px 0 12px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); }
  .hvitem { border-top: 1px solid var(--line); }
  .hvitem:first-child { border-top: 0; }
  .hvhead { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: 6px 16px; width: 100%; min-height: 56px; padding: 10px 14px; }
  .hvhead:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
  .hvhead > span:first-child { display: grid; }
  .hvhead small { color: var(--muted); }
  .hvhead i { font-style: normal; color: var(--muted); }
  .hvhead .hvprog { margin: 0; }
  .hvhead .hvbar { width: 140px; flex: none; }
  .hvbody { padding: 0 14px 12px; }
  .hvnew { display: grid; gap: 8px; }
  .hvnewb { display: flex; gap: 8px; justify-content: flex-end; }
  .hvrow .hvlab small { white-space: nowrap; }
}
@media (max-width: 620px) {
  .hvhead { grid-template-columns: 1fr 16px; }
  .hvhead .hvprog { grid-row: 2; }
  .hvhead .hvbar { width: 100px; }
}
@layer views {
  .hvbody .ghost { padding-left: 0; padding-right: 0; }
  .hvhead .hvprog b { white-space: nowrap; }
}
@media (max-width: 620px) {
  .hvhead .hvprog b { font-size: 15px; }
  .hvtab td small { display: block; }
  .hvtab td:first-child { white-space: normal; }
}
@layer views {
  .hvrow .hvdays { all: unset; white-space: nowrap; cursor: pointer; justify-self: start; margin-top: 2px; font-size: 14px; color: var(--blue); font-weight: 600; }
  .hvrow .hvdays:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
  .hvrow.hvday { background: var(--bg, #f7f5f1); padding-left: 28px; min-height: 48px; }
  .hvrow.hvday .hvseg button { min-height: 36px; }
}
@layer views {
  /* every row's Here/Off pair the same width, so they line up with the single days */
  .hvrows .hvseg { width: 236px; }
  .hvrow.hvday { padding-left: 24px; }
  .hvrow.hvday .hvlab span { white-space: nowrap; }
}
@media (max-width: 520px) {
  .hvrows .hvseg { width: 224px; grid-template-columns: 1.35fr 1fr; }
  .hvrows .hvseg button { padding-inline: 4px; font-size: 15px; white-space: nowrap; }
}
@layer views {
  /* "Change today's times" under the absence button on a child's card */
  .guardian .gvkid .gvchange { all: unset; cursor: pointer; margin-top: 10px; padding: 6px 10px; color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
  .guardian .gvkid .gvchange:focus-visible { outline: 2px solid var(--blue); border-radius: 6px; }
  .guardian .gvkid .gvreqtoday { margin: 8px 0 0; color: var(--blue); font-weight: 600; font-size: 14px; }
}
/* Who is with the group today (js/ui-kids-staff.js) */
@layer views {
  .guardian .gvstaff { margin: 4px 0 14px; }
  .guardian .gvstaff h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
  .gvslist { box-shadow: inset 4px 0 0 var(--gc); overflow: hidden; }
  .gvsrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px 8px 18px; border-top: 1px solid var(--line); }
  .gvsrow:first-child { border-top: 0; }
  .gvsrow > span:first-child { display: grid; }
  .gvsrow .gvt { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
  .gvsrow .gvstag { color: var(--blue); font-weight: 600; }
  .guardian .gvsnote { margin: 0; }
}

/* Settings › Children with real login: add a child / guardian, invite (js/ui-kids-people.js) */
@layer views {
  .kadd { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 4px 18px 16px; }
  .kadd .f { margin: 0; }
  .kadd input, .kadd select { width: 100%; }
  .kadd button { height: 44px; }
  .kaddg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; padding: 8px 0 0; }
  .kguards { list-style: none; margin: 0; padding: 0; display: grid; }
  .kguard { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .kguard small { font-weight: 400; }
  .kgf { display: flex; gap: 6px; align-items: center; margin: 0; }
  .kgf select, .kgf input { width: 180px; }
  .kgnote { grid-column: 1 / -1; }
  @media (max-width: 760px) {
    .kadd, .kaddg, .kguard { grid-template-columns: 1fr; }
    .kgf select, .kgf input { flex: 1; width: auto; min-width: 0; }
  }
}
