/* marinadibardi.it — stili condivisi (mobile first) */
[hidden] { display: none !important; }
:root {
  --ground: #F5EFE4;
  --card: #FFFDF8;
  --sand: #EDE3D1;
  --line: #E2D8C6;
  --line-soft: #EFE7D8;
  --field: #CFC3AE;
  --ink: #1B2A33;
  --muted: #4F5B64;
  --earth: #6A5A45;
  --earth-ink: #5A4A33;
  --sea: #173F5F;
  --sea-soft: #DCE7EE;
  --accent: #B5522B;
  --gold: #F2D9A6;
  --grass: #3F6B1E; --grass-soft: #DCEBC9;   /* La Racchetta: campo in erba sintetica verde */
  --ok-bg: #D9EBDD;   --ok: #2F6B45;
  --warn-bg: #F2D9A6; --warn: #5A4A33;
  --bad-bg: #F6D5C8;  --bad: #8A3B1E;
  --off-bg: #E6E1D8;  --off: #5B5750;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); background: var(--ground); color: var(--ink); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--sea); }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--sea); margin: 0; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 24px; border: 0; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; background: var(--accent); color: #fff; }
.btn:hover { color: #fff; filter: brightness(0.95); }
.btn.sea { background: var(--sea); }
.btn.light { background: var(--ground); color: var(--sea); }
.btn.outline { background: transparent; color: var(--sea); border: 1.5px solid var(--sea); }
.btn.outline:hover { color: var(--sea); background: rgba(23, 63, 95, .06); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 19px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.input, label.field input, label.field select, label.field textarea {
  min-height: 46px; border: 1px solid var(--field); border-radius: 10px; padding: 0 12px;
  font: inherit; font-size: 16px; font-weight: 400; background: #fff; color: var(--ink); width: 100%;
}
label.field textarea { padding: 10px 12px; resize: vertical; min-height: 96px; }
/* moduli ordinati (26/10/2026): stessa altezza e larghezza per tutte le caselle, anche su iPhone, che altrimenti disegna select, date e file a modo suo */
label.field input:not([type=file], [type=checkbox], [type=radio]), label.field select { height: 46px; max-width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; line-height: 1.2; }
label.field select { padding-right: 34px; text-overflow: ellipsis; background: #fff 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 1.5l5 5 5-5' fill='none' stroke='%234F5B64' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 12px center; }
label.field input[type=file] { height: auto; min-height: 46px; padding: 10px 12px; max-width: 100%; }
label.field input::placeholder, label.field textarea::placeholder { color: #8a949b; }
/* a telefono le caselle di un modulo stanno una sotto l’altra: due o tre affiancate hanno etichette su più righe e si sovrappongono */
@media (max-width: 520px) {
  :is(.grid2, .grid3):has(> label.field) { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
/* campi affiancati con etichette di lunghezza diversa: la casella va in basso, così restano allineate (15/10/2026) */
label.field > :is(input, select, textarea):first-of-type { margin-top: auto; }
/* su iPhone il campo data ignora la larghezza e finisce sotto il vicino: lo rendiamo una casella normale, testo a sinistra (17/10/2026) */
label.field { min-width: 0; }
label.field input:is([type=date], [type=time], [type=month]) { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; text-align: left; display: block; }
label.field input:is([type=date], [type=time], [type=month])::-webkit-date-and-time-value { text-align: left; }
.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 9px; background: var(--sand); color: var(--earth-ink); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--sea-soft); color: var(--sea); }
.chip.off { background: var(--off-bg); color: var(--off); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.notice { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.info { background: var(--sea-soft); color: var(--sea); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
