/* Estilos base compartidos por todas las páginas.
   Mobile first. Cada restaurante pisa estas variables con su tema (restaurants.theme). */

:root {
  --color-bg: #faf7f2;
  --color-surface: #ffffff;
  --color-text: #1f1a17;
  --color-muted: #5c534b;
  --color-border: #8a8078;  /* 3:1 sobre el fondo: bordes de campos y botones visibles */
  --color-primary: #c8261b;
  --color-ok: #1f7a3a;
  --color-warn: #a86a00;
  --color-error: #b3261e;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-body);

  --radius: 12px;
  --tap: 44px; /* tamaño mínimo de botones y zonas tocables */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

img, svg { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }
button { min-height: var(--tap); min-width: var(--tap); cursor: pointer; }

:focus-visible { outline: 3px solid var(--color-focus, var(--color-primary)); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Botones y formularios compartidos ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: var(--tap);
  padding: 0 20px; border: 0; border-radius: var(--radius); font-weight: 700; text-decoration: none;
  background: var(--color-primary); color: var(--color-on-primary, #fff); cursor: pointer;
}
.boton:disabled { opacity: .6; cursor: progress; }
.boton-ancho { display: flex; width: 100%; min-height: 52px; font-size: 1.125rem; }
.boton-secundario { background: var(--color-surface); color: var(--color-text); border: 2px solid var(--color-border); }

.campo { display: grid; gap: 6px; margin-bottom: 14px; }
.campo label { font-weight: 700; }
.campo input, .campo textarea, .campo select {
  width: 100%; min-height: var(--tap); padding: 10px 12px;
  border: 2px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-surface); color: var(--color-text);
}
.campo textarea { resize: vertical; }
.campo [aria-invalid="true"] { border-color: var(--color-error); }
.error-form { color: var(--color-error); font-weight: 700; margin: 0 0 12px; }
.error-form:empty { display: none; }

.container { width: 100%; max-width: 40rem; margin: 0 auto; padding: 1.5rem 1rem; }

.muted { color: var(--color-muted); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
