/* ═══════════════════════════════════════════════════════════════════
   voz.css — «Reportar con tu voz» (portal de residentes, voz.js)

   Lo de la maqueta aprobada (docs/maquetas-2026-10/res-voz.css), con los
   colores y medidas del portal (residente.css): --accent, --surface,
   --border, --text-2…
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Paso 1: la entrada por voz, del ancho de los mosaicos ─── */
.voz-tile {
  flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px;
  width: 100%; min-height: 88px; margin-bottom: 14px;
  border-color: var(--accent-line); background: var(--accent-dim);
}
.voz-tile .voz-mic {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--tinte-canto); background: var(--tinte); box-shadow: var(--tinte-sombra); flex-shrink: 0;
}
.voz-tile .voz-mic svg { font-size: 22px; color: var(--tinte-texto); margin: 0; }
.voz-tile .voz-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.voz-tile .voz-texto small { font-size: 13px; }

.voz-o { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 13px; color: var(--text-2); }
.voz-o::before, .voz-o::after { content: ''; flex: 1; height: 1px; background: var(--border-2); }

/* ─── La vista: un estado a la vez (data-estado: grabando | escribiendo | fallo) ─── */
.voz-vista [data-solo] { display: none; }
.voz-vista[data-estado="grabando"] [data-solo="grabando"],
.voz-vista[data-estado="escribiendo"] [data-solo="escribiendo"],
.voz-vista[data-estado="fallo"] [data-solo="fallo"] { display: flex; }

.voz-vista .voz-centro { flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.voz-vista .voz-pie { flex-direction: column; align-items: center; gap: 12px; }

.voz-ondas { display: flex; align-items: center; justify-content: center; gap: 4px; height: 96px; width: 100%; }
.voz-ondas span { width: 5px; height: 8px; border-radius: 3px; background: var(--accent); opacity: 0.9; transition: height 0.08s linear; }

.voz-tiempo { font-family: var(--mono); font-size: 34px; font-weight: 500; letter-spacing: 1px; color: var(--text); transition: color var(--transition); }
.voz-tiempo small { font-size: 14px; color: var(--text-2); letter-spacing: 0; }
/* Los últimos 10 segundos: el contador avisa que se acaba. */
.voz-tiempo.aviso { color: var(--amber); }
.voz-guia { font-size: 15px; color: var(--text-2); max-width: 280px; line-height: 1.45; }
.voz-guia b { color: var(--text); font-weight: 600; }

/* El botón de terminar: rojo de grabación con su halo. */
.voz-boton {
  width: 76px; height: 76px; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center;
  background: var(--red); color: var(--on-red); box-shadow: 0 0 0 10px var(--red-dim), 0 0 0 20px rgba(248, 113, 113, 0.05);
}
.voz-boton svg { font-size: 26px; fill: currentColor; stroke: none; }
.voz-boton-texto { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--text); }
.voz-privado { font-size: 12.5px; color: var(--text-2); }

/* Escribiendo: el micrófono dentro de un anillo que gira. */
.voz-anillo {
  width: 112px; height: 112px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--surface-3); border-top-color: var(--accent); color: var(--accent);
  animation: voz-gira 1s linear infinite;
}
.voz-anillo svg { font-size: 34px; animation: voz-gira 1s linear infinite reverse; }
@keyframes voz-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .voz-anillo, .voz-anillo svg { animation: none; } }
.voz-centro h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; }
.voz-centro p { font-size: 15px; color: var(--text-2); max-width: 290px; line-height: 1.45; }

/* No se entendió: el mismo círculo, apagado. */
.voz-apagado {
  width: 112px; height: 112px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-2);
}
.voz-apagado svg { font-size: 34px; }

/* Dos botones apilados del mismo alto: el principal y el secundario. */
.voz-vista .voz-pie-botones { align-items: stretch; }
.voz-vista .voz-pie-botones .btn-ghost { width: 100%; min-height: 54px; border-radius: 14px; font-size: 16px; }

/* ─── Paso 2 lleno por la voz ─── */
.voz-resumen {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 9px 9px 9px 14px; margin-bottom: 10px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
}
.voz-resumen-ic { display: flex; color: var(--accent); }
.voz-resumen-ic svg { font-size: 20px; width: 1em; height: 1em; margin: 0; }
.voz-resumen b { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; }
.voz-resumen b span { color: var(--text-2); font-weight: 500; }
.voz-cambiar { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 600; }

.voz-nota { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 13px; color: var(--text-2); }
.voz-nota .ic { font-size: 15px; color: var(--accent); }

.voz-dijiste { margin: -6px 0 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); }
.voz-dijiste summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px;
  font-size: 13px; font-weight: 600; color: var(--text-2); list-style: none; cursor: pointer;
}
.voz-dijiste summary::-webkit-details-marker { display: none; }
.voz-dijiste summary .ic { font-size: 16px; transition: transform var(--transition); }
.voz-dijiste[open] summary .ic { transform: rotate(180deg); }
.voz-dijiste p { padding: 0 14px 14px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); font-style: italic; }

.voz-otra-vez {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 10px;
  border: none; background: none; color: var(--accent); font-size: 14px; font-weight: 600;
}
.voz-otra-vez .ic { font-size: 16px; }
