/* Stile comune del sito clienti Amadio Carni.
   Palette presa dal logo: bordeaux del ricciolo + nero della scritta. */

@font-face {
  font-family: "Roboto Condensed";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/roboto-condensed-latin-800-normal.woff2") format("woff2");
}

:root {
  --bg: #f6f3f2;
  --surface: #ffffff;
  --surface-2: #fbf9f8;
  --ink: #1c1416;
  --ink-2: #5d4e52;
  --ink-3: #8a7b7f;
  --line: #e7dedf;
  --line-2: #d8cccd;
  --brand: #9c0e2e;
  --brand-dark: #740a22;
  --brand-tint: #f7e8eb;
  --ok: #23734a;
  --ok-tint: #e5f2ea;
  --warn: #9a5b00;
  --warn-tint: #fbf0dc;
  --info: #1f5f8b;
  --info-tint: #e4eff7;
  --display: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 14px;
  --r-sm: 10px;
  --shadow-pop: 0 20px 60px rgba(28, 20, 22, 0.22), 0 2px 8px rgba(28, 20, 22, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--brand);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: var(--line-2); color: var(--ink-3); cursor: default; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.92rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Campi */
.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: 0.92rem; }
.field small { color: var(--ink-3); font-size: 0.82rem; }
.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  font-size: 1rem;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.input.err { border-color: #c0392b; }

/* Stati ordine */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-nuovo { background: var(--info-tint); color: var(--info); }
.st-preparazione { background: var(--warn-tint); color: var(--warn); }
.st-pronto { background: var(--ok-tint); color: var(--ok); }
.st-ritirato { background: #eeeaea; color: var(--ink-2); }
.st-annullato { background: #f3e3e3; color: #9b2c2c; }

.notice {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
}
.notice.err { background: #fbeaea; border-color: #eab4b4; color: #8e2020; }
.notice.ok { background: var(--ok-tint); border-color: #b9dcc7; color: var(--ok); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 90;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast { display: flex; align-items: center; gap: 14px; justify-content: center; width: max-content; }
.toast.show:has(button) { pointer-events: auto; }
.toast button { background: none; border: 0; color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 4px 2px; font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
