/* =====================================================================
 * Accessibilita' del menu clienti: pulsante e pannello, piu' le opzioni
 * che il cliente sceglie (testo grande, alto contrasto, carattere
 * leggibile, animazioni ferme). Le scelte restano sul telefono.
 * ===================================================================== */
@font-face { font-family: 'QRT Legibile'; src: url('/qrt/fonts/qrt-legibile-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'QRT Legibile'; src: url('/qrt/fonts/qrt-legibile-700.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }

/* sempre: focus visibile per chi naviga con tastiera o comandi vocali */
.qrt-root :focus-visible, .rc-a11y :focus-visible { outline: 3px solid #1a56db !important; outline-offset: 2px !important; }
.rc-skip { position: absolute; left: 8px; top: -60px; z-index: 2147483647; background: #141110; color: #fff; padding: 10px 14px; border-radius: 10px; font: 600 15px system-ui, sans-serif; text-decoration: none; }
.rc-skip:focus { top: 8px; }

/* testi della copertina e del piede sempre leggibili */
.qrt-footer__cover, .qrt-footer__text, .qrt-footer__hours, .qrt-footer__brand { opacity: 1 !important; color: var(--qrt-muted) !important; }

/* pulsante */
.rc-a11y-btn { position: fixed; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 2147483000; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: #1a56db; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.28); display: grid; place-items: center; cursor: pointer; }
.rc-a11y-btn svg { width: 26px; height: 26px; }

/* pannello */
.rc-a11y { position: fixed; inset: 0; z-index: 2147483600; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.45); }
.rc-a11y[hidden] { display: none; }
.rc-a11y__box { width: min(480px, 100%); max-height: 88dvh; overflow: auto; background: #fff; color: #141110; border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
.rc-a11y__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rc-a11y__head h2 { font-size: 20px; margin: 0; }
.rc-a11y__close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #f1efec; font-size: 22px; cursor: pointer; color: #141110; }
.rc-a11y__intro { margin: 0 0 12px; color: #44403c; font-size: 14px; }
.rc-a11y__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #ece8e3; }
.rc-a11y__row b { display: block; font-size: 16px; }
.rc-a11y__row small { display: block; color: #57534e; font-size: 13px; }
.rc-a11y__sizes { display: flex; gap: 6px; }
.rc-a11y__sizes button, .rc-a11y__toggle { min-width: 48px; min-height: 44px; border-radius: 12px; border: 2px solid #d6d3d1; background: #fff; color: #141110; font-weight: 700; cursor: pointer; }
.rc-a11y__sizes button[aria-pressed="true"], .rc-a11y__toggle[aria-pressed="true"] { background: #1a56db; border-color: #1a56db; color: #fff; }
.rc-a11y__toggle { padding: 0 14px; }
.rc-a11y__reset { width: 100%; margin-top: 10px; min-height: 44px; border-radius: 12px; border: 2px solid #d6d3d1; background: #fff; font-weight: 600; cursor: pointer; color: #141110; }
.rc-a11y__link { display: block; text-align: center; margin-top: 10px; color: #1a56db; font-size: 14px; }
.rc-speaking { outline: 4px solid #1a56db !important; outline-offset: 2px; }

/* ---------- opzioni del cliente ---------- */
/* testo grande: tutto il menu ingrandito, senza scorrere di lato */
html[data-a11y-size="1"] { zoom: 1.15; }
html[data-a11y-size="2"] { zoom: 1.3; }
html[data-a11y-size="3"] { zoom: 1.5; }
/* a pagina ingrandita i nomi lunghi vanno a capo invece di spingere fuori il prezzo */
html[data-a11y-size] .qrt-item__name, html[data-a11y-font] .qrt-item__name { overflow-wrap: anywhere; min-width: 0; }
html[data-a11y-size] .qrt-item__row, html[data-a11y-font] .qrt-item__row { flex-wrap: wrap; row-gap: 2px; }
/* pulsante e pannello restano della misura normale: ingranditi coprivano filtri e piatti */
html[data-a11y-size="1"] .rc-a11y-btn, html[data-a11y-size="1"] .rc-a11y { zoom: .8696; }
html[data-a11y-size="2"] .rc-a11y-btn, html[data-a11y-size="2"] .rc-a11y { zoom: .7692; }
html[data-a11y-size="3"] .rc-a11y-btn, html[data-a11y-size="3"] .rc-a11y { zoom: .6667; }
/* scheda del piatto: quantita' e "Aggiungi" vanno a capo invece di uscire dallo schermo */
html[data-a11y-size] .qrt-qty-row, html[data-a11y-font] .qrt-qty-row { flex-wrap: wrap; }
html[data-a11y-size] .qrt-add-btn, html[data-a11y-font] .qrt-add-btn { min-width: 0; flex-basis: 60%; white-space: normal; }
/* l'ultimo piatto puo' salire sopra il pulsante blu */
.qrt-items { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.qrt-has-cart-bar .qrt-items { padding-bottom: calc(146px + env(safe-area-inset-bottom)); }

/* copertina: la pillola del tavolo va a capo invece di finire sotto IT/EN */
.qrt-root[data-cover="1"] .qrt-header__pill { max-width: calc(100% - 140px); white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }

/* con una scheda aperta il pulsante blu si nasconde (copriva note e quantita') */
html.rc-overlay .rc-a11y-btn { display: none; }

/* alto contrasto: nero su bianco, bordi netti, niente testi sbiaditi */
html[data-a11y-contrast] .qrt-root {
  --qrt-bg: #ffffff !important; --qrt-surface: #ffffff !important; --qrt-surface-2: #ffffff !important;
  --qrt-text: #000000 !important; --qrt-muted: #1f1f1f !important; --qrt-border: #000000 !important;
  --qrt-primary: #8a1c00 !important; --qrt-primary-dark: #5c1300 !important; --qrt-on-primary: #ffffff !important;
}
html[data-a11y-contrast] body, html[data-a11y-contrast] .qrt-root { background: #fff !important; color: #000 !important; }
html[data-a11y-contrast] .qrt-root * { text-shadow: none !important; opacity: 1 !important; }
html[data-a11y-contrast] .qrt-item, html[data-a11y-contrast] .qrt-tag, html[data-a11y-contrast] .qrt-modal { border: 2px solid #000 !important; box-shadow: none !important; }
html[data-a11y-contrast] .qrt-tag { background: #fff !important; color: #000 !important; }
html[data-a11y-contrast] .qrt-root img { filter: none !important; }
html[data-a11y-contrast] .rc-legal { opacity: 1 !important; color: #000; }

/* carattere leggibile (dislessia, ipovisione) */
html[data-a11y-font] .qrt-root, html[data-a11y-font] .qrt-root * {
  font-family: 'QRT Legibile', Verdana, Tahoma, sans-serif !important; letter-spacing: .02em !important; word-spacing: .08em !important;
}
html[data-a11y-font] .qrt-item__description, html[data-a11y-font] .qrt-modal__description { line-height: 1.6 !important; }

/* animazioni ferme (anche quando lo chiede il telefono) */
html[data-a11y-motion] *, html[data-a11y-motion] *::before, html[data-a11y-motion] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  .qrt-root *, .qrt-root *::before, .qrt-root *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- assistente vocale (voce.js) ---------- */
html.rc-voce-open, html.rc-voce-open body { overflow: hidden; }
html.rc-voce-open .rc-a11y-btn { display: none; }
html[data-a11y-size="1"] .rc-voce { zoom: .8696; }
html[data-a11y-size="2"] .rc-voce { zoom: .7692; }
html[data-a11y-size="3"] .rc-voce { zoom: .6667; }
.rc-voce { position: fixed; inset: 0; z-index: 2147483640; background: #0b0b0c; color: #fff; display: flex; flex-direction: column; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(14px + env(safe-area-inset-bottom)); font: 18px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; overflow: auto; }
.rc-voce[hidden] { display: none; }
.rc-voce__top { display: flex; align-items: center; justify-content: space-between; }
.rc-voce__top h2 { margin: 0; font-size: 20px; }
.rc-voce__close { width: 52px; height: 52px; border-radius: 50%; border: 2px solid #fff; background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.rc-voce__talk { flex: 1 1 auto; min-height: 220px; border-radius: 28px; border: 3px solid #3b82f6; background: #111827; color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; cursor: pointer; font: inherit; padding: 20px; }
.rc-voce__mic { width: 120px; height: 120px; border-radius: 50%; background: #1a56db; display: grid; place-items: center; transition: transform .2s; }
.rc-voce__mic svg { width: 64px; height: 64px; }
.rc-voce__status { margin: 0; font-size: 24px; font-weight: 700; text-align: center; }
.rc-voce[data-state="listening"] .rc-voce__talk { border-color: #22c55e; }
.rc-voce[data-state="listening"] .rc-voce__mic { background: #16a34a; animation: rc-voce-pulse 1.2s ease-in-out infinite; }
.rc-voce[data-state="speaking"] .rc-voce__mic { background: #7c3aed; }
@keyframes rc-voce-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 50% { transform: scale(1.06); box-shadow: 0 0 0 18px rgba(34,197,94,0); } }
.rc-voce__heard { margin: 0; color: #d1d5db; font-size: 17px; min-height: 1.4em; }
.rc-voce__reply { margin: 0; font-size: 21px; font-weight: 600; }
.rc-voce__cart { margin: 0; font-size: 16px; color: #fde68a; }
.rc-voce__cart:empty, .rc-voce__heard:empty { display: none; }
.rc-voce__form { display: flex; gap: 8px; }
.rc-voce__input { flex: 1; min-width: 0; min-height: 52px; border-radius: 14px; border: 2px solid #9ca3af; background: #fff; color: #000; font-size: 18px; padding: 0 14px; }
.rc-voce__send { min-height: 52px; padding: 0 18px; border-radius: 14px; border: 0; background: #1a56db; color: #fff; font-weight: 700; font-size: 17px; cursor: pointer; }
.rc-voce :focus-visible { outline: 3px solid #fbbf24 !important; outline-offset: 3px !important; }

/* voce in cima al pannello accessibilita' */
.rc-a11y__voice { display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 10px; min-height: 64px; padding: 10px 14px; border: 0; border-radius: 16px;
  background: #1a56db; color: #fff; font: 700 17px/1.25 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; text-align: left; cursor: pointer; }
.rc-a11y__voice svg { width: 30px; height: 30px; flex: 0 0 auto; }
.rc-a11y__voice small { display: block; font-weight: 500; font-size: 13px; opacity: .92; }
.rc-skip--voce:focus { top: 56px; }
.rc-voce__debug { margin: 0; font-size: 13px; color: #fca5a5; }
.rc-voce__debug:empty { display: none; }
.rc-voce__talk { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rc-voce__perm { background: #fef3c7; color: #111; border-radius: 16px; padding: 14px; font-size: 17px; }
.rc-voce__perm[hidden] { display: none; }
.rc-voce__perm p { margin: 0 0 10px; }
.rc-voce__allow { width: 100%; min-height: 52px; border: 0; border-radius: 12px; background: #1a56db; color: #fff; font-weight: 700; font-size: 18px; cursor: pointer; }
