/* =========================================================
   Calendario prenotazioni Key4web
   Palette ripresa da key4web.it
   ========================================================= */

:root {
  --lime:        #96c11f;
  --lime-dark:   #7ea318;
  --lime-soft:   #f1f8e0;
  --magenta:     #ff1053;
  --cyan:        #2ac4ea;
  --blue:        #3452ff;

  --ink:         #1a1a1a;
  --ink-soft:    #4b4f52;
  --muted:       #767b73;

  --bg:          #f4f6f1;
  --card:        #ffffff;
  --line:        #e4e7e2;
  --line-strong: #d3d8cf;

  --radius-lg: 22px;
  --radius:    14px;
  --radius-sm: 10px;

  --shadow:    0 14px 40px rgba(26, 26, 26, .07);
  --shadow-sm: 0 4px 14px rgba(26, 26, 26, .05);

  --font: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--lime-dark); }
a:hover { color: var(--ink); }

img { max-width: 100%; height: auto; }

.shell {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 28px);
}

.shell--narrow { max-width: 680px; padding-block: clamp(28px, 6vw, 56px); }

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 50;
}
.skip-link:focus { left: 0; top: 0; color: #fff; }

/* ---------------------------------------------------------
   Header & footer
   --------------------------------------------------------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding-block: 12px;
}

.logo { display: inline-flex; line-height: 0; }
.logo img { width: clamp(132px, 22vw, 168px); height: auto; }

.site-header__claim {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

.site-footer {
  margin-top: clamp(40px, 7vw, 72px);
  background: var(--ink);
  color: #b9bdb6;
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: 24px;
}

.site-footer p { margin: 0; }
.site-footer a { color: var(--lime); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -40%, rgba(150, 193, 31, .35), transparent 62%),
    radial-gradient(620px 320px at 4% 120%, rgba(42, 196, 234, .22), transparent 60%),
    var(--ink);
  color: #fff;
  padding-block: clamp(40px, 7vw, 72px) clamp(64px, 10vw, 104px);
  margin-bottom: clamp(-52px, -7vw, -44px);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lime);
}

.hero h1 {
  font-size: clamp(30px, 5.4vw, 50px);
  max-width: 17ch;
}

.hero__text {
  margin: 16px 0 0;
  max-width: 56ch;
  font-size: clamp(16px, 2.1vw, 18px);
  color: rgba(255, 255, 255, .82);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* ---------------------------------------------------------
   Card & griglia principale
   --------------------------------------------------------- */

/* Le card salgono sopra la coda dell'hero. */
main > .shell { position: relative; z-index: 1; }

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3.4vw, 32px);
}

.booking__grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 900px) {
  .booking__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .booking__grid > .card:last-child { position: sticky; top: 24px; }
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  margin-bottom: 18px;
}

.step:not(:first-child) { margin-top: 30px; }

.step__n {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--lime);
  color: #15200a;
  font-size: 15px;
  font-weight: 900;
}

/* ---------------------------------------------------------
   Calendario
   --------------------------------------------------------- */

.calendar__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.calendar__title {
  font-size: 17px;
  font-weight: 800;
  text-transform: capitalize;
  text-align: center;
  flex: 1;
}

.calendar__nav {
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.calendar__nav:hover:not(:disabled) {
  background: var(--lime-soft);
  border-color: var(--lime);
}

.calendar__nav:disabled { opacity: .3; cursor: not-allowed; }

.calendar__weekdays,
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar__weekdays {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.day {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.day--empty { visibility: hidden; }

.day--available {
  background: var(--lime-soft);
  border-color: #dbead9;
}

.day--available:hover {
  background: var(--lime);
  color: #15200a;
  transform: translateY(-1px);
}

.day--available::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime-dark);
}

.day--full {
  color: var(--magenta);
  background: #fff1f4;
  border-color: #ffd9e1;
  cursor: not-allowed;
}

.day--closed,
.day--past,
.day:disabled:not(.day--full) {
  color: #bcc0b8;
  cursor: not-allowed;
}

.day--today { box-shadow: inset 0 0 0 2px var(--cyan); }

.day--selected,
.day--selected:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  transform: none;
}

.day--selected::after { background: var(--lime); }

.calendar__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 2px;
  vertical-align: -1px;
}

