/* Booking engine per strutture ricettive: stile dei mockup di questo prodotto
   (partials/*.html). Si carica dopo style.css del motore (site.css in content.mjs).
   Strutture inventate: Villa Ortensia (verde salvia) e Casa sul Porto (blu porto). */

:root {
  --hs-sea: #1d4e6e;
  --hs-sea-deep: #0f2a3a;
  --hs-guesty: #1a1a2e;
}

.mark { background: var(--hs-sea); }
.ref-avatar { background: var(--hs-sea); }
.ui-status .dot { background: #1f8f6a; }

/* ---------- Hero ---------- */
.hs-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.hs-cal span { font-family: var(--font-mono); font-size: 8.5px; color: #89898a; text-align: center; }
.hs-cal i { font-style: normal; display: grid; place-items: center; aspect-ratio: 1; border-radius: 6px; font-size: 10.5px; background: #f5f5f5; color: #4a4a4f; }
.hs-cal i.in { background: var(--accent-wash-strong); color: #202020; }
.hs-cal i.end { background: var(--accent); color: #181818; font-weight: 600; }
.hs-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 12.5px; color: #4a4a4f; box-shadow: inset 0 -1px 0 #efeff1; }
.hs-total { box-shadow: none; align-items: baseline; color: #202020; }
.hs-total strong { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.hs-g { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--hs-guesty); color: #fff; font-weight: 600; font-size: 12px; flex: 0 0 auto; }
.hs-chan { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.hs-chan span { padding: 4px 8px; border-radius: 999px; background: #f0f0f1; font-size: 11px; }
.hs-chan .on { background: var(--accent-wash-solid); color: #202020; }
.ui-big.hs-code { font-family: var(--font-mono); font-size: 22px; letter-spacing: .06em; color: var(--accent); margin: 8px 0 6px; }
.hs-stars { color: #e0a526; letter-spacing: 2px; font-size: 14px; margin-bottom: 4px; }
.ui-ico { font-size: 12px; }

/* ---------- Pannelli delle sezioni split ---------- */
.hs-panel { display: grid; gap: 16px; padding: 40px clamp(16px, 3vw, 40px); background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--stroke-hairline); min-width: 0; }
.hs-note { font-size: 12.5px; line-height: 1.5; color: #5f5f63; margin-top: 12px; }
.hs-note a { color: #202020; }

/* Calcolatore commissioni */
.hs-calc, .hs-plans { background: #fff; color: #202020; border-radius: 18px; padding: 20px; box-shadow: 0 18px 44px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .06); min-width: 0; }
.hs-calc .cap { font-size: 10.5px; color: #6b6b70; }
.hs-calc-field { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--hs-sea); }
.hs-calc-field strong { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
.hs-calc-field span { font-size: 12px; color: #6b6b70; }
.hs-calc-t, .hs-plan-t { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13.5px; line-height: 1.35; }
.hs-calc-t th, .hs-calc-t td, .hs-plan-t th, .hs-plan-t td { padding: 11px 8px; text-align: start; vertical-align: top; box-shadow: inset 0 -1px 0 #efeff1; }
.hs-calc-t thead th, .hs-plan-t thead th { font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: var(--tracking-mono); text-transform: uppercase; color: #89898a; padding-top: 0; }
.hs-calc-t tbody th, .hs-plan-t tbody th { font-weight: 500; }
.hs-calc-t .n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hs-calc-t tbody td.n { font-weight: 500; }
.hs-calc-t tr.hl th, .hs-calc-t tr.hl td, .hs-plan-t tr.hl th, .hs-plan-t tr.hl td { background: color-mix(in srgb, var(--accent) 14%, #fff); }
.hs-calc-t tr.hl th, .hs-plan-t tr.hl th { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.hs-calc-t tr.hl td:last-child, .hs-plan-t tr.hl td:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.hs-calc-t td { color: #4a4a4f; }

.hs-guide { display: flex; align-items: center; gap: 12px; background: #fff; color: #202020; border-radius: 14px; padding: 12px 14px; text-decoration: none; box-shadow: 0 10px 28px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .05); max-width: 380px; justify-self: end; }
.hs-guide:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .12), inset 0 0 0 1px var(--hs-sea); }
.hs-guide:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.hs-guide > span:last-child { display: grid; gap: 2px; min-width: 0; }
.hs-guide strong { font-weight: 500; font-size: 14px; }
.hs-guide span span { font-size: 12px; color: #6b6b70; }
.hs-guide-ico { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--hs-sea); color: #fff; font-weight: 600; flex: 0 0 auto; }

/* Piani Guesty */
.hs-plans-h { display: flex; align-items: center; gap: 10px; }
.hs-plans-h div { display: grid; gap: 1px; }
.hs-plans-h strong { font-weight: 500; font-size: 15px; }
.hs-plans-h span { font-size: 12px; color: #6b6b70; }
.hs-plans-h .hs-g { width: 34px; height: 34px; border-radius: 9px; font-size: 15px; }
.hs-plan-t td strong { display: block; font-weight: 500; }
.hs-plan-t td span { display: block; font-size: 12px; color: #6b6b70; margin-top: 2px; }
.hs-plan-t td { color: #4a4a4f; }
.hs-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; }
.hs-node { padding: 7px 12px; border-radius: 999px; background: #fff; color: #202020; box-shadow: inset 0 0 0 1px #e2e2e4; }
.hs-node.on { background: var(--accent); color: #181818; box-shadow: none; font-weight: 500; }
.hs-node-g { background: var(--hs-guesty); color: #fff; box-shadow: none; }
.hs-arrow { color: var(--content-muted); }

/* White label: righe prezzo nel telefono */
.hs-pc-row { grid-template-columns: 1fr auto; align-items: baseline; }
.hs-pc-row span { font-size: 12px; }

/* Demo vera: calendario + checkout */
.hs-demo { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.hs-demo figure { margin: 0; }
.hs-demo figcaption { font-size: 14px; color: var(--content-muted); line-height: 1.4; padding: 12px 14px; }
.hs-demo-pay { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-raised); box-shadow: var(--stroke-hairline); }
.hs-demo-pay img { display: block; width: 100%; height: auto; }

/* I problemi di ogni struttura (sezione grid): problema → soluzione */
#problemi .infra-grid dt::after { content: " →"; color: var(--hs-sea); }
[dir="rtl"] #problemi .infra-grid dt::after { content: " ←"; }

@media (max-width: 960px) {
  .hs-demo { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  .hs-demo-pay { max-width: 340px; }
}
@media (max-width: 720px) {
  .hs-panel { padding: 24px 12px; }
  .hs-calc, .hs-plans { padding: 14px; border-radius: 14px; }
  .hs-calc-t, .hs-plan-t { font-size: 12.5px; }
  .hs-calc-t th, .hs-calc-t td, .hs-plan-t th, .hs-plan-t td { padding: 9px 5px; }
  .hs-guide { justify-self: stretch; max-width: none; }
}

/* Hero: titolo più lungo di quello del motore, un po' più piccolo; la mail scende sotto i bottoni */
.hero h1 { font-size: clamp(2.2rem, 4.9vw, 4.6rem); }
.c6 { --x: 24vw; --y: 45vh; }
@media (max-width: 720px) {
  .c6, .c5 { display: none; }
  .c1 { --y: -38vh; }
  .c2 { --y: -38vh; }
  .c3 { --x: -24vw; --y: 35vh; }
  .c4 { --x: 25vw; --y: 34vh; }
}

/* Nome descrittivo lungo: nel menu stretto si accorcia invece di finire sotto il selettore lingua */
@media (max-width: 720px) {
  .nav .brand { min-width: 0; flex: 1 1 auto; }
  .nav .brand span { overflow: hidden; text-overflow: ellipsis; }
  .nav .brand img { flex: 0 0 auto; }
}
