/* frontend/checkin.css
   Self-Check-in (Hub + öffentliche Patienten-Seiten)
*/

/* -----------------------------
   HUB: Patienten Check-In
----------------------------- */
#hub-section-patients .hub-checkin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

@media (max-width: 980px) {
  #hub-section-patients .hub-checkin-grid { grid-template-columns: 1fr; }
}

#hub-section-patients .hub-checkin-qr-row {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

#hub-section-patients .hub-checkin-qr-img {
  width: 170px;
  height: 170px;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px;
}

#hub-section-patients .hub-checkin-url {
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
}

#hub-section-patients .hub-checkin-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

/* -----------------------------
   PUBLIC: Check-in Seiten
----------------------------- */
body.checkin-page {
  min-height: 100vh;
  margin: 0;
  padding: 18px 14px;
  background: var(--app-bg-gradient);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkin-shell {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.checkin-title { margin: 0 0 6px 0; font-size: 26px; letter-spacing: -0.02em; }
.checkin-subtitle { margin: 0 0 16px 0; color: var(--color-text-muted); font-size: 14px; }

.checkin-form { display: grid; gap: 12px; }
.checkin-form label { font-size: 13px; color: var(--color-text-muted); }

.checkin-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.checkin-row .grow { flex: 1 1 auto; }

.checkin-qr-full { text-align: center; }
.checkin-qr-full img {
  width: min(72vw, 420px);
  height: auto;
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 14px;
}

.checkin-status-room { margin-top: 10px; font-size: 20px; font-weight: 800; }
/* -----------------------------
   PUBLIC: Status Card (schicker)
----------------------------- */

.checkin-status-wrap {
        margin-top: -80px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 0;
}

.checkin-brand {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
  opacity: .95;
  margin-bottom: 20px;
}

.checkin-status-card {
  width: min(86vw, 320px);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  background: var(--color-bg-elevated);
  box-shadow: none;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}


.checkin-status-inner {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkin-status-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.checkin-status-label {
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 75%, transparent);
}

.checkin-status-room {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 2px;
}

.checkin-status-note {
  margin-top: 6px;
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}

.checkin-status-info {
  margin-top: 10px;
  text-align: center;
  max-width: 38ch;
}
.checkin-status-pushbtn {
  margin-top: 8px;
  width: min(260px, 78%);
  justify-content: center;
}

.checkin-status-pushstate {
  margin-top: 6px;
  font-size: 12px;
  opacity: .85;
}
/* iOS Safari: verhindert Auto-Zoom beim Fokus */
.checkin-page .input,
.checkin-page input,
.checkin-page select,
.checkin-page textarea {
  font-size: 16px;
}
/* ------------------------------------------------------------
   Toggle (Status Seite)
------------------------------------------------------------ */
.np-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 12px;
  border-radius:14px;
  background: var(--glass-bg, rgba(255,255,255,.06));
  border: 1px solid var(--glass-border, rgba(255,255,255,.10));
  box-shadow: var(--shadow-soft, 0 10px 30px rgba(0,0,0,.12));
}

.np-toggle-title{
  font-weight:700;
}

.np-toggle-sub{
  margin-top:3px;
  line-height:1.25;
}

.np-toggle{
  position:relative;
  width:54px;
  height:32px;
  flex: 0 0 auto;
}

.np-toggle input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}

.np-toggle__track{
  position:absolute;
  inset:0;
  border-radius:999px;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.np-toggle__track::after{
  content:"";
  position:absolute;
  top:50%;
  left:4px;
  width:24px;
  height:24px;
  border-radius:999px;
  transform: translateY(-50%);
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
  transition: left .18s ease, background .18s ease;
}

/* ON */
.np-toggle input:checked + .np-toggle__track{
  background: color-mix(in oklab, var(--color-primary) 70%, rgba(255,255,255,.18));
  border-color: color-mix(in oklab, var(--color-primary) 55%, rgba(255,255,255,.18));
}

.np-toggle input:checked + .np-toggle__track::after{
  left: calc(100% - 4px - 24px);
  background: rgba(255,255,255,.98);
}

/* Focus */
.np-toggle input:focus-visible + .np-toggle__track{
  outline: 2px solid color-mix(in oklab, var(--color-primary) 70%, white);
  outline-offset: 3px;
}

/* Screenreader helper */
.sr-only{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}
/* ------------------------------------------------------------
   Status Toggle (primary/secondary Track)
------------------------------------------------------------ */
.np-toggle-row{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-soft);
}

.np-toggle-title{
  font-weight: 800;
  letter-spacing: -0.01em;
}

.np-toggle-sub{
  margin-top: 2px;
  line-height: 1.25;
}

.np-toggle{
  position: relative;
  width: 54px;
  height: 32px;
  flex: 0 0 auto;
}

.np-toggle input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}

.np-toggle__track{
  position:absolute;
  inset:0;
  border-radius:999px;
  background: var(--color-primary-secondary); /* OFF = secondary */
  border: 1px solid color-mix(in oklab, var(--color-primary-secondary) 55%, var(--color-border));
  transition: background .18s ease, border-color .18s ease;
}

.np-toggle__track::after{
  content:"";
  position:absolute;
  top:50%;
  left:4px;
  width:24px;
  height:24px;
  border-radius:999px;
  transform: translateY(-50%);
  background: var(--color-on-secondary);
  transition: left .18s ease, background .18s ease;
}

/* ON = primary */
.np-toggle input:checked + .np-toggle__track{
  background: var(--color-primary);
  border-color: color-mix(in oklab, var(--color-primary) 55%, var(--color-border));
}

.np-toggle input:checked + .np-toggle__track::after{
  left: calc(100% - 4px - 24px);
  background: var(--color-on-primary);
}

.np-toggle input:focus-visible + .np-toggle__track{
  outline: 2px solid color-mix(in oklab, var(--color-primary) 70%, white);
  outline-offset: 3px;
}

/* sr-only helper */
.sr-only{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}
