/* ═══════════════════════════════════════════════════════════════
   DAL MASO — Form "Prenota la tua visita" (design dedicato)
   Tutto è scoped sotto .dm-prenota per non interferire col resto.
   Font: Cormorant Garamond (display) + Jost (testo).
══════════════════════════════════════════════════════════════ */

.dm-prenota{
  --cream:#F6F1E9; --cream-deep:#EFE7D7; --wine:#6E1B2E; --wine-dark:#511320;
  --plum:#2A1418; --terra:#B45A3C; --brass:#B2965A; --ink:#3A2E2C; --muted:#8A7C72;
  --line:#DED3C1; --field:#FFFFFF; --ok:#1F7A46; --ok-bg:#EAF4ED; --err:#9A2B25;
  font-family:'Jost', system-ui, sans-serif;
  color:var(--ink); line-height:1.55;
  max-width:780px; margin:0 auto; text-align:left;
}
.dm-prenota *{ box-sizing:border-box; }

/* Card contenitore */
.dm-prenota .card{
  background:#FBF8F2; border:1px solid var(--line); border-radius:5px;
  padding:30px 30px 26px; box-shadow:0 18px 40px -28px rgba(42,20,24,.45);
}
.dm-prenota .card .intro{ font-size:15.5px; color:var(--ink); margin:0 0 8px; }
.dm-prenota .card .intro b{ color:var(--plum); font-weight:600; }

/* Form base */
.dm-prenota form{ margin:0; }
.dm-prenota fieldset{ border:0; margin:0; padding:0; }
.dm-prenota .leg{ display:flex; align-items:center; gap:12px; margin:22px 0 14px; }
.dm-prenota .leg .n{ font-family:'Cormorant Garamond',serif; font-size:20px; color:var(--wine); font-weight:600; line-height:1; }
.dm-prenota .leg .t{ font-size:11.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--plum); font-weight:600; }
.dm-prenota .leg .bar{ flex:1; height:1px; background:var(--line); }

.dm-prenota .row2{ display:grid; grid-template-columns:1fr 1fr; gap:16px 18px; }
.dm-prenota .field{ display:flex; flex-direction:column; gap:6px; margin-bottom:2px; }
.dm-prenota .field--full{ grid-column:1 / -1; }
.dm-prenota label{ font-size:11.5px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); font-weight:500; }
.dm-prenota label .req, .dm-prenota .dm-req{ color:var(--terra); }

