/* FotoMuro — estilos base compartidos (look moderno y limpio).
   Las reglas responsive globales viven aquí (anti-zoom iOS, safe-area,
   touch targets, overflow). Cada CSS específico hereda y refina. */

:root {
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --ink: #1e1b2e;
  --muted: #6b7280;
  --line: #e9e7f3;
  --card-bg: #ffffff;
  --radius: 22px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 18px 40px -16px rgba(40, 24, 90, .28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  /* En móviles algunos overflows accidentales hacen aparecer scrollbar
     horizontal y zoom out. Lo bloqueamos a nivel raíz. */
  overflow-x: hidden;
}

html {
  /* Soporte de safe-area (iPhones con notch / Dynamic Island). */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 12% 0%, #eef2ff 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 100%, #fdf2f8 0%, transparent 55%),
    linear-gradient(160deg, #f6f5ff 0%, #fff7f3 100%);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Reglas anti-zoom de iOS: en inputs/textareas con font-size < 16px Safari
   hace zoom al enfocar, descuadra el viewport, e impide cerrar el teclado.
   Cualquier formulario del proyecto hereda este mínimo. */
input, textarea, select {
  font-size: 16px;
}

/* Touch targets accesibles (Apple HIG / Material): 44×44 lógico mínimo.
   Botones tipo "chip" y pills lo override para mantener look compacto, pero
   los CTA principales heredan tamaño adecuado al dedo. */
button, [role="button"], a.btn {
  min-height: 44px;
  touch-action: manipulation; /* elimina delay de 300ms de double-tap */
}
/* No queremos que los pills/chips queden gigantes — mantienen tamaño visual
   pero conservan touch-action. */
.chip, .pill, .live-pill, .seg-btn, .si-del, .rg-add, .rg-reuse,
.btn-line.xs, .opt-row button, button[data-act], button.accent-dot {
  min-height: 0;
}

/* Imágenes y media nunca rompen el ancho del contenedor. */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }

h1, h2, h3 { line-height: 1.18; letter-spacing: -.02em; font-weight: 800; }

/* --- botones --- */
.btn {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 22px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn.ghost {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn.subtle {
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: var(--accent);
}
.btn.block { width: 100%; }
.btn.lg { padding: 17px 26px; font-size: 1.06rem; }

/* --- inputs --- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: .85rem; font-weight: 700; color: var(--muted); }
input[type=text], input[type=date] {
  font-family: var(--font);
  font-size: 1rem;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input[type=text]:focus, input[type=date]:focus {
  outline: none;
  border-color: var(--accent);
}

/* --- tarjeta --- */
.panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .7);
}

/* --- chips / etiquetas --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .76rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.chip.on  { background: #dcfce7; color: #15803d; }
.chip.off { background: #f1f0f6; color: #6b7280; }
.chip.accent { background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); }

/* --- spinner --- */
.spinner {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--accent) 22%, #fff);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.kicker {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