.dot--free   { background: var(--lime); }
.dot--full   { background: var(--magenta); }
.dot--closed { background: #cfd4ca; }

/* ---------------------------------------------------------
   Slot orari
   --------------------------------------------------------- */

.slots__label {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 600;
}

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

.slot {
  padding: 12px 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}

.slot:hover:not(:disabled) {
  border-color: var(--lime);
  background: var(--lime-soft);
  transform: translateY(-1px);
}

.slot[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.slot:disabled {
  color: #b9bdb6;
  background: #f7f8f5;
  border-color: var(--line);
  cursor: not-allowed;
  text-decoration: line-through;
}

.slots__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.slots--loading { opacity: .45; }

/* ---------------------------------------------------------
   Riepilogo selezione
   --------------------------------------------------------- */

.summary {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #f7f9f3;
  border: 1px dashed var(--line-strong);
}

.summary--filled {
  background: var(--lime-soft);
  border: 1px solid var(--lime);
  border-style: solid;
}

.summary__icon { font-size: 20px; line-height: 1.4; }
.summary strong { display: block; font-size: 16px; }
.summary span { font-size: 14px; color: var(--ink-soft); }

/* In italiano va maiuscola solo l'iniziale: "Lunedì 26 ottobre 2026". */
.summary strong::first-letter,
.success__when::first-letter { text-transform: uppercase; }

/* ---------------------------------------------------------
   Form
   --------------------------------------------------------- */

.field { margin-bottom: 18px; }

.field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.req { color: var(--magenta); }

.opt {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  text-transform: lowercase;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fcfdfb;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.field input::placeholder { color: #b4b9b0; }

.field input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(150, 193, 31, .22);
}

.field--invalid input { border-color: var(--magenta); background: #fff8fa; }
.field--invalid input:focus { box-shadow: 0 0 0 4px rgba(255, 16, 83, .16); }

.field__error {
  margin: 7px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--magenta);
}

.field--check > label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-soft);
}

.field--check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--lime-dark);
  cursor: pointer;
  flex: none;
}

:where(button, a, input, [tabindex]):focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------------------------------------------------------
   Bottoni
   --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.btn--primary {
  width: 100%;
  background: var(--lime);
  color: #15200a;
  box-shadow: 0 8px 22px rgba(150, 193, 31, .35);
}

.btn--primary:hover { background: var(--lime-dark); color: #0f1707; transform: translateY(-2px); }
.btn--primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--danger { background: var(--magenta); color: #fff; }
.btn--danger:hover { background: #d9003f; color: #fff; transform: translateY(-2px); }

.btn--ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

.btn--link {
  background: none;
  color: var(--ink-soft);
  padding-inline: 10px;
  font-weight: 700;
}

.form__note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------------------------------
   Messaggi, esito, dettagli
   --------------------------------------------------------- */

.notice {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid;
}

.notice--error   { background: #fff1f4; border-color: #ffc9d6; color: #b8003c; }
.notice--warning { background: #fff8e6; border-color: #ffe2a6; color: #8a6000; }

.card--success,
.card--error {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.success__icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--lime);
  color: #15200a;
  font-size: 30px;
  font-weight: 900;
}

.card--error .success__icon { background: var(--magenta); color: #fff; }

.card--success h1,
.card--success h2,
.card--error h1 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 10px; }

.success__when {
  display: inline-block;
  margin: 4px 0 18px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--lime-soft);
  border: 1px solid var(--lime);
  font-weight: 800;
}

.success__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.page--admin main { padding-block: clamp(24px, 5vw, 48px); }
.admin__title { font-size: clamp(21px, 3.6vw, 28px); margin-bottom: 18px; }

.details {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  text-align: left;
  border-top: 1px solid var(--line);
}

@media (min-width: 540px) {
  .details { grid-template-columns: 170px 1fr; }
}

.details dt,
.details dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.details dt {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 2px;
}

.details dd { font-weight: 700; word-break: break-word; }

@media (max-width: 539px) {
  .details dt { border-bottom: 0; }
}

.admin__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.admin__actions .btn { flex: 1 1 220px; width: auto; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge--pending   { background: #fff4d9; color: #8a6000; }
.badge--confirmed { background: var(--lime-soft); color: #4f6a08; }
.badge--declined  { background: #ffe8ee; color: #b8003c; }
.badge--expired   { background: #eef0ec; color: var(--muted); }

/* Honeypot anti-spam: invisibile agli utenti, presente per i bot. */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
