/* Bodia Coach: text size control ("Aa" button + popover). Sizes in rem so the control scales with the text. */
.textsize-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 2.25rem; height: 2rem; padding: 0 0.5rem; border-radius: 999px; border: 1px solid transparent;
  background: transparent; font: inherit; font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.2px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.textsize-btn.on-dark { color: #8e8e93; border-color: #3a3a3c; }
.textsize-btn.on-dark:hover, .textsize-btn.on-dark[aria-expanded="true"] { color: #fff; background: #2c2c2e; }
.textsize-btn.on-light { color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.textsize-btn.on-light:hover, .textsize-btn.on-light[aria-expanded="true"] { background: rgba(255, 255, 255, 0.14); }
.textsize-btn:focus-visible { outline: 2px solid #ffcb45; outline-offset: 2px; }
.side-links .textsize-btn { margin-left: auto; height: 1.75rem; }
.topbar > .textsize-btn { margin-left: auto; }

.textsize-pop {
  position: fixed; z-index: 120; width: 14rem; padding: 0.75rem; border-radius: 14px;
  background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: 0.5px solid rgba(0, 0, 0, 0.08); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); color: #111;
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex; flex-direction: column; gap: 0.625rem;
}
.textsize-title { font-size: 0.75rem; font-weight: 700; color: #6e6e73; text-transform: uppercase; letter-spacing: 0.4px; }
.textsize-row { display: flex; align-items: center; gap: 0.5rem; }
.textsize-step {
  flex: none; width: 2.75rem; height: 2.5rem; border-radius: 10px; border: 0; background: #ececf0; color: #111;
  font: inherit; font-weight: 800; font-size: 0.875rem; cursor: pointer;
}
.textsize-step.big { font-size: 1.125rem; }
.textsize-step:hover:not(:disabled) { background: #e0e0e5; }
.textsize-step:disabled { opacity: 0.35; cursor: default; }
.textsize-value { flex: 1; text-align: center; font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.textsize-reset {
  height: 2rem; border-radius: 999px; border: 0; background: transparent; color: #111; font: inherit; font-weight: 700;
  font-size: 0.8125rem; text-decoration: underline; cursor: pointer;
}
.textsize-reset:disabled { opacity: 0.35; cursor: default; text-decoration: none; }
.textsize-step:focus-visible, .textsize-reset:focus-visible { outline: 2px solid #111; outline-offset: 2px; }

/* Floating "Aa" button: fixed pixels, always in the bottom-right corner. */
.textsize-btn.floating { position: fixed; right: 20px; bottom: 20px; z-index: 110; width: 48px; height: 48px; min-width: 0; padding: 0; font-size: 16px; color: #fff; background: #111; border: 1px solid rgba(255,255,255,.15); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.textsize-btn.floating:hover, .textsize-btn.floating[aria-expanded="true"] { background: #2c2c2e; }
.textsize-pop { width: 224px; padding: 12px; }
@media (max-width: 760px) { .textsize-btn.floating { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); } }