.dm-prenota input, .dm-prenota select, .dm-prenota textarea{
  font-family:inherit; font-size:15px; color:var(--plum); background:var(--field);
  border:1px solid var(--line); border-radius:3px; padding:11px 12px; width:100%;
  transition:border-color .18s, box-shadow .18s;
}
.dm-prenota textarea{ resize:vertical; min-height:104px; }
.dm-prenota select{
  appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236E1B2E' stroke-width='1.5'/></svg>");
  background-repeat:no-repeat; background-position:right 13px center; padding-right:34px;
}
.dm-prenota input:focus, .dm-prenota select:focus, .dm-prenota textarea:focus{
  outline:none; border-color:var(--wine); box-shadow:0 0 0 3px rgba(110,27,46,.12);
}
.dm-prenota input::placeholder, .dm-prenota textarea::placeholder{ color:#B6ABA0; }
.dm-prenota .field.invalid input, .dm-prenota .field.invalid select, .dm-prenota .field.invalid textarea{
  border-color:var(--err); box-shadow:0 0 0 3px rgba(154,43,37,.10);
}
.dm-prenota .errmsg{ font-size:12px; color:var(--err); letter-spacing:.02em; display:none; }
.dm-prenota .field.invalid .errmsg{ display:block; }
.dm-prenota .hint{ font-size:12px; color:var(--muted); text-transform:none; letter-spacing:normal; }
.dm-prenota .counter{ font-size:11.5px; color:var(--muted); text-align:right; margin-top:-2px; }

/* Honeypot nascosto */
.dm-prenota .dm-acc-hp{ position:absolute!important; left:-9999px!important; top:auto; width:1px; height:1px; overflow:hidden; }

/* Consensi */
.dm-prenota .consent{ display:flex; gap:11px; align-items:flex-start; font-size:13px; color:var(--muted);
  margin:10px 0 2px; text-transform:none; letter-spacing:normal; font-weight:400; }
.dm-prenota .consent input{ width:18px; height:18px; margin-top:1px; accent-color:var(--wine); flex:0 0 auto; }
.dm-prenota .consent a{ color:var(--wine); }
.dm-prenota .consent.invalid{ color:var(--err); }

/* Verifica automatica (anti-bot UX) */
.dm-prenota .verify{ display:flex; align-items:center; gap:12px; margin:16px 0 6px; padding:12px 14px;
  border:1px solid var(--line); border-radius:4px; background:#FFFFFF; transition:background .25s, border-color .25s; }
.dm-prenota .verify .vIcon{ width:24px; height:24px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; }
.dm-prenota .verify .ring{ width:18px; height:18px; border-radius:50%; border:2px solid var(--line);
  border-top-color:var(--wine); animation:dm-spin .7s linear infinite; display:none; }
.dm-prenota .verify .check{ display:none; }
.dm-prenota .verify .dot{ width:9px; height:9px; border-radius:50%; background:var(--muted); display:block; }
.dm-prenota .verify .vText{ font-size:13.5px; color:var(--ink); text-transform:none; letter-spacing:normal; font-weight:400; }
.dm-prenota .verify .vSub{ display:block; font-size:11.5px; color:var(--muted); letter-spacing:.02em; }
.dm-prenota .verify[data-state="checking"] .ring{ display:block; }
.dm-prenota .verify[data-state="checking"] .dot{ display:none; }
.dm-prenota .verify[data-state="done"]{ background:var(--ok-bg); border-color:#BFE0CB; }
.dm-prenota .verify[data-state="done"] .check{ display:block; }
.dm-prenota .verify[data-state="done"] .dot{ display:none; }
.dm-prenota .verify[data-state="done"] .vText{ color:var(--ok); font-weight:500; }
@keyframes dm-spin{ to{ transform:rotate(360deg); } }

/* Azioni */
.dm-prenota .actions{ display:flex; align-items:center; gap:18px; margin-top:14px; flex-wrap:wrap; }
.dm-prenota .dm-submit{ font-family:'Jost',sans-serif; font-weight:500; font-size:13px; letter-spacing:.16em;
  text-transform:uppercase; color:#FBF8F2; background:var(--wine); border:0; border-radius:3px;
  padding:15px 34px; cursor:pointer; transition:background .2s, transform .05s, opacity .2s; }
.dm-prenota .dm-submit:hover{ background:var(--wine-dark); }
.dm-prenota .dm-submit:active{ transform:translateY(1px); }
.dm-prenota .dm-submit:disabled{ opacity:.45; cursor:not-allowed; background:var(--wine); }
.dm-prenota .dm-req-note{ font-size:12px; color:var(--muted); }

/* Errore server */
.dm-prenota .dm-prenota-err{ background:#FBEAE8; border:1px solid #E6B5B0; color:var(--err);
  padding:12px 14px; border-radius:4px; font-size:14px; margin:0 0 16px; }

/* Successo (server-rendered) */
.dm-prenota .dm-booking-success{ text-align:center; padding:40px 26px; background:#FBF8F2;
  border:1px solid var(--line); border-radius:5px; box-shadow:0 18px 40px -28px rgba(42,20,24,.45); }
.dm-prenota .dm-booking-success .tick{ width:60px; height:60px; border-radius:50%; border:2px solid var(--ok);
  display:flex; align-items:center; justify-content:center; margin:0 auto 18px; }
.dm-prenota .dm-booking-success .tick svg{ width:30px; height:30px; }
.dm-prenota .dm-booking-success h3{ font-family:'Cormorant Garamond',serif; font-weight:600; font-size:30px; color:var(--plum); margin:0 0 8px; }
.dm-prenota .dm-booking-success p{ color:var(--ink); max-width:460px; margin:0 auto 6px; font-size:15.5px; }
.dm-prenota .dm-booking-success a{ color:var(--wine); }

/* Responsive */
@media (max-width:540px){
  .dm-prenota .row2{ grid-template-columns:1fr; }
  .dm-prenota .card{ padding:24px 18px; }
}
@media (prefers-reduced-motion:reduce){
  .dm-prenota *{ transition:none!important; }
  .dm-prenota .verify .ring{ animation:none; }
}
