/* The XignSys booth pages (/stand). Builds on xs.css and only uses its
   --xs-* tokens, so light and dark mode follow the rest of the site.
   Prefixed bs- to stay clear of the existing classes. */

/* --- Forms --------------------------------------------------------------- */

.bs-form {
  display: grid;
  gap: 18px;
}

.bs-field {
  display: grid;
  gap: 6px;
}

.bs-field label,
.bs-label {
  font-size: 15px;
  font-weight: 500;
}

.bs-field input,
.bs-field select,
.bs-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--xs-line);
  border-radius: 10px;
  background: var(--xs-card);
  color: var(--xs-text);
  font: inherit;
  font-size: 17px;
}

.bs-field textarea {
  min-height: 90px;
  resize: vertical;
}

.bs-field input:focus,
.bs-field select:focus,
.bs-field textarea:focus {
  outline: none;
  border-color: var(--xs-accent);
  box-shadow: 0 0 0 3px var(--xs-accent-soft);
}

.bs-field input[aria-invalid="true"] {
  border-color: var(--xs-bad-text);
}

.bs-hint {
  color: var(--xs-muted);
  font-size: 14px;
}

.bs-error {
  margin: 0;
  color: var(--xs-bad-text);
  font-size: 14px;
  font-weight: 500;
}

.bs-check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 15px;
  line-height: 1.5;
}

.bs-check input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--xs-accent);
}

.bs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Contact card -------------------------------------------------------- */

.bs-contact {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
}

.bs-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--xs-accent);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.bs-contact__name {
  font-size: 20px;
  font-weight: 700;
}

.bs-contact__role {
  color: var(--xs-muted);
  font-size: 15px;
}

.bs-contact-details {
  margin-top: 18px;
}

/* --- Choice of contact person ("Wer spricht gerade mit Ihnen?") ---------- */

.bs-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.bs-picker legend {
  padding: 0;
}

.bs-picker__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.bs-picker__option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 10px 14px;
  border: 1.5px solid var(--xs-line);
  border-radius: 12px;
  background: var(--xs-card);
  cursor: pointer;
}

.bs-picker__option:hover {
  background: var(--xs-surface);
}

.bs-picker__option:has(input:checked) {
  border-color: var(--xs-accent);
  background: var(--xs-accent-soft);
}

.bs-picker__option input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--xs-accent);
}

/* Locked while the wallet step runs: the chosen person stays readable. */
.bs-picker:disabled .bs-picker__option {
  cursor: default;
}

.bs-picker:disabled .bs-picker__option:not(:has(input:checked)) {
  opacity: 0.5;
}

.bs-picker__name {
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.bs-picker__role {
  display: block;
  color: var(--xs-muted);
  font-size: 14px;
}

.bs-picker__error {
  margin-top: 12px;
}

.bs-avatar--sm {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.bs-avatar--photo {
  object-fit: cover;
  object-position: 50% 25%;
  background: var(--xs-surface);
}

/* Staff photo in the admin editor and list (3:4 like the stored photo). */
.bs-photo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

.bs-photo {
  width: 90px;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--xs-surface);
  border: 1px solid var(--xs-line);
}

.bs-photo--empty {
  display: grid;
  place-items: center;
  color: var(--xs-muted);
  font-size: 13px;
  text-align: center;
}

.bs-photo-actions {
  display: grid;
  gap: 8px;
  justify-items: start;
  flex: 1 1 220px;
}

.bs-field .bs-photo-actions input[type="file"] {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
}

.bs-thumb {
  float: left;
  width: 30px;
  height: 40px;
  margin-right: 10px;
  border-radius: 6px;
  object-fit: cover;
}

.bs-skip {
  margin-top: 12px;
}

.bs-change {
  margin-top: 20px;
}

.bs-label-small {
  margin: 0 0 12px;
  color: var(--xs-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Visitor flow -------------------------------------------------------- */

.bs-visitor {
  min-height: calc(100vh - 81px);
}

.bs-loading {
  padding: 72px 0;
}

.bs-heading-after-badge {
  margin-top: 14px;
}

.bs-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-weight: 500;
}

.bs-done-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
}

.bs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.bs-divider {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--xs-line);
}

