/* Only the top-level trigger uses the raised navigation treatment. */
.nav-dropdown {
  display: flex;
  min-width: 0;
}
.nav-dropdown-trigger {
  width: 100%;
  gap: 8px;
  font-family: var(--ui-font-body);
  cursor: pointer;
  appearance: none;
}
.navigation .nav-dropdown-trigger[data-current="true"] {
  background: var(--accent);
}
.navigation .nav-dropdown-trigger svg {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: rotate var(--ui-motion) ease-out;
}
.navigation .nav-dropdown-trigger[aria-expanded="true"] svg {
  rotate: 180deg;
}

/* A top-layer popover clears the header's overflow clipping without changing
   its scrollbar-independent geometry or the layout of the content below it. */
.nav-dropdown-menu {
  position: fixed;
  inset: auto;
  width: 264px;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  border: var(--line) solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.nav-dropdown-menu:popover-open {
  animation: nav-dropdown-enter 140ms ease-out;
}
.nav-dropdown-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-dropdown-menu li + li {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--ink);
}
.nav-dropdown-menu :is(a, .nav-dropdown-action) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 14px 12px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-dropdown-menu a[href] {
  padding-block: 10px;
}
.nav-dropdown-action {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}
.profile-logout-confirm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profile-logout-confirm .nav-dropdown-action {
  align-items: center;
}
.profile-logout-confirm .nav-dropdown-action + .nav-dropdown-action {
  border-left: 1px solid var(--ink);
}
.nav-dropdown-action:disabled {
  cursor: wait;
  opacity: .65;
}
.profile-logout-error {
  margin: 0;
  padding: 6px 12px 12px;
  color: #a52a19;
  font-size: 12px;
  line-height: 1.6;
}
.nav-dropdown-label {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.5;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.nav-dropdown-description {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ui-muted);
}
.nav-dropdown-menu a[aria-current="page"] {
  background: var(--accent);
}
.nav-dropdown-menu :is(a, .nav-dropdown-action):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  background: var(--hover);
}
.nav-dropdown-menu :is(a, .nav-dropdown-action):active {
  background: var(--hover);
}
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown-menu :is(a, .nav-dropdown-action):hover {
    background: var(--hover);
  }
}

/* Both steps of signing out share a soft red surface, including at rest. */
:is(#profile-logout, #profile-logout-submit) {
  background: #f1dddd;
  color: #733f3f;
  transition: background-color 140ms ease-out;
}
:is(#profile-logout, #profile-logout-submit):not(:disabled):focus-visible {
  background: #e5bcbc;
}
@media (hover: hover) and (pointer: fine) {
  :is(#profile-logout, #profile-logout-submit):not(:disabled):hover {
    background: #e5bcbc;
  }
}
:is(#profile-logout, #profile-logout-submit):not(:disabled):active {
  background: #dba8a8;
}
@keyframes nav-dropdown-enter {
  from { opacity: 0; translate: 0 -5px; }
  to { opacity: 1; translate: 0 0; }
}

@media (max-width: 767px) {
  .nav-dropdown-trigger { gap: 5px; }
}
@media (max-width: 680px) {
  .nav-dropdown[data-nav-group="events"] { grid-area: events; }
  .nav-dropdown[data-nav-group="partners"] { grid-area: partners; }
  .nav-dropdown[data-nav-group="academy"] { grid-area: academy; }
}
@media (max-width: 380px) {
  .nav-dropdown-trigger { gap: 3px; }
  .navigation .nav-dropdown-trigger svg { width: 10px; height: 10px; flex-basis: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#profile-logout, #profile-logout-submit) { transition: none; }
  .navigation .nav-dropdown-trigger svg { transition: none; }
  .nav-dropdown-menu:popover-open { animation: none; }
}
