/* =====================================================================
   MiesApp — BASE
   Reset y elementos sueltos (html, body, tipografía base, inputs por
   defecto, keyframes globales). Nada de componentes ni de layout.
   ===================================================================== */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  font-size: 16px;
  /* El documento ya NO scrollea: queda fijo al alto del viewport. Así no hay
     rebote posible, porque no hay nada que "estire". */
  height: 100%;
  overflow: hidden;
  overscroll-behavior-y: none;
}

/* ---- Tipografía de bloque ---- */
h1 { font-size: 22px; font-weight: 600; margin: 2px 0 14px; }
h2 { font-size: 17px; font-weight: 600; margin: 0; }
.q  { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.qs { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.mini   { font-size: 12.5px; color: var(--muted); }
.stitle { font-size: 13px; font-weight: 600; color: var(--sec); margin: 0 0 2px; }

/* ---- Inputs por defecto ---- (el estilo de formulario "rico" vive en
   componentes; esto es el reset base de los campos) */
input, select, textarea {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border2);
  border-radius: var(--rad);
  padding: 0 14px;
  font-size: 16px;               /* 16px o menos evita el zoom de iOS al enfocar */
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  appearance: none;
}
input:focus, select:focus { border-color: var(--primary); }

/* appearance:none le saca la flecha nativa al select, así que la dibujamos
   nosotros; si no, parece un campo de texto que no se puede tocar. */
select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e80' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
}

/* [hidden] tiene que ganarle a los display de las clases (ej. .chat-msg es
   flex, y sin esto el globito de "escribiendo…" quedaba visible siempre). */
[hidden] { display: none !important; }

/* ---- Keyframes globales ---- */
@keyframes sp      { to { transform: rotate(360deg); } }
@keyframes chatdot { 0%, 60%, 100% { opacity: .28; } 30% { opacity: 1; } }
