/* The sign-in page. Built for a tablet on a stand: big text, big buttons, nothing to scroll.
   Phones (after scanning the QR code) get one column. Colours come from base.css. */
html, body { background: var(--page); }
.topbar-inner.wide { max-width: 80rem; }
.today { font-weight: 700; color: var(--muted); font-size: 1rem; }
.pad { padding: 24px; }
.kiosk { max-width: 80rem; margin: 0 auto; padding: 20px 16px 40px; }
.layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.main-panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px 26px;
  display: flex; flex-direction: column; gap: 22px; min-height: 60vh;
}
.main-panel h1 { font-size: 1.9rem; }
.big-gap { gap: 16px; }
.side { display: flex; flex-direction: column; gap: 16px; }
.side .card { background: var(--paper); }
.side-h { font-size: 1.1rem; }

/* Sign in / Sign out switch */
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--surface); border-radius: 12px; padding: 6px; }
.mode-btn {
  min-height: 60px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.mode-btn[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.count { font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; padding: 2px 9px; border-radius: 999px; border: 1.5px solid currentColor; }

/* Search */
#search, #newname { min-height: 68px; font-size: 1.5rem; padding: 12px 18px; border-radius: 10px; }
.results { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.name-tile {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 72px; padding: 12px 20px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; text-align: left; color: var(--ink);
  font-size: 1.45rem; font-weight: 700;
}
.name-tile:hover, .name-tile:focus-visible { border-color: var(--accent); }
.name-tile:active { background: var(--accent-soft); }
.name-tile .tag { font-size: 0.85rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.cant-find { align-self: flex-start; font-size: 1.1rem; padding: 8px 0; }
.small { font-size: 0.9rem; font-weight: 400; }
.muted { color: var(--muted); }

/* Sign-out grid */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile { flex-direction: column; align-items: flex-start; justify-content: center; min-height: 84px; }

/* Confirm and done screens */
.confirm, .done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 4vh 0 2vh; }
.confirm-name { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1.15; color: var(--ink); }
.btn-huge { flex: none; width: min(100%, 26rem); min-height: 76px; font-size: 1.5rem; border-radius: 12px; }
.btn-big { width: min(100%, 26rem); min-height: 60px; font-size: 1.15rem; }
.tick { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.done h1 { font-size: 2.3rem; }
.win { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.waiver { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 30rem; padding: 14px 18px; border-radius: 10px; border: 2px solid var(--danger); font-size: 1.15rem; }
.big-seg { display: grid; grid-template-columns: 1fr 1fr; }
.big-seg button { padding: 14px 10px; font-size: 1.05rem; font-weight: 700; }

/* QR code and today's classes */
.qr { width: 100%; max-width: 220px; margin: 0 auto; border-radius: 8px; overflow: hidden; }
.qr svg { display: block; width: 100%; height: auto; }
.qr-small { max-width: 170px; }
.qr-text { text-align: center; font-size: 1.05rem; }
.class-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.class-list li { display: flex; flex-direction: column; gap: 1px; padding-top: 8px; border-top: 1px solid var(--line); }
.class-list li:first-child { border-top: 0; padding-top: 0; }
.c-time { font-size: 0.9rem; color: var(--muted); font-weight: 700; }
.c-name { font-size: 1.1rem; font-weight: 700; }

/* Class isn't open */
.closed { max-width: 34rem; margin: 10vh auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 36px 24px; }

/* Idle screen */
.idle { position: fixed; inset: 0; z-index: 20; background: var(--page); display: grid; place-items: center; padding: 32px; cursor: pointer; animation: idle-in 0.6s ease-out; }
.idle-inner { width: min(100%, 52rem); display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.idle h1 { font-size: 2.8rem; }
.idle-classes { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; }
.idle-classes li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; background: var(--paper); }
.idle-classes li:first-child { border-top: 1px solid var(--line); padding-top: 10px; }
.anns { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.ann { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; text-align: left; font-size: 1.35rem; }
.ann .eyebrow { font-size: 1rem; margin-bottom: 4px; }
.tap { color: var(--muted); font-size: 1.1rem; animation: pulse 2.4s ease-in-out infinite; }
@keyframes idle-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .idle, .tap { animation: none; } }

/* Tablets and computers: main panel with the QR code beside it */
@media (min-width: 820px) {
  .kiosk { padding: 24px 28px 40px; }
  .layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .main-panel { padding: 28px 32px 32px; min-height: calc(100vh - 140px); }
  .main-panel h1 { font-size: 2.2rem; }
}
body.phone .layout { grid-template-columns: 1fr; }
body.phone .main-panel { min-height: 0; }
@media (max-width: 480px) {
  .today { display: none; }
  .confirm-name { font-size: 2rem; }
  .name-tile { font-size: 1.25rem; min-height: 64px; }
  .mode-btn { font-size: 1.1rem; gap: 6px; }
  .count .here-word { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; }
}

/* Phone-sized screens running as the sign-in screen: no empty space, and a compact QR card */
@media (max-width: 819px) {
  .main-panel { min-height: 0; }
  .qr-card { flex-direction: row; align-items: center; gap: 14px; }
  .qr-card .qr { width: 110px; flex: none; margin: 0; }
  .qr-card .qr-text { text-align: left; }
}
.setup-code { font-size: 2.2rem; font-weight: 800; letter-spacing: .25em; margin: 4px 0 0; font-family: var(--font-display); }

/* Late sign-in: ring the bell */
.bell { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 30rem; padding: 14px 18px; border-radius: 10px; border: 2px solid var(--warn); font-size: 1.2rem; text-align: center; }
.bell p { margin: 0; }
.bell-icon { color: var(--warn); animation: bell-swing 1s ease-in-out infinite; transform-origin: 50% 10%; }
.bell-rings { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: var(--warn); }
@keyframes bell-swing { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); } }
@media (prefers-reduced-motion: reduce) { .bell-icon { animation: none; } }

/* Picking a Student Area PIN on the tablet */
.setup-box { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 30rem; padding: 14px 18px; border-radius: 10px; border: 2px solid var(--accent); font-size: 1.15rem; }
.setup-box p, .setup-done { margin: 0; }
.setup-done { font-size: 1.3rem; max-width: 28rem; }
.pin-dots { font-size: 2rem; letter-spacing: 0.4em; min-height: 2.6rem; color: var(--ink); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 5.5rem); gap: 12px; justify-content: center; }
.pin-key { height: 5rem; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 1.8rem var(--font-display); cursor: pointer; }
.pin-key:active { background: var(--accent-soft); }
.pin-back { font-size: 1.5rem; }
.pin-pad .pin-key:last-child { grid-column: 2; }

/* Signed in early: how early, and whether it counts for Early Bird */
.early { max-width: 30rem; padding: 10px 16px; border-radius: 10px; border: 2px solid var(--line); font-size: 1.1rem; text-align: center; }
.early p { margin: 0; }
.early.counts { border-color: #3fb27a; }
.early.counts strong { color: #3fb27a; }

/* Their Working on goals, as a reminder walking in */
.goals-today { max-width: 30rem; width: 100%; padding: 10px 16px; border-radius: 10px; border: 2px solid var(--accent); border-left-width: 6px; text-align: left; }
.goals-today .goals-title { margin: 0 0 4px; font-weight: 800; color: var(--accent); }
.goals-today ul { margin: 0; padding-left: 1.2rem; font-size: 1.1rem; }

/* Admin preview of the tablet */
.preview-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; padding: 8px 12px; background: #e0b33a; color: #1c1406; font-size: 0.95rem; }
.preview-bar select { width: auto; padding: 4px 8px; }
.preview-bar a { color: #1c1406; font-weight: 700; }
