/* =========================================================
   ONLYBOOST — pagina Prenota
   ========================================================= */

/* ---------- PASSI ---------- */
.steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.step {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-low);
  transition: color 0.35s var(--ease-out);
}
.step i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-style: normal;
  font-size: 0.62rem;
  transition: all 0.35s var(--ease-out);
}
.step.is-active {
  color: var(--blue-300);
}
.step.is-active i {
  border-color: var(--blue-400);
  background: rgba(59, 130, 246, 0.15);
  box-shadow: var(--glow-blue);
  color: var(--blue-300);
}
.step.is-done {
  color: var(--ok-400);
}
.step.is-done i {
  border-color: var(--ok-400);
  background: rgba(52, 211, 153, 0.14);
  color: var(--ok-400);
}
.step-sep {
  width: 24px;
  height: 1px;
  background: var(--line);
}
@media (max-width: 620px) {
  .step span {
    display: none;
  }
  .step-sep {
    width: 14px;
  }
}

/* ---------- IMPALCATURA ---------- */
.booking {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 940px) {
  .booking {
    grid-template-columns: 1fr;
  }
}

.panel {
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.panel-title h2 {
  font-size: 1.05rem;
}

/* ---------- SCELTA PACCHETTO ---------- */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.7rem;
}

/* Radio nascosta ma raggiungibile da tastiera e screen reader */
.pick input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.pick label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-1);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}
.pick label:hover {
  border-color: var(--line-hi);
  background: rgba(59, 130, 246, 0.06);
}
.pick input:checked + label {
  border-color: var(--blue-400);
  background: rgba(59, 130, 246, 0.13);
  box-shadow: var(--glow-blue);
}
.pick input:focus-visible + label {
  outline: 2px solid var(--blue-400);
  outline-offset: 2px;
}
.pick label b {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--text-hi);
}
.pick label span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue-400);
}

/* ---------- SERVIZI AGGIUNTIVI ---------- */
#addonsBox {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.addons-title {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 0.85rem;
}
.addons-title span {
  color: var(--text-low);
  text-transform: none;
  letter-spacing: 0;
}

.addons-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.addon {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-1);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}
.addon:hover {
  border-color: var(--line-hi);
  background: rgba(59, 130, 246, 0.06);
}

/* La checkbox vera resta raggiungibile da tastiera, ma invisibile */
.addon input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.addon-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line-hi);
  background: var(--sunken);
  color: transparent;
  transition: all 0.25s var(--ease-out);
}
.addon-box svg {
  width: 12px;
  height: 12px;
}
.addon input:checked + .addon-box {
  background: var(--grad-brand);
  border-color: transparent;
  color: #04070f;
  box-shadow: var(--glow-blue);
}
.addon input:focus-visible + .addon-box {
  outline: 2px solid var(--blue-400);
  outline-offset: 2px;
}
.addon:has(input:checked) {
  border-color: var(--blue-400);
  background: rgba(59, 130, 246, 0.1);
}

.addon-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.addon-body b {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-hi);
}
.addon-body span {
  font-size: 0.77rem;
  color: var(--text-low);
  line-height: 1.45;
}

.addon-price {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ok-400);
}

/* Riga di un extra nel riepilogo */
.sum-row.is-addon .k {
  color: var(--text-mid);
  font-size: 0.82rem;
}
.sum-row.is-addon .v {
  color: var(--ok-400);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.sum-row.is-sconto .k {
  color: var(--text-mid);
  font-size: 0.82rem;
}
.sum-row.is-sconto .v {
  color: var(--warn-400);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* ---------- CODICE SCONTO ---------- */
.sconto-row {
  display: flex;
  gap: 0.5rem;
}
.sconto-row input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sconto-row .btn {
  flex-shrink: 0;
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
}
.sconto-esito {
  display: block;
  min-height: 1em;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}
.sconto-esito.is-ok {
  color: var(--ok-400);
}
.sconto-esito.is-ko {
  color: var(--bad-400);
}

/* ---------- CALENDARIO ---------- */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cal-month {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-hi);
  text-transform: capitalize;
}
.cal-nav {
  display: flex;
  gap: 0.4rem;
}
.cal-nav button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}
.cal-nav button:hover:not(:disabled) {
  border-color: var(--blue-400);
  color: var(--blue-300);
  background: rgba(59, 130, 246, 0.1);
}
.cal-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.cal-nav svg {
  width: 14px;
  height: 14px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  padding-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-low);
}

