/* Visitors: the visitors' Wi-Fi card, big enough to scan from a phone held
   out to someone, and a card for the reception desk when printed. */

.visitors > .page-head { max-width: 760px; }
.visitors > .notice { max-width: 760px; margin-bottom: 20px; }

.wifi-card {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: 20px 32px;
  align-items: center;
  max-width: 760px;
  padding: 24px;
}
/* Cameras need dark squares on white, whatever the theme. */
.wifi-qr { display: block; width: 100%; height: auto; aspect-ratio: 1; background: #FFFFFF; fill: #111111; }
.wifi-details { display: grid; gap: 18px; margin: 0; min-width: 0; }
.wifi-details .label { margin-bottom: 4px; }
.wifi-details dd { margin: 0; font: 400 24px/1.25 var(--display); overflow-wrap: anywhere; }
.wifi-details .wifi-password { font: 700 26px/1.25 var(--body); letter-spacing: .06em; }
.wifi-details .wifi-until { font: 400 17px/1.4 var(--body); }
.wifi-help { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--hair); color: var(--muted); font-size: 14px; }
.wifi-print-head { display: none; }

.wifi-admin { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; max-width: 760px; margin-top: 20px; }
.wifi-admin > div { flex: 1 1 320px; }
.wifi-admin p { margin-top: 6px; max-width: 62ch; }
.wifi-waiting { font-size: 14px; color: var(--blue-ink); }
.wifi-waiting.late, .visitors .field-error { color: var(--red); }
.visitors .field-error { font-size: 13px; }

@media (max-width: 619px) {
  .wifi-card { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .wifi-qr { max-width: 340px; margin: 0 auto; }
  .wifi-details dd { font-size: 21px; }
  .wifi-details .wifi-password { font-size: 23px; }
}

/* Printed: black on white whatever the theme, without the site around it. */
@media print {
  html:root:not([data-theme="light"]) {
    color-scheme: light;
    --page: #FFFFFF; --surface: #FFFFFF; --ink: #111111; --muted: #494949; --subtle: #5F6673; --rule: #111111; --hair: #D9DEE6;
  }
  @page { margin: 15mm; }
  body::before, .top, .page-head, .visitors > .notice, .wifi-admin, .toast, dialog { display: none !important; }
  .page { padding: 0; max-width: none; }
  .wifi-card { max-width: 170mm; grid-template-columns: 75mm minmax(0, 1fr); gap: 8mm 10mm; padding: 10mm; break-inside: avoid; }
  .wifi-print-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; grid-column: 1 / -1; padding-bottom: 6mm; border-bottom: 1px solid var(--rule); }
  .wifi-print-head img { height: 12mm; width: auto; }
  .wifi-print-head h2 { font-size: 26px; }
}
