/* apoie.css — estilos compartilhados + acessibilidade */

html { font-size: 16px; }
html[data-fs="0"] { font-size: 13px; }
html[data-fs="1"] { font-size: 14px; }
html[data-fs="2"] { font-size: 16px; }
html[data-fs="3"] { font-size: 18px; }
html[data-fs="4"] { font-size: 20px; }
html[data-fs="5"] { font-size: 22px; }
html[data-fs="6"] { font-size: 25px; }
html[data-fs="7"] { font-size: 28px; }

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0369a1;
  --accent-hover: #075985;
  --error: #b91c1c;
  --success: #047857;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter','Segoe UI',system-ui,sans-serif;
  min-height: 100vh; line-height: 1.45;
}

nav {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 1rem; display: flex; align-items: center;
  justify-content: space-between; height: 56px;
  position: sticky; top: 0; z-index: 100; gap: .5rem;
}
.nav-brand { font-weight: 700; font-size: 1.05rem; color: var(--accent); letter-spacing: .05em; }
.nav-links  { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.nav-link   { color: var(--muted); text-decoration: none; font-size: .85rem; transition: color .2s; }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); font-weight: 600; }
.nav-link.nav-logout { color: var(--error); }
.nav-user { color: var(--muted); font-size: .78rem; }

/* Toolbar de acessibilidade (A- / A / A+) */
.a11y-toolbar {
  display: inline-flex; align-items: center; gap: .25rem;
  border: 1px solid var(--border); border-radius: 8px; padding: 0 .15rem;
  background: var(--surface2);
}
.a11y-btn {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; padding: .25rem .5rem; font-weight: 600;
  font-family: inherit; border-radius: 6px; line-height: 1;
  min-height: 32px; min-width: 32px;
}
.a11y-btn:hover:not(:disabled) { background: var(--border); color: var(--text); }
.a11y-btn:disabled { opacity: .3; cursor: not-allowed; }

/* Mobile tweaks */
@media (max-width: 560px) {
  nav { padding: 0 .75rem; height: 56px; flex-wrap: nowrap; overflow: visible; }
  .nav-user { display: none; }
  .nav-link { font-size: .85rem; }
  input, select, textarea { font-size: 16px !important; } /* evita zoom no iOS */
  button, .btn, .nav-link { min-height: 44px; }

  /* Toolbar flutua no canto inferior direito — sai do fluxo da nav */
  .a11y-toolbar {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15,23,42,.15);
    padding: .3rem .5rem;
  }
  .a11y-btn { min-height: 40px; min-width: 38px; font-size: .9rem; }
}
