/* ═══ TWIP — primitive delle schermate account ═══════════════════════════
   Un solo alfabeto per Profilo, Impostazioni, Assistenza, Gift card e
   Modifica profilo: righe con icona, gruppi separati da un filo, riquadri,
   campi, bottoni, fisarmoniche. Le pagine ci costruiscono sopra e non
   ridefiniscono colori o spaziature. Mobile prima di tutto: da 760px in su
   la colonna si centra e basta. ═════════════════════════════════════════ */

.acc-wrap { max-width: 560px; margin: 0 auto; padding: 0 var(--cpad, 18px); }

/* ── barra di ritorno, in cima alle schermate figlie ── */
.acc-top { display: flex; align-items: center; gap: 12px; padding: 14px 0 4px; }
.acc-back {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--hair-2, rgba(20,18,28,.05));
  color: var(--ink, #15131F); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.acc-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acc-back:hover { background: rgba(20,18,28,.09); }

/* ── titoli ── */
.acc-h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 12px 0 22px; }
.acc-h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin: 30px 0 12px; }
.acc-lead { font-size: 16px; line-height: 1.55; color: var(--ink-2, #4A4760); margin: 0 0 22px; }

/* ── intestazione profilo ── */
.acc-me { display: flex; align-items: center; gap: 16px; margin: 4px 0 24px; }
.acc-av {
  width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--tw-soft, #DFF3F7); color: var(--tw-2, #0F90A8);
  font-size: 30px; font-weight: 800; overflow: hidden;
}
.acc-av img { width: 100%; height: 100%; object-fit: cover; }
.acc-me b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.acc-me small { display: block; margin-top: 3px; font-size: 14.5px; font-weight: 600; color: var(--ink-3, #8B8799); }

/* ── piastrelle in griglia (Viaggi passati · Contatti) ── */
.acc-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.acc-tile {
  display: grid; gap: 8px; padding: 16px 14px; border-radius: 16px; text-align: left;
  font: inherit; justify-items: start;
  border: 1px solid var(--hair, rgba(20,18,28,.10)); background: #fff;
  color: var(--ink, #15131F); text-decoration: none;
  box-shadow: 0 10px 26px -22px rgba(20,18,40,.6);
}
.acc-tile:hover { border-color: var(--tw, #1BB8D0); color: var(--ink, #15131F); }
.acc-tile svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--tw-2, #0F90A8); }
.acc-tile b { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }

/* ── riquadro invito (Diventa organizzatore) ── */
.acc-promo {
  display: flex; gap: 14px; align-items: center; padding: 16px; margin-bottom: 8px;
  border-radius: 16px; background: var(--tw-tint, #EAF7FA);
  color: var(--ink, #15131F); text-decoration: none;
}
.acc-promo img { width: 54px; height: 54px; flex: none; object-fit: contain; }
.acc-promo b { display: block; font-size: 16px; font-weight: 800; }
.acc-promo small { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--ink-2, #4A4760); }

/* ── liste di voci ── */
.acc-list { display: block; margin: 0; padding: 0; list-style: none; }
.acc-list + .acc-list { border-top: 1px solid var(--hair, rgba(20,18,28,.10)); margin-top: 10px; padding-top: 10px; }
.acc-row {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 2px;
  border: 0; border-bottom: 1px solid var(--hair-2, rgba(20,18,28,.05)); background: none;
  font: inherit; text-align: left; color: var(--ink, #15131F); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.acc-list .acc-row:last-child { border-bottom: 0; }
/* "body.tw2 a" tinge d'azzurro ogni collegamento del sito: nelle liste e
   nelle piastrelle il testo resta inchiostro, come nelle righe-bottone. */
body.tw2 a.acc-row, body.tw2 a.acc-row:hover,
body.tw2 a.acc-tile, body.tw2 a.acc-tile:hover,
body.tw2 a.acc-promo, body.tw2 a.acc-promo:hover { color: var(--ink, #15131F); }
.acc-row:hover { color: var(--ink, #15131F); }
.acc-row:active { opacity: .6; }
.acc-row > svg, .acc-row .acc-ico svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acc-row .acc-ico { position: relative; display: block; flex: none; color: var(--ink, #15131F); }
.acc-row .acc-tx { flex: 1; min-width: 0; }
.acc-row .acc-tx b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.acc-row .acc-tx small { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 600; color: var(--ink-3, #8B8799); line-height: 1.4; }
.acc-row .acc-chev { width: 18px; height: 18px; flex: none; color: var(--ink-3, #8B8799); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acc-row .acc-val { font-size: 14.5px; font-weight: 600; color: var(--ink-3, #8B8799); white-space: nowrap; }
.acc-dot::after { content: ""; position: absolute; top: -2px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: #E0245E; }
.acc-tag { flex: none; font-size: 11.5px; font-weight: 800; letter-spacing: .01em; padding: 3px 8px; border-radius: 999px; background: var(--tw-soft, #DFF3F7); color: var(--tw-2, #0F90A8); }

/* ── campi ── */
.acc-field { display: block; margin-bottom: 14px; }
.acc-field > span { display: block; font-size: 14.5px; font-weight: 700; margin-bottom: 7px; }
.acc-input, .acc-select, .acc-textarea {
  width: 100%; border: 1px solid var(--hair, rgba(20,18,28,.10)); border-radius: 12px;
  padding: 15px 14px; font: inherit; font-size: 16px; color: var(--ink, #15131F);
  background: #fff; outline: none; -webkit-appearance: none; appearance: none;
}
.acc-textarea { min-height: 118px; resize: vertical; line-height: 1.5; }
.acc-input:focus, .acc-select:focus, .acc-textarea:focus { border-color: var(--tw, #1BB8D0); box-shadow: 0 0 0 3px rgba(27,184,208,.18); }
.acc-input::placeholder, .acc-textarea::placeholder { color: var(--ink-3, #8B8799); }
.acc-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B8799' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 42px;
}
.acc-hint { font-size: 13.5px; font-weight: 600; color: var(--ink-3, #8B8799); line-height: 1.45; margin: -6px 0 16px; }
.acc-err { font-size: 13.5px; font-weight: 700; color: #C0392B; margin: -8px 0 14px; }
.acc-input.bad, .acc-textarea.bad, .acc-select.bad { border-color: #C0392B; }

/* ── scelte a pillola (importi, opzioni) ── */
.acc-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.acc-pill {
  border: 1px solid var(--hair, rgba(20,18,28,.10)); border-radius: 999px; background: #fff;
  padding: 12px 20px; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink, #15131F); cursor: pointer;
}
.acc-pill[aria-pressed="true"], .acc-pill.on { border-color: var(--ink, #15131F); border-width: 2px; padding: 11px 19px; }

/* ── interruttori ── */
.acc-switch { display: flex; align-items: center; gap: 14px; padding: 15px 2px; border-bottom: 1px solid var(--hair-2, rgba(20,18,28,.05)); }
.acc-switch .acc-tx { flex: 1; min-width: 0; }
.acc-switch .acc-tx b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.acc-switch .acc-tx small { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--ink-3, #8B8799); }
.acc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.acc-knob { width: 50px; height: 30px; flex: none; border-radius: 999px; background: rgba(20,18,28,.18); position: relative; cursor: pointer; transition: background .22s; }
.acc-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(20,18,40,.3); transition: transform .22s; }
.acc-switch input:checked + .acc-knob { background: var(--tw, #1BB8D0); }
.acc-switch input:checked + .acc-knob::after { transform: translateX(20px); }
.acc-switch input:focus-visible + .acc-knob { box-shadow: 0 0 0 3px rgba(27,184,208,.35); }

/* ── bottoni ── */
.acc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; background: var(--ink, #15131F); color: #fff;
  font: inherit; font-size: 16.5px; font-weight: 800; padding: 16px 24px; cursor: pointer;
}
.acc-btn:hover { background: #000; color: #fff; }
.acc-btn[disabled] { opacity: .38; cursor: not-allowed; }
.acc-btn.tw { background: var(--tw, #1BB8D0); color: #06303a; }
.acc-btn.tw:hover { background: var(--tw-2, #0F90A8); color: #fff; }
.acc-btn.wide { width: 100%; }
.acc-btn.ghost { background: transparent; color: var(--ink, #15131F); border: 1px solid var(--hair, rgba(20,18,28,.10)); }
.acc-btn.ghost:hover { background: var(--hair-2, rgba(20,18,28,.05)); color: var(--ink, #15131F); }
.acc-link { font-weight: 700; color: var(--tw-2, #0F90A8); text-decoration: underline; }

/* ── barra di conferma incollata in fondo ── */
.acc-bar {
  position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  margin: 26px calc(var(--cpad, 18px) * -1) 0; padding: 12px var(--cpad, 18px) calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--hair, rgba(20,18,28,.10));
}
.acc-bar .acc-btn { flex: 0 0 auto; margin-left: auto; }

/* ── fisarmonica ── */
.acc-acc { border-bottom: 1px solid var(--hair, rgba(20,18,28,.10)); }
.acc-acc summary {
  display: flex; align-items: center; gap: 14px; padding: 18px 2px; cursor: pointer;
  font-size: 16px; font-weight: 600; letter-spacing: -.01em; list-style: none;
}
.acc-acc summary::-webkit-details-marker { display: none; }
.acc-acc summary svg { width: 18px; height: 18px; flex: none; margin-left: auto; color: var(--ink-3, #8B8799); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.acc-acc[open] summary svg { transform: rotate(180deg); }
.acc-acc p { margin: 0 0 18px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2, #4A4760); }

/* ── nota legale ── */
.acc-legal { font-size: 13px; line-height: 1.6; color: var(--ink-3, #8B8799); }
.acc-legal a { color: var(--ink-2, #4A4760); text-decoration: underline; }

/* ── avviso ── */
.acc-note {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px;
  background: var(--hair-2, rgba(20,18,28,.05)); margin-bottom: 22px;
}
.acc-note svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; color: var(--tw-2, #0F90A8); }
.acc-note b { display: block; font-size: 15.5px; font-weight: 800; margin-bottom: 3px; }
.acc-note p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2, #4A4760); }

/* ── foglio a tutto schermo (Modifica profilo) ── */
.acc-sheet { position: fixed; inset: 0; z-index: 300; background: #fff; display: none; flex-direction: column; }
.acc-sheet.on { display: flex; }
.acc-sheet-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--hair, rgba(20,18,28,.10)); }
.acc-sheet-h b { flex: 1; text-align: center; font-size: 17px; font-weight: 800; }
.acc-sheet-b { flex: 1; overflow-y: auto; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }

/* ── messaggio in una nuvoletta (Assistenza) ── */
.acc-chat { display: grid; gap: 10px; padding: 18px 0; }
.acc-msg { max-width: 84%; padding: 14px 16px; border-radius: 18px; font-size: 15.5px; line-height: 1.5; }
.acc-msg.bot { background: var(--hair-2, rgba(20,18,28,.05)); color: var(--ink, #15131F); border-bottom-left-radius: 6px; }
.acc-msg.me { justify-self: end; background: var(--tw, #1BB8D0); color: #06303a; border-bottom-right-radius: 6px; font-weight: 600; }
.acc-when { font-size: 12.5px; font-weight: 700; color: var(--ink-3, #8B8799); text-align: center; margin: 6px 0; }

/* ── conferma volante ── */
/* Ancorata ai due lati e centrata col margine automatico: con "left:50%"
   la larghezza disponibile era metà schermo e i messaggi si spezzavano. */
.acc-toast {
  position: fixed; left: 18px; right: 18px; margin: 0 auto; width: fit-content; max-width: calc(100% - 36px);
  bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateY(14px);
  z-index: 400; background: var(--ink, #15131F); color: #fff; font-size: 14.5px; font-weight: 700;
  padding: 13px 20px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .24s, transform .24s;
  text-align: center;
}
.acc-toast.on { opacity: 1; transform: translateY(0); }

/* ── vuoto ── */
.acc-empty { padding: 26px 0; font-size: 15.5px; font-weight: 600; line-height: 1.5; color: var(--ink-3, #8B8799); }

@media (min-width: 760px) {
  .acc-wrap { padding: 0 24px; }
  .acc-h1 { font-size: 38px; }
  .acc-bar { position: static; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--hair, rgba(20,18,28,.10)); }
}

@media (prefers-reduced-motion: reduce) {
  .acc-knob, .acc-knob::after, .acc-acc summary svg, .acc-toast { transition: none; }
}
