/* base.css · Fijo para todas las instancias. Los tokens de marca vienen de /tema.css.
   Regla del diseño: los componentes públicos solo usan variables; ningún color de marca fijo acá. */

:root {
  /* Semánticos: NO tematizables. Siempre con ícono + texto. */
  --ok: #2BD46F;      --on-ok: #03130A;
  --danger: #FF4D4F;  --on-danger: #1A0203;
  --warning: #FFC21A; --on-warning: #1A1200;
  --info: #4DA3FF;    --on-info: #021325;

  /* Escala de espaciado y tipografía del design system */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --fs-display-xl: 40px; --fs-display-l: 28px; --fs-display-m: 20px; --fs-body: 16px; --fs-small: 13px; --fs-min: 12px;

  /* Área táctil mínima */
  --tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  line-height: 1.1;
}

h1 { font-size: var(--fs-display-l); }
h2 { font-size: 22px; }
h3 { font-size: var(--fs-display-m); }

a { color: var(--ink); }

img, svg { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 20px;
  border: 0; border-radius: var(--radius-button);
  background: var(--color-primary); color: var(--color-on-primary);
  font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer;
}
.btn-secondary { background: var(--color-secondary); color: var(--color-on-secondary); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--line); font-weight: 700; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }

/* Tarjetas y superficies */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.surface-2 { background: var(--surface-2); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 6px;
  font-size: var(--fs-min); font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.badge-lote { background: var(--color-secondary); color: var(--color-on-secondary); }
.badge-warning { background: var(--warning); color: var(--on-warning); }
.badge-agotado { background: var(--text); color: var(--bg); }
.badge-info { border: 1.5px solid var(--info); color: var(--text); }

/* Alertas semánticas (siempre con ícono + texto en el markup) */
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-base); font-weight: 600; }
.alert-ok { background: var(--ok); color: var(--on-ok); }
.alert-danger { background: var(--danger); color: var(--on-danger); }
.alert-warning { background: var(--warning); color: var(--on-warning); }
.alert-info { background: var(--info); color: var(--on-info); }

/* Estados de butaca */
.seat {
  width: 18px; height: 18px; padding: 0;
  border-radius: 5px 5px 3px 3px; border: 2px solid var(--seat-color, var(--line));
  background: transparent; cursor: pointer;
}
.seat-selected { background: var(--color-primary); border-color: var(--color-primary); }
.seat-occupied { background: var(--seat-occupied); border-color: var(--seat-occupied); cursor: not-allowed; }
.seat-reserved {
  border-style: dashed; border-color: var(--muted); cursor: not-allowed;
  background: repeating-linear-gradient(45deg, var(--muted) 0 2px, transparent 2px 5px);
}

/* Campos */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea {
  min-height: 50px; padding: 0 14px;
  border-radius: var(--radius-base); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 500; font-size: 16px;
}
.field input[aria-invalid="true"] { border: 2px solid var(--danger); }

/* Utilidades */
.muted { color: var(--muted); }
.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tap { min-width: var(--tap); min-height: var(--tap); }

/* Layout público (mobile first, 390 px de referencia) */
.pub-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.pub-header {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.pub-logo { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: .04em; color: var(--text); text-decoration: none; }
.pub-main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; }
.pub-nav {
  position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 68px; background: var(--bg); border-top: 1px solid var(--line);
}
.pub-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none;
}
.pub-nav a[aria-current="page"] { color: var(--ink); font-weight: 800; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }

@media (min-width: 900px) {
  .pub-nav { display: none; }
  h1 { font-size: var(--fs-display-xl); }
}
/* Logo de imagen: alto fijo, ancho según la proporción (los de festival suelen ser casi cuadrados). */
.pub-logo { display: flex; align-items: center; }
.pub-logo-img { display: block; height: 52px; width: auto; max-width: 200px; object-fit: contain; }
@media (min-width: 900px) { .pub-logo-img { height: 64px; max-width: 260px; } }

/* Blazor enfoca el h1 al navegar (FocusOnNavigate): sin anillo, que no es un control. */
h1:focus { outline: none; }