.cal-day {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--hairline);
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}
.cal-day:hover:not(:disabled) {
  border-color: var(--blue-400);
  background: rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}
.cal-day:disabled {
  color: var(--text-low);
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
}
.cal-day.is-empty {
  background: transparent;
  cursor: default;
  pointer-events: none;
}
.cal-day.is-today::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--blue-400);
  box-shadow: var(--glow-blue);
}
.cal-day.is-selected {
  background: var(--grad-brand);
  border-color: transparent;
  color: #04070f;
  font-weight: 700;
  box-shadow: var(--glow-blue);
}
.cal-day.is-selected.is-today::after {
  background: #04070f;
  box-shadow: none;
}

.cal-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--text-low);
}
.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.cal-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

/* ---------- SLOT ---------- */
.slots-wrap {
  min-height: 190px;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.55rem;
}
.slot {
  position: relative;
  padding: 0.7rem 0.4rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-1);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}
.slot:hover {
  border-color: var(--blue-400);
  color: var(--blue-300);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}
.slot.is-selected {
  background: var(--grad-brand);
  border-color: transparent;
  color: #04070f;
  font-weight: 700;
  box-shadow: var(--glow-blue);
}
/* Pallino sullo slot delle 00:00, che cade il giorno dopo */
.slot .moon {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 0.6rem;
  opacity: 0.75;
}

/* Stati vuoti / errore / caricamento */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 170px;
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-low);
  font-size: 0.88rem;
}
.state svg {
  width: 26px;
  height: 26px;
  opacity: 0.5;
}
.state.is-error {
  color: var(--bad-400);
}

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-hi);
  border-top-color: var(--blue-400);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- FORM ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.field label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.field label .opt {
  color: var(--text-low);
  text-transform: none;
  letter-spacing: 0;
}
.field input,
.field textarea {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--sunken);
  color: var(--text-hi);
  font-size: 0.92rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-low);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}
.field textarea {
  resize: vertical;
  min-height: 88px;
}
.field.has-error input,
.field.has-error textarea {
  border-color: var(--bad-400);
}
.field-error {
  font-size: 0.76rem;
  color: var(--bad-400);
  min-height: 1em;
}

/* Honeypot: invisibile agli umani, i bot lo compilano */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- RIEPILOGO ---------- */
.summary {
  position: sticky;
  top: 5.5rem;
}
@media (max-width: 940px) {
  .summary {
    position: static;
  }
}

.sum-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.sum-row:last-of-type {
  border-bottom: 0;
}
.sum-row .k {
  color: var(--text-low);
  flex-shrink: 0;
}
.sum-row .v {
  color: var(--text-hi);
  font-weight: 500;
  text-align: right;
}
.sum-row .v.empty {
  color: var(--text-low);
  font-weight: 400;
  font-style: italic;
}

.sum-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-hi);
}
.sum-total .k {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.sum-total .v {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.rules li {
  display: flex;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-low);
  line-height: 1.5;
}
.rules svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--blue-400);
}

/* ---------- SCHERMATA FINALE ---------- */
.done {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.1rem;
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad);
}
.done.is-on {
  display: flex;
}
.done-tick {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--ok-400);
  box-shadow: 0 0 45px rgba(52, 211, 153, 0.28);
  animation: pop 0.5s var(--ease-out);
}
.done-tick svg {
  width: 30px;
  height: 30px;
}
@keyframes pop {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
}
.done-card {
  width: min(100%, 420px);
  margin-top: 0.5rem;
  text-align: left;
}

/* Banda di errore in cima al form */
.alert {
  display: none;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  font-size: 0.85rem;
  line-height: 1.55;
}
.alert.is-on {
  display: flex;
}
.alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
