/* Back-office topbar: text size switch and avatar (D-096). */

/* Three sizes side by side; the pressed one is filled. Sizes use px so the
   buttons themselves do not jump when the page scale changes. */
.fontseg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.fontseg button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  line-height: 1;
}
.fontseg button:hover {
  background: var(--bg);
  color: var(--ink);
}
.fontseg .fs-0 span {
  font-size: 13px;
}
.fontseg .fs-1 span {
  font-size: 16px;
}
.fontseg .fs-2 span {
  font-size: 20px;
}
.fontseg button[aria-pressed="true"] {
  background: #102a43;
  color: #fff;
}
html[data-theme="dark"] .fontseg button[aria-pressed="true"] {
  background: var(--gold);
  color: #102a43;
}

/* Avatar: ring in the four logo colours, photo or drawn figure inside. */
.tb-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  isolation: isolate;
}
.tb-avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #3fd3a6, #2557a8, #d93a26, #f6ae3c, #3fd3a6);
  transition: transform 0.6s ease;
}
a.tb-avatar:hover::before {
  transform: rotate(180deg);
}
.tb-avatar-in {
  display: grid;
  place-items: end center;
  width: calc(100% - 5px);
  height: calc(100% - 5px);
  border-radius: 50%;
  border: 2px solid var(--paper);
  background:
    radial-gradient(circle at 30% 25%, rgb(255 255 255 / 0.22), transparent 55%),
    linear-gradient(150deg, #2f63b0, #102a43 75%);
  color: rgb(255 255 255 / 0.94);
  overflow: hidden;
}
.tb-avatar-in img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tb-avatar-in svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: translateY(6%);
}
@media (max-width: 760px) {
  .fontseg button {
    width: 32px;
  }
}
/* Seven controls share a 375px bar since the guide button (D-097): keep 44px tap height. */
@media (max-width: 420px) {
  .topbar .toolbar {
    gap: 4px;
  }
  .fontseg button {
    width: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tb-avatar::before {
    transition: none;
  }
}
