/* ═══════════════════════════════════════════════════════════════════════
   ClicFood — Fallback para navegadores antiguos (compatibilidad)

   ¿Por qué existe?
   La app usa Tailwind CSS v4, que genera CSS moderno (reglas dentro de
   @layer, colores oklch(), color-mix() y @property). Los navegadores que no
   soportan @layer/oklch (Chrome/Edge < 111, Firefox < 113, Safari < 15.4 o
   WebViews viejos de Android) descartan la hoja de estilos COMPLETA y la
   página se ve como texto plano sin estilos.

   ¿Cómo funciona?
   Todo este archivo está envuelto en `@supports not (color: oklch(0 0 0))`:
   - Navegadores modernos (soportan oklch) → el bloque se IGNORA y se usa
     el CSS normal de Tailwind v4. Cero impacto visual.
   - Navegadores antiguos (no soportan oklch) → se aplican estos estilos
     básicos de solo elementos HTML (sin variables CSS, sin oklch, sin
     @layer), dejando la página legible y usable.

   Regla: este archivo NO debe usar features modernas de CSS (solo
   selectores de elementos, colores hex, unidades px).
   ═══════════════════════════════════════════════════════════════════════ */

@supports not (color: oklch(0 0 0)) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

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

  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
    background-color: #fafafa;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  a {
    color: #dc2626;
  }

  a:hover {
    text-decoration: none;
  }

  h1,
  h2,
  h3,
  h4 {
    color: #111827;
    line-height: 1.25;
    margin: 0.5em 0;
  }

  p {
    margin: 0.5em 0;
  }

  ul,
  ol {
    padding-left: 1.5em;
  }

  /* ── Layout básico ─────────────────────────────────────────────── */
  main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
  }

  section {
    margin: 32px 0;
  }

  nav {
    display: block;
    padding: 12px 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
  }

  nav a {
    margin-right: 14px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
  }

  nav a:hover {
    color: #dc2626;
  }

  /* Los grids de Tailwind caen a bloque apilado (legible) */
  [class*="grid"] {
    display: block;
  }

  [class*="grid"] > * {
    margin-bottom: 16px;
  }

  /* ── Botones / CTAs ────────────────────────────────────────────── */
  button {
    display: inline-block;
    padding: 10px 18px;
    margin: 4px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background-color: #dc2626;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
  }

  button:hover {
    background-color: #b91c1c;
  }

  /* ── Formularios ───────────────────────────────────────────────── */
  input,
  select,
  textarea {
    width: 100%;
    padding: 10px 12px;
    margin: 4px 0 14px;
    font-family: inherit;
    font-size: 15px;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
  }

  label {
    font-weight: 600;
  }

  /* ── Tablas ────────────────────────────────────────────────────── */
  table {
    width: 100%;
    border-collapse: collapse;
  }

  th,
  td {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
  }

  th {
    background-color: #f3f4f6;
    font-weight: 700;
  }

  /* ── Tarjetas genéricas ────────────────────────────────────────── */
  [class*="card"] {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
  }

  /* ── Badges ────────────────────────────────────────────────────── */
  [class*="badge"] {
    display: inline-block;
    padding: 2px 10px;
    margin: 2px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background-color: #f3f4f6;
    color: #374151;
  }

  /* ── Esqueletos de carga ───────────────────────────────────────── */
  [class*="skeleton"] {
    background-color: #e5e7eb;
    border-radius: 8px;
  }

  /* ── Misc ──────────────────────────────────────────────────────── */
  hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
  }

  code {
    background-color: #f3f4f6;
    padding: 2px 6px;
    border-radius: 6px;
  }
}
