/* Stile comune ai due sottositi: stessi colori e caratteri di oranunc.it.
   Il colore di marca cambia con il prodotto: verde per OraPiena, terracotta per Nunc Prenota. */
@font-face{font-family:"Instrument Serif";font-style:normal;font-weight:400;font-display:swap;src:url(/s/caratteri/instrument-serif.woff2) format("woff2")}
@font-face{font-family:"Instrument Serif";font-style:italic;font-weight:400;font-display:swap;src:url(/s/caratteri/instrument-serif-italic.woff2) format("woff2")}
@font-face{font-family:"Manrope";font-style:normal;font-weight:400 800;font-display:swap;src:url(/s/caratteri/manrope.woff2) format("woff2")}

:root {
  --bg: #f6f2eb; --bg2: #efe8dd; --card: #fffdf9; --ink: #1a1e1c; --mut: #6b645c; --line: #e3dbcf; --line2: #d3c8b8;
  --brand: #0f7a6a; --brand-ink: #ffffff; --brand-soft: #dcefe9; --brand-scuro: #0a5a4e;
  --warn: #8a5200; --warn-soft: #fbefd9; --bad: #b3261e; --bad-soft: #fbe6e4; --ok: #1d7536; --ok-soft: #e3f3e7;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px; --ombra: 0 1px 2px rgba(26, 30, 28, .05), 0 18px 40px -18px rgba(26, 30, 28, .22);
  color-scheme: light;
}
[data-prodotto=nuncprenota] { --brand: #a64b32; --brand-soft: #f5e4db; --brand-scuro: #7e3622; }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816; --bg2: #1a1f1d; --card: #1d2321; --ink: #ece8e1; --mut: #a59d93; --line: #2f3633; --line2: #414a46;
    --brand: #3fb8a3; --brand-ink: #062019; --brand-soft: #15302a; --brand-scuro: #7fd6c5;
    --warn: #e9ab4c; --warn-soft: #33260f; --bad: #f08a80; --bad-soft: #3a1c19; --ok: #6ccf8a; --ok-soft: #163121;
    --ombra: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
  [data-prodotto=nuncprenota] { --brand: #e9a58c; --brand-ink: #2a120b; --brand-soft: #3a211a; --brand-scuro: #f3c3b1; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; }
h2 { font-size: 1.25rem; margin: 0 0 6px; letter-spacing: -.01em; }
h3 { font-size: 1.02rem; margin: 22px 0 10px; letter-spacing: -.01em; }
.card h3:first-child, dialog h3 { margin-top: 0; }
p { margin: 6px 0; }
a { color: var(--brand); }
.mut { color: var(--mut); }
small { font-size: .8em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; line-height: 1.05; }

/* pulsanti e campi */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line2);
  background: var(--card); color: var(--ink); font: inherit; font-weight: 700; border-radius: 10px;
  padding: 9px 14px; cursor: pointer; text-decoration: none; min-height: 40px; text-align: center;
}
.btn:hover { border-color: var(--mut); }
.btn.primario { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primario:hover { filter: brightness(1.06); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.pericolo { color: var(--bad); }
.btn.pieno-pericolo { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.piccolo { padding: 5px 10px; min-height: 32px; font-size: .85rem; }
.btn.icona { width: 40px; padding: 0; font-size: 1.2rem; flex: 0 0 auto; }
.btn.largo { width: 100%; min-height: 48px; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line2); border-radius: 9px;
  padding: 8px 10px; min-height: 40px; width: 100%;
}
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); flex: 0 0 auto; }
input[type=color] { padding: 2px; width: 56px; }
label { display: block; font-size: .85rem; font-weight: 700; color: var(--mut); margin: 10px 0 0; }
label > input, label > select, label > textarea { margin-top: 4px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; font-size: .95rem; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 12px; margin: 14px 0 0; padding: 4px 12px 12px; }
legend { font-weight: 800; padding: 0 6px; }
.aiuto { font-size: .83rem; color: var(--mut); font-weight: 500; }
.griglia2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 420px) { .griglia2 { grid-template-columns: 1fr; } }
.riga-az { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* schede generiche */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.vuoto { text-align: center; padding: 40px 16px; color: var(--mut); }
.vuoto b { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 6px; }
.intro { background: var(--brand-soft); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; font-size: .92rem; }
.chip { display: inline-block; font-size: .74rem; font-weight: 800; border-radius: 20px; padding: 2px 8px; background: var(--bg); color: var(--mut); border: 1px solid var(--line); margin: 3px 4px 0 0; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.avviso { font-size: .85rem; color: var(--warn); font-weight: 700; }
.errore { color: var(--bad); font-weight: 700; font-size: .9rem; }
details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--brand); }

