/* Controle "aA" de tamanho do texto (_TextSizeControl + text-size.js), nos três layouts autenticados.
   A escala em si (:root[data-text-size]) fica em theme.css; aqui só o botão e o painel. */
.text-size-control { position: relative; flex: 0 0 auto; }
.text-size-trigger {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px;
  border: 1px solid var(--app-border-strong); border-radius: 10px;
  background: var(--app-surface); color: var(--app-text); cursor: pointer; line-height: 1;
}
.text-size-trigger span { font-size: var(--font-sm); font-weight: 700; letter-spacing: .02em; }
.text-size-trigger b { font-size: var(--font-xl); font-weight: 800; }
.text-size-trigger:hover { background: var(--app-surface-hover); }
.text-size-trigger[aria-expanded="true"] { border-color: var(--focus-ring); color: var(--brand-primary); }
.text-size-trigger:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.text-size-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 80;
  width: min(18rem, calc(100vw - 24px)); padding: 12px;
  border: 1px solid var(--app-border); border-radius: 14px;
  background: var(--app-surface); color: var(--app-text); box-shadow: var(--app-shadow);
}
.text-size-panel[hidden] { display: none; }
/* Sidebar do admin: o botão fica no canto do cabeçalho; o painel ocupa a largura do cabeçalho para não sair da tela. */
.sidebar-header { position: relative; gap: 8px; }
.sidebar-header .text-size-control { position: static; margin-left: auto; }
.sidebar-header .text-size-panel { left: 0; right: 0; width: auto; }
.text-size-panel fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 4px; }
.text-size-panel legend { margin-bottom: 8px; font-size: var(--font-md); font-weight: 750; }
.text-size-option {
  display: grid; grid-template-columns: auto 2rem 1fr auto; align-items: center; gap: 10px;
  min-height: 44px; padding: 6px 10px; border-radius: 10px; cursor: pointer;
  color: var(--app-text-secondary); font-size: var(--font-sm);
}
.text-size-option:hover { background: var(--app-surface-hover); color: var(--app-text); }
.text-size-option:has(input:checked) { background: var(--brand-soft); color: var(--app-text); font-weight: 700; }
.text-size-option:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.text-size-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-fill); }
.text-size-option small { color: var(--app-text-muted); font-size: var(--font-xs); font-weight: 600; }
.text-size-sample { text-align: center; font-weight: 800; line-height: 1; color: var(--app-text); }
.text-size-sample[data-size="normal"] { font-size: var(--font-md); }
.text-size-sample[data-size="large"] { font-size: var(--font-lg); }
.text-size-sample[data-size="larger"] { font-size: var(--font-xl); }
.text-size-sample[data-size="largest"] { font-size: var(--font-3xl); }
.text-size-hint { margin: 10px 2px 0; color: var(--app-text-muted); font-size: var(--font-xs); line-height: 1.45; }
.text-size-status { margin: 6px 2px 0; color: var(--app-text-secondary); font-size: var(--font-xs); }
.text-size-status:empty { display: none; }
