/* The yellow rail and its popovers, shared by the shell and the project
   area. Tokens come from tokens.css; the phone rail (one row, 44px targets)
   is set in ac/sidebar.css for the shell and in area.css for the area, at
   the same single breakpoint (the language switcher, here in both, sets its own). */
/* ---- the rail ---- */
.ac-rail {
  flex: none; position: relative; z-index: 20;
  display: flex; align-items: center; gap: 0.75rem;
  min-height: var(--ac-rail-h); padding: 0 1rem 0 1.5rem;
  background: var(--ac-yellow); border-bottom: 2px solid var(--ac-ink);
}

.ac-rail-tools { display: flex; align-items: center; gap: 0.5rem; flex: none; }

/* Popovers on <details>: the doc picker, versions, build details, account. */
.ac-pop { position: relative; }
.ac-pop > summary {
  display: flex; align-items: center; gap: 0.3125rem; min-height: 2.25rem; padding: 0 0.5rem;
  list-style: none; cursor: pointer; border-radius: 4px; user-select: none;
}
.ac-pop > summary::-webkit-details-marker { display: none; }
.ac-pop > summary:hover,
.ac-pop[open] > summary { background: rgba(26, 26, 26, 0.09); }
.ac-pop > summary .ac-chev { flex: none; transition: transform 0.2s var(--ac-ease); }
.ac-pop[open] > summary .ac-chev { transform: rotate(180deg); }
.ac-pop-body {
  position: absolute; left: 0; top: calc(100% + 0.375rem); z-index: 30;
  min-width: 16rem; max-width: min(28rem, calc(100vw - 2rem)); max-height: 70vh; overflow: auto;
  padding: 0.375rem; background: var(--ac-white); color: var(--ac-ink);
  border: 1px solid var(--ac-edge); border-radius: 6px; box-shadow: var(--ac-shadow-popover);
  font: 400 0.875rem/1.4 var(--ac-ui); letter-spacing: 0;
}
.ac-rail-tools .ac-pop-body,
.ac-pop-right { left: auto; right: 0; }
.ac-pop-list { list-style: none; margin: 0; padding: 0; }
.ac-pop-list li { display: flex; flex-direction: column; }
.ac-pop-list a,
.ac-pop-list button {
  display: block; padding: 0.5rem 0.625rem; border-radius: 4px; text-decoration: none; text-align: left;
  font: 500 0.875rem/1.3 var(--ac-ui); color: var(--ac-ink); background: none; border: 0; cursor: pointer; width: 100%;
}
.ac-pop-list a:hover,
.ac-pop-list button:hover { background: var(--ac-ground); }
.ac-pop-list a[aria-current="page"] { font-weight: 700; background: var(--ac-ground); }
.ac-pop-list form { margin: 0; }
.ac-pop-meta { padding: 0 0.625rem 0.375rem; margin-top: -0.25rem; font-size: 0.75rem; color: var(--ac-mute); overflow-wrap: anywhere; }
.ac-pop-note { margin: 0; padding: 0.5rem 0.625rem; color: var(--ac-mute); }
.ac-pop-head { margin: 0.375rem 0 0; padding: 0.25rem 0.625rem; font: 700 0.875rem/1 var(--ac-sign); }
.ac-account > summary.ac-avatar {
  justify-content: center; width: 2.25rem; height: 2.25rem; min-height: 0; padding: 0;
  border-radius: 50%; background: var(--ac-ink); color: var(--ac-yellow);
  font: 700 0.8125rem/1 var(--ac-sign); letter-spacing: 0.04em;
}
.ac-account > summary.ac-avatar:hover,
.ac-account[open] > summary.ac-avatar { background: var(--ac-ink-raised); }
.ac-narrow-only { display: none; }

/* The language switcher: each language names itself; the current one is pressed. */
.ac-lang { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.ac-lang-options { display: flex; gap: 0.125rem; }
.ac-lang button {
  display: inline-flex; align-items: center; min-height: 2rem; padding: 0 0.5rem; border: 0; border-radius: 4px;
  background: none; color: var(--ac-ink); cursor: pointer; font: 500 0.875rem/1 var(--ac-ui);
}
.ac-lang button[aria-pressed="true"] { font-weight: 700; }
.ac-lang button:focus-visible { outline: 2px solid var(--ac-ink); outline-offset: 2px; }
/* in the account menu: a row under the list, set off by a hairline */
.ac-lang-pop { justify-content: space-between; margin-top: 0.25rem; padding: 0.375rem 0 0 0.625rem; border-top: 1px solid var(--ac-rule); }
.ac-lang-pop .ac-lang-label { color: var(--ac-mute); font-size: 0.8125rem; }
.ac-lang-pop button:hover, .ac-lang-pop button[aria-pressed="true"] { background: var(--ac-ground); }
/* in the signed-out rail: rail links, the current one underlined like the current page */
.ac-lang-rail .ac-lang-label {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.ac-lang-rail button { min-height: 2.25rem; padding: 0 0.625rem; font: 600 1rem/1 var(--ac-sign); letter-spacing: 0.01em; border-radius: 5px; }
.ac-lang-rail button:hover { background: rgba(26, 26, 26, 0.09); }
.ac-lang-rail button[aria-pressed="true"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 47.99rem) {
  .ac-lang button { min-height: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ac-pop > summary .ac-chev { transition: none; }
}
