/* =========================================================
   AJUSTES GLOBAIS DE LEGIBILIDADE — Escola de Eletroterapia
   ---------------------------------------------------------
   Vale nos dois temas (claro e escuro). Carregado por
   includes/tema_boot.php (out/2026).
   ========================================================= */

/* ---------- Tamanho mínimo de texto ----------
   As páginas usam muitos textos de 7 a 10px (selos, rótulos, legendas).
   Sem mexer em cada arquivo: 7–9px viram 10px e 10px vira 11px.
   No celular (< 640px) nenhuma variante responsiva (sm:, md:...) está ativa,
   então a regra vale sempre. Em telas maiores, ela só vale quando o elemento
   não tem um tamanho responsivo próprio (para não brigar com "md:text-xs" etc.). */
@media (max-width: 639.98px) {
    html :is(.text-\[7px\], .text-\[8px\], .text-\[9px\]) { font-size: 10px; }
    html .text-\[10px\] { font-size: 11px; }
}
@media (min-width: 640px) {
    html :is(.text-\[7px\], .text-\[8px\], .text-\[9px\]):not([class*="sm:text-"]):not([class*="md:text-"]):not([class*="lg:text-"]) { font-size: 10px; }
    html .text-\[10px\]:not([class*="sm:text-"]):not([class*="md:text-"]):not([class*="lg:text-"]) { font-size: 11px; }
}

/* ---------- Campos de formulário no celular ----------
   Com o zoom liberado, o Safari do iPhone aproxima a tela sozinho ao tocar
   em campos com fonte menor que 16px. Com 16px isso não acontece. */
@media (max-width: 767.98px) {
    html :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]), select, textarea) {
        font-size: 16px;
    }
}

/* ---------- Cantos arredondados (escala única) ----------
   Escala do app: rounded-lg (8px) selos e chips · rounded-xl (12px) botões e campos ·
   rounded-2xl (16px) cartões · rounded-3xl (24px) painéis grandes e modais.
   Os valores avulsos maiores que 24px (28, 32, 40px) passam a seguir o teto da escala. */
html :is(.rounded-\[32px\], .rounded-\[40px\]) { border-radius: 1.5rem; }
html .rounded-\[28px\] { border-radius: 1.25rem; }
html .rounded-t-\[32px\] { border-top-left-radius: 1.5rem; border-top-right-radius: 1.5rem; }
@media (min-width: 640px) { html .sm\:rounded-\[32px\] { border-radius: 1.5rem; } }
@media (min-width: 768px) { html .md\:rounded-\[32px\] { border-radius: 1.5rem; } }
/* Botões sólidos: sempre 12px (havia botões com 16px e 24px lado a lado) */
html :is(button, a):is(.bg-brand-accent, .bg-emerald-600, .bg-blue-600, .bg-red-600, .btn-glow).rounded-2xl { border-radius: 0.75rem; }

/* ---------- Movimento ----------
   Quem ativou "reduzir movimento" no celular/computador não vê animações em loop. */
@media (prefers-reduced-motion: reduce) {
    html .animate-pulse, html .animate-ping, html .animate-bounce,
    html .animate-pulse-slow, html .animate-bounceSlow { animation: none; }
}