.bs-footer {
  padding: 24px 0 32px;
  color: var(--xs-muted);
  font-size: 13px;
}

.bs-footer a {
  color: var(--xs-muted);
}

/* Inactivity overlay on kiosk devices. */
.bs-idle {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: color-mix(in srgb, var(--xs-bg) 70%, transparent);
  backdrop-filter: blur(6px);
}

.bs-idle__box {
  max-width: 420px;
  padding: 32px;
  background: var(--xs-card);
  border: 1px solid var(--xs-line);
  border-radius: 20px;
  box-shadow: var(--xs-shadow);
  text-align: center;
}

.bs-idle__count {
  margin: 8px 0 20px;
  font-size: 48px;
  font-weight: 700;
}

/* --- Admin --------------------------------------------------------------- */

.bs-admin {
  padding: 40px 0 96px;
}

.bs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
  padding: 0;
  border-bottom: 1px solid var(--xs-line);
  list-style: none;
}

.bs-tabs a {
  display: block;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  color: var(--xs-muted);
  font-size: 15px;
  text-decoration: none;
}

.bs-tabs a:hover {
  color: var(--xs-text);
}

.bs-tabs a[aria-current="page"] {
  color: var(--xs-text);
  border-bottom-color: var(--xs-accent);
  font-weight: 500;
}

.bs-section {
  display: grid;
  gap: 24px;
}

.bs-section h2 {
  font-size: 24px;
}

.bs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.bs-stat {
  padding: 20px;
  background: var(--xs-card);
  border: 1px solid var(--xs-line);
  border-radius: var(--xs-radius);
}

.bs-stat strong {
  display: block;
  font-size: 32px;
  line-height: 1.1;
}

.bs-stat span {
  color: var(--xs-muted);
  font-size: 14px;
}

.bs-msg {
  margin: 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
}

.bs-msg--ok {
  background: var(--xs-accent-soft);
  color: var(--xs-accent-text);
}

.bs-msg--error {
  background: var(--xs-bad-bg);
  color: var(--xs-bad-text);
}

.bs-msg--warn {
  background: var(--xs-warn-bg);
  color: var(--xs-warn-text);
}

.bs-table td small {
  display: block;
  color: var(--xs-muted);
  font-size: 13px;
}

.bs-table .actions {
  flex-wrap: wrap;
}

.bs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.bs-qr {
  width: 200px;
  height: 200px;
  background: #fff;
  border-radius: 8px;
}

.bs-login {
  max-width: 420px;
  margin: 72px auto;
}

.badge--queued,
.badge--sending,
.badge--offered,
.badge--fetched { background: var(--xs-warn-bg); color: var(--xs-warn-text); }
.badge--sent,
.badge--stored { background: var(--xs-accent-soft); color: var(--xs-accent-text); }
.badge--failed { background: var(--xs-bad-bg); color: var(--xs-bad-text); }
.badge--none,
.badge--expired { background: var(--xs-surface); color: var(--xs-muted); }

/* Poster per staff member: only the poster is printed. */
.bs-poster {
  display: none;
}

@media print {
  body > *:not(.bs-poster) {
    display: none !important;
  }
  .bs-poster {
    display: grid !important;
    justify-items: center;
    gap: 16px;
    padding: 40px;
    color: #000;
    text-align: center;
  }
  .bs-poster img.qr {
    width: 320px;
    height: 320px;
  }
  .bs-poster h1 {
    font-size: 40px;
  }
}

@media (max-width: 720px) {
  .bs-row {
    grid-template-columns: 1fr;
  }
  .bs-admin {
    padding-top: 24px;
  }
}
