/* Admin sidebar navigation. Figma 600:33154. Tokens only — no hex here. */

.admin-shell__sidebar {
  grid-area: sidebar;
  background: var(--wa-color-surface-default);
  border-inline-end: 1px solid var(--wa-color-surface-border);
  overflow-y: auto;
}

.admin-nav__group::part(base) {
  border: 0;
  border-radius: 0;
  border-block-end: 1px solid var(--wa-color-surface-border);
}

.admin-nav__group-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wa-color-text-normal);
}

.admin-nav__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-nav__link {
  display: block;
  padding: 0.4rem 0.5rem 0.4rem 1.75rem;
  color: var(--wa-color-text-normal);
  text-decoration: none;
  font-size: 0.875rem;
}

.admin-nav__link:hover {
  background: var(--wa-color-brand-95);
}

.admin-nav__link[aria-current="page"] {
  background: var(--wa-color-surface-lowered);
  color: var(--wa-color-text-normal);
  font-weight: 600;
}

.admin-nav__event-card {
  padding: 0.875rem 0.75rem;
  border-block-end: 1px solid var(--wa-color-surface-border);
}

.admin-nav__event-form wa-select {
  width: 100%;
}

.admin-nav__event-dates {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--wa-color-text-quiet);
}

.admin-nav__event-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

/* Session role on the selected event. The viewer badge is the visible
   read-only cue (HMS-385); write roles stay neutral. */
.admin-nav__role {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

.admin-nav__role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--wa-color-neutral-border-quiet);
  background: var(--wa-color-neutral-fill-quiet);
  color: var(--wa-color-neutral-on-quiet);
  font-weight: 600;
}

.admin-nav__role-badge--viewer {
  border-color: var(--wa-color-warning-border-normal);
  background: var(--wa-color-warning-fill-quiet);
  color: var(--wa-color-warning-on-quiet);
}

.admin-nav__role-badge--editor {
  border-color: var(--wa-color-brand-border-normal);
  background: var(--wa-color-brand-fill-quiet);
  color: var(--wa-color-brand-on-quiet);
}

.admin-nav__role-badge--manager {
  border-color: var(--wa-color-success-border-normal);
  background: var(--wa-color-success-fill-quiet);
  color: var(--wa-color-success-on-quiet);
}

.admin-nav__role-badge--superadmin {
  border-color: var(--wa-color-danger-border-normal);
  background: var(--wa-color-danger-fill-quiet);
  color: var(--wa-color-danger-on-quiet);
}

/* HMS-1072 — Support Tools renders as a bold parent; its tools indent under
   a vertical line. */
.admin-nav__link--parent { font-weight: var(--wa-font-weight-semibold); }
.admin-nav__link--child {
  margin-left: var(--wa-space-s);
  padding-left: var(--wa-space-s);
  border-left: 1px solid var(--wa-color-surface-border);
}

/* HMS-2002 — the switcher carries its loading state inside the control so the
   card does not grow and push the role badge down. Both icon layers occupy the
   same fixed box; switching visibility never changes layout, and disabling the
   open/close rotation transition removes the visible arrow flicker. */
.admin-nav__event-select {
  /* Selection submits immediately; the menu must not linger through a hide
     animation while the old page is being blocked. */
  --hide-duration: 0ms;
}

.admin-nav__event-select::part(display-input) {
  flex: 1 1 auto;
  min-width: 0;
  text-overflow: ellipsis;
}

.admin-nav__event-select::part(expand-icon) {
  transition: none;
}

.admin-nav__event-form wa-option::part(label) {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-nav__event-switch-icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 1rem;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  font-size: 0.75rem;
  line-height: 1;
}

.admin-nav__event-switch-arrow,
.admin-nav__event-switch-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-nav__event-switch-loader {
  visibility: hidden;
  opacity: 0;
}

.admin-nav__event-switch-loader wa-spinner {
  font-size: 0.875rem;
}

.admin-nav__event-form--busy .admin-nav__event-select {
  pointer-events: none;
}

.admin-nav__event-form--busy .admin-nav__event-switch-arrow {
  visibility: hidden;
  opacity: 0;
}

.admin-nav__event-form--busy .admin-nav__event-switch-loader {
  visibility: visible;
  opacity: 1;
}

/* visibility, not display: the empty line keeps its height, so the role badge
   stays exactly where it was until the new event renders. */
.admin-nav__event-dates--switching {
  visibility: hidden;
}
