/* Pagina Prenota. I colori vengono dal tema (theme.json), con valori di riserva. */
.pren {
  --pren-testo: var(--wp--preset--color--contrast, #2b2b2b);
  --pren-fondo: var(--wp--preset--color--base, #fff);
  --pren-scuro: var(--wp--preset--color--bosco, var(--wp--preset--color--contrast, #333));
  --pren-chiaro: var(--wp--preset--color--neve, #f1ede6);
  --pren-linea: var(--wp--preset--color--linea, #ddd5c8);
  --pren-tenue: var(--wp--preset--color--pietra, #777);
  --pren-errore: #a12622;
  color: var(--pren-testo);
  max-width: 760px;
  margin: 0 auto;
}
.pren *, .pren *::before, .pren *::after { box-sizing: border-box; }
.pren .pren-tit { font-size: 1.15rem; margin: 1.6em 0 .5em; }
.pren .pren-aiuto { color: var(--pren-tenue); font-size: .92rem; margin: .3em 0 .8em; }

.pren-tipi-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pren-tipo { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; border: 1px solid var(--pren-linea); border-radius: 10px; background: var(--pren-fondo); color: inherit; font: inherit; cursor: pointer; }
.pren-tipo span { font-size: .88rem; color: var(--pren-tenue); }
.pren-tipo.on { border: 2px solid var(--pren-scuro); padding: 13px 15px; background: var(--pren-chiaro); }
.pren-tipo:focus-visible, .pren-g:focus-visible, .pren-freccia:focus-visible { outline: 2px solid var(--pren-scuro); outline-offset: 2px; }

.pren-cal { position: relative; }
.pren-nav { display: flex; justify-content: space-between; position: absolute; left: 0; right: 0; top: 0; pointer-events: none; }
.pren-freccia { pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pren-linea); background: var(--pren-fondo); color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.pren-freccia:disabled { opacity: .3; cursor: default; }
.pren-mesi { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pren-mese { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; }
.pren-mese caption { font-weight: 600; text-transform: capitalize; height: 40px; line-height: 40px; }
.pren-mese th { font-size: .75rem; font-weight: 500; color: var(--pren-tenue); padding: 4px 0; text-align: center; border: 0; }
.pren-mese td { padding: 1px; border: 0; text-align: center; }
.pren-g { width: 100%; aspect-ratio: 1 / 1.05; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.pren-g .n { font-size: .92rem; }
.pren-g .e { font-size: .64rem; color: var(--pren-tenue); }
.pren-g:not(:disabled):hover { background: var(--pren-chiaro); }
.pren-g.no { opacity: .3; cursor: default; }
.pren-g.pieno .n { text-decoration: line-through; opacity: .45; }
.pren-g.no-click { cursor: default; }
.pren-g.sel { background: var(--pren-chiaro); border-radius: 0; }
.pren-g.a, .pren-g.p { background: var(--pren-scuro) !important; color: #fff; border-radius: 6px; }
.pren-g.a .e, .pren-g.p .e { color: #fff; }
.pren-sel { font-weight: 600; margin: .8em 0 0; }

.pren-riga { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.pren-riga label { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.pren-riga input, .pren-riga select { width: 120px; }
.pren input[type=text], .pren input[type=email], .pren input[type=tel], .pren input[type=number], .pren select, .pren textarea {
  font: inherit; color: inherit; background: var(--pren-fondo); border: 1px solid var(--pren-linea); border-radius: 6px; padding: 9px 10px; min-height: 44px;
}
.pren-voci { width: 100%; border-collapse: collapse; margin: 0; }
.pren-voci td { padding: 7px 0; border: 0; border-bottom: 1px solid var(--pren-linea); }
.pren-voci td:last-child { text-align: right; white-space: nowrap; }
.pren-voci .tot td { font-weight: 700; font-size: 1.1rem; border-bottom: 0; }
.pren-err { color: var(--pren-errore); }
.pren-err p { margin: .4em 0; }

.pren-modulo { display: flex; flex-direction: column; gap: 12px; }
.pren-campo { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.pren-campo input, .pren-campo textarea { width: 100%; }
.pren-check { display: block; font-size: .92rem; }
.pren-check input { margin-right: 6px; width: 18px; height: 18px; vertical-align: -3px; }
.pren-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pren-invia { align-self: flex-start; min-height: 46px; padding: 12px 28px; cursor: pointer; }
.pren-invia:disabled { opacity: .6; cursor: default; }
.pren-ok { padding: 20px 22px; border-radius: 10px; background: var(--pren-chiaro); }
.pren-ok h3 { margin-top: 0; }

@media (max-width: 640px) {
  .pren-mesi { grid-template-columns: 1fr; gap: 8px; }
  .pren-mese + .pren-mese caption { margin-top: 8px; }
}
