/* ============================================
   HOMIE CHECKIN — PWA Ospite Styles
   Stili specifici non coperti dal design-system.css
   ============================================ */

/* ── MULTI-SCREEN ROUTING ────────────────────── */
/* Di default tutte le screen sono nascoste.
   JS aggiunge data-active="true" alla screen attiva. */
[data-screen] {
  display: none;
}
[data-screen][data-active="true"] {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── HEADER — step counter ───────────────────── */
.pwa-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-counter {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--dark-40);
  letter-spacing: 0.04em;
}

/* ── CHECKIN MAIN ────────────────────────────── */
.checkin-main {
  flex: 1;
  padding-top: var(--s2);
  padding-bottom: var(--s4);
}

.checkin-main--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── ERROR STATE (link invalido) ─────────────── */
.error-state {
  text-align: center;
  padding: var(--s8) var(--s4);
}

.error-state__icon {
  width: 64px;
  height: 64px;
  background: var(--warning-bg);
  color: var(--warning);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s5);
}

.error-state__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: var(--s4);
}

.error-state__body {
  font-size: var(--text-sm);
  color: var(--dark-80);
  line-height: 1.6;
  margin-bottom: var(--s6);
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.error-state__cta {
  display: inline-flex;
}

/* ── CHECKLIST (welcome screen) ──────────────── */
.checklist {
  list-style: none;
  margin-top: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  font-size: var(--text-sm);
  color: var(--dark-80);
  line-height: 1.4;
}

.checklist__check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--coral-light);
  color: var(--coral);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  margin-top: 1px;
}

/* ── CHECKIN ACTIONS (bottoni bottom welcome/riepilogo) ── */
.checkin-actions {
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* ── SELECT WRAPPER (chevron custom) ─────────── */
.select-wrap {
  position: relative;
}

.select-wrap .form-select {
  padding-right: var(--s8);
  appearance: none;
  -webkit-appearance: none;
}

.select-chevron {
  position: absolute;
  right: var(--s4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-40);
  font-size: var(--text-sm);
  pointer-events: none;
}

/* ── UPLOAD PREVIEW ──────────────────────────── */
.upload-preview {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1.5px solid var(--success);
  background: var(--success-bg);
  position: relative;
}

.upload-preview__img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.upload-preview__remove {
  position: absolute;
  top: var(--s2);
  right: var(--s2);
  background: var(--dark-80);
  color: white;
  border: none;
  border-radius: var(--r-full);
  padding: var(--s1) var(--s3);
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.upload-preview__remove:hover {
  background: var(--coral);
}

/* ── SECTION LABEL (separatore form) ─────────── */
.section-label {
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark-40);
  margin-bottom: var(--s3);
}

/* ── INFO NOTE (co-ospiti vuoti) ─────────────── */
.info-note {
  display: flex;
  align-items: center;
  gap: var(--s3);
  background: var(--info-bg);
  border-radius: var(--r-md);
  padding: var(--s3) var(--s4);
  font-size: var(--text-sm);
  color: var(--info);
  font-weight: 600;
  margin: var(--s4) 0;
}

.info-note__icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
}

/* ── SIGNATURE LEGAL TEXT ────────────────────── */
.sig-legal {
  font-size: var(--text-xs);
  color: var(--dark-40);
  text-align: center;
  margin-top: var(--s4);
  line-height: 1.5;
  padding: 0 var(--s2);
}

/* Bordo attivo quando si firma */
.signature-wrap--active {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(232,101,90,0.15);
}

/* ── SUBMIT NOTE (sotto btn conferma) ────────── */
.submit-note {
  font-size: var(--text-xs);
  color: var(--dark-40);
  text-align: center;
  line-height: 1.5;
}

/* ── SUCCESS SUMMARY BOX ─────────────────────── */
.success-summary {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s4) var(--s5);
  margin-top: var(--s6);
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.success-summary__row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dark);
}

/* ── STEP-CARD margin overrides per schermate senza step-card wrapper ── */
.summary-section:first-of-type {
  margin-top: 0;
}

/* Tassa box fuori da step-card nella schermata riepilogo */
.tassa-box {
  margin: 0 0 var(--s3);
}

/* ── FORM group dentro co-guest-card — no margin bottom extra ── */
.co-guest-card .form-group:last-child {
  margin-bottom: 0;
}

/* ── LOADING STATE BTN SUBMIT ────────────────── */
#btn-submit[data-loading="true"] {
  pointer-events: none;
  opacity: 0.8;
}

/* ── PROGRESS BAR padding override ──────────── */
.step-progress .container {
  padding-top: var(--s4);
  padding-bottom: var(--s3);
}

/* ── PWA safe area bottom – step-nav ─────────── */
.step-nav {
  padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom));
}

/* ── STEP CARD inside riepilogo (solo header) ── */
#riepilogo-header-card {
  margin-bottom: var(--s2);
}