/* testata del pannello, con il menu dell'accesso */
.testata {
  position: sticky; top: 0; z-index: 8; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 9px 16px; background: var(--card); border-bottom: 1px solid var(--line); min-height: 57px;
}
.marchio { display: flex; gap: 10px; align-items: center; min-width: 0; text-decoration: none; color: inherit; }
.marchio img { border-radius: 8px; flex: 0 0 auto; }
.marchio b { display: block; font-size: 1.05rem; line-height: 1.2; }
.marchio span { display: block; font-size: .8rem; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.testata-dx { display: flex; align-items: center; gap: 12px; }
.orologio { text-align: right; font-size: .85rem; color: var(--mut); line-height: 1.25; }
.orologio b { color: var(--ink); font-size: 1rem; }
.orologio .prova { display: block; color: var(--warn); font-weight: 700; }
.conto { position: relative; }
.conto > button {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line2); background: var(--brand-soft); color: var(--brand);
  font: inherit; font-weight: 800; cursor: pointer; text-transform: uppercase;
}
.conto-menu {
  position: absolute; right: 0; top: 46px; min-width: 240px; background: var(--card); border: 1px solid var(--line2); border-radius: 12px;
  box-shadow: var(--ombra); padding: 6px; z-index: 20;
}
.conto-menu .chi { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: .85rem; color: var(--mut); overflow-wrap: anywhere; }
.conto-menu .chi b { display: block; color: var(--ink); font-size: .95rem; }
.conto-menu a, .conto-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; text-decoration: none;
}
.conto-menu a:hover, .conto-menu button:hover { background: var(--bg); }
.stato-rete { font-size: .78rem; font-weight: 800; color: var(--bad); background: var(--bad-soft); border-radius: 20px; padding: 3px 9px; }

.schede {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; background: var(--card);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.schede button {
  flex: 1; border: 0; background: none; color: var(--mut); font: inherit; font-size: .8rem; font-weight: 700;
  padding: 14px 2px; cursor: pointer; position: relative; min-width: 0;
}
.schede button.on { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.badge:not(:empty) {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff;
  font-size: .72rem; line-height: 18px;
}
body.pannello { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) {
  body.pannello { padding-bottom: 24px; }
  .schede { position: sticky; top: 57px; bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); justify-content: center; }
  .schede button { flex: 0 0 auto; padding: 12px 18px; font-size: .9rem; }
  .schede button.on { box-shadow: inset 0 -3px 0 var(--brand); }
}
main { max-width: 1040px; margin: 0 auto; padding: 16px; }
.carico { text-align: center; padding: 18vh 16px; color: var(--mut); }

/* regole e impostazioni */
.regola { display: grid; grid-template-columns: 1fr 110px; gap: 4px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.regola:last-child { border-bottom: 0; }
.regola b { display: block; font-size: .95rem; }
.regola span { font-size: .83rem; color: var(--mut); }
.regola input, .regola select { margin: 0; }
.regola.larga { grid-template-columns: 1fr minmax(150px, 240px); }
.regola:has(input[type="time"]), .regola:has(.btn) { grid-template-columns: 1fr auto; }
@media (max-width: 520px) { .regola.larga { grid-template-columns: 1fr; } }

/* finestra e avvisi */
dialog {
  border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(20, 24, 22, .5); }
dialog form, .dlg-pad { padding: 18px; }
.az-dlg { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 18px; position: sticky; bottom: 0; background: var(--card); padding: 10px 0 2px; }
.az-dlg .sx { margin-right: auto; }
/* sul telefono le finestre prendono tutto lo schermo: più facili da usare con un dito */
@media (max-width: 560px) {
  dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  dialog form, .dlg-pad { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
}
.toast {
  position: fixed; left: 50%; bottom: calc(140px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 700; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100vw - 32px); width: max-content; z-index: 40; box-shadow: 0 8px 30px rgba(0,0,0,.25);
  display: flex; align-items: center; gap: 14px;
}
.toast.su { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.su.con-azione { pointer-events: auto; }
.toast.ok { background: var(--ok); color: #fff; }
.toast button {
  flex: 0 0 auto; border: 0; border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 800; cursor: pointer;
  background: var(--bg); color: var(--ink);
}
@media (min-width: 760px) { .toast { bottom: 96px; } }

/* pagine singole: accesso, attivazione, risposta alla proposta, prenotazione */
body.singola { min-height: 100dvh; display: flex; flex-direction: column; }
.singola-corpo { flex: 1; display: grid; place-items: center; padding: 28px 16px; }
.scheda-singola { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; box-shadow: var(--ombra); }
.scheda-singola .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.scheda-singola .logo img { border-radius: 12px; }
.scheda-singola .logo b { display: block; font-size: 1.1rem; line-height: 1.2; }
.scheda-singola .logo span { font-size: .82rem; color: var(--mut); }
.scheda-singola h1 { font-family: var(--serif); font-weight: 400; font-size: 2.3rem; line-height: 1.05; letter-spacing: -.012em; margin-bottom: 8px; }
.scheda-singola h1 em { font-style: italic; color: var(--brand); }
.piede-singola { text-align: center; font-size: .82rem; color: var(--mut); padding: 0 16px 22px; }
.piede-singola a { color: inherit; }
.occhio { position: relative; display: block; }
.occhio input { padding-right: 86px; }
.occhio button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--brand); font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; padding: 6px 8px; margin-top: 2px; }
