.nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(75 85 99);
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-link:hover {
  background-color: rgb(243 244 246);
  color: rgb(17 24 39);
}

.nav-link-active {
  background-color: rgb(17 24 39);
  color: white;
}

.nav-link-active:hover {
  background-color: rgb(31 41 55);
  color: white;
}

.dropdown-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: rgb(55 65 81);
  text-decoration: none;
  transition: background-color 150ms ease;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: rgb(249 250 251);
}

.dropdown-item-active {
  background-color: rgb(249 250 251);
  font-weight: 500;
}

.dark .dropdown-item {
  color: rgb(226 232 240);
}

.dark .dropdown-item:hover,
.dark .dropdown-item-active {
  background-color: rgb(51 65 85);
}

.profile-popup-item {
  border-radius: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  transition: background-color 150ms ease, color 150ms ease;
}

.profile-popup-item svg {
  color: rgba(255, 255, 255, 0.5);
  transition: color 150ms ease;
}

.profile-popup-item:hover,
.profile-popup-item:focus-visible,
.dark .profile-popup-item:hover,
.dark .profile-popup-item:focus-visible {
  background-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.profile-popup-item.dropdown-item-active,
.dark .profile-popup-item.dropdown-item-active {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.96);
}

.profile-popup-item:hover svg,
.profile-popup-item:focus-visible svg {
  color: rgba(255, 255, 255, 0.58);
}

.profile-popup-item.dropdown-item-active svg {
  color: rgba(255, 255, 255, 0.72);
}

.profile-popup-item--danger {
  color: rgb(252 165 165);
}

.profile-popup-item--danger:hover,
.profile-popup-item--danger:focus-visible,
.dark .profile-popup-item--danger:hover,
.dark .profile-popup-item--danger:focus-visible {
  background-color: rgba(248, 113, 113, 0.08);
  color: rgb(252 165 165);
}

.profile-popup-item--danger svg {
  color: currentColor;
}

.profile-popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(255, 255, 255, 0.12);
  padding: 0.75rem 1rem;
  color: rgb(255 255 255);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.profile-popup-cta:hover,
.profile-popup-cta:focus-visible {
  background-color: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgb(255 255 255);
}

.profile-popup-cta--secondary {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

.profile-popup-cta--secondary:hover,
.profile-popup-cta--secondary:focus-visible {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgb(255 255 255);
}

.profile-popup-heading {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(255 255 255);
}

.navbar-auth-popup input.profile-popup-field {
  width: 100%;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(255, 255, 255, 0.06);
  padding: 0.75rem 0.95rem;
  color: rgb(255 255 255);
  font-size: 0.92rem;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.navbar-auth-popup input.profile-popup-field::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.navbar-auth-popup input.profile-popup-field:focus,
.navbar-auth-popup input.profile-popup-field:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.92);
  background-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.navbar-auth-popup input.profile-popup-field:-webkit-autofill,
.navbar-auth-popup input.profile-popup-field:-webkit-autofill:hover,
.navbar-auth-popup input.profile-popup-field:-webkit-autofill:focus {
  -webkit-text-fill-color: rgb(255 255 255);
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.06) inset;
  caret-color: rgb(255 255 255);
}

[data-search-dropdown] {
  scroll-margin-block: calc(var(--portal-navbar-offset, 4.625rem) + .5rem)
    calc(var(--pwa-nav-total-height, 0px) + .75rem);
}

[data-search-dropdown-list] {
  max-height: 16rem;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y pinch-zoom;
}

.account-university-dropdown {
  position: relative;
  width: 100%;
}

:where(.pwa-shell-active) .account-university-dropdown {
  margin-top: 0.5rem;
}

:where(.pwa-shell-active) .account-university-dropdown .program-filter-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid rgb(229 229 229);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 0.72rem 3rem 0.72rem 1.1rem;
  color: rgb(23 23 23);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

:where(.pwa-shell-active) .account-university-dropdown .program-filter-trigger:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgb(229 229 229);
}

:where(.pwa-shell-active) .account-university-dropdown .program-filter-trigger:focus,
:where(.pwa-shell-active) .account-university-dropdown .program-filter-trigger:focus-visible,
:where(.pwa-shell-active) .account-university-dropdown.is-open .program-filter-trigger {
  outline: none;
  border-color: rgb(38 38 38);
  box-shadow: 0 0 0 3px rgba(38, 38, 38, 0.12);
}

.account-university-dropdown .program-filter-trigger-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-university-dropdown .program-filter-chevron {
  position: absolute;
  top: 50%;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: rgb(115 115 115);
  pointer-events: none;
  transform: translateY(-50%);
  transition: transform 180ms ease;
}

.account-university-dropdown.is-open .program-filter-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.account-university-dropdown .program-filter-chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}

.account-university-dropdown .program-filter-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  z-index: 40;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.1rem;
  background: rgba(7, 7, 7, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.account-university-dropdown .program-filter-search-shell {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

.account-university-dropdown .program-filter-search-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.account-university-dropdown .program-filter-search-field:focus-within {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.account-university-dropdown .program-search-icon {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
}

:where(.pwa-shell-active) .account-university-dropdown .program-filter-search-input {
  flex: 1 1 auto;
  min-width: 0;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  outline: none;
  text-transform: uppercase;
}

.account-university-dropdown .program-filter-search-input:focus,
.account-university-dropdown .program-filter-search-input:focus-visible,
.account-university-dropdown .program-filter-search-input:active {
  outline: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}

:where(.pwa-shell-active) .account-university-dropdown .program-filter-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.account-university-dropdown .program-search-clear {
  display: inline-flex;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: color 180ms ease, opacity 180ms ease;
}

.account-university-dropdown .program-search-clear svg {
  width: 100%;
  height: 100%;
  display: block;
}

.account-university-dropdown .program-search-clear:hover,
.account-university-dropdown .program-search-clear:focus-visible {
  color: #ffffff;
  outline: none;
  opacity: 0.78;
}

.account-university-dropdown .program-filter-search-results {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  width: 100%;
  min-width: 0;
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 0.1rem;
}

.account-university-dropdown .program-filter-empty {
  padding: 0.95rem 0.9rem;
  border-radius: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

:is(:where(.pwa-shell-active) .account-university-dropdown, .account-signup-university-dropdown) .program-filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2rem;
  overflow: hidden;
  padding: 0.375rem 0.625rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-align: left;
  text-transform: uppercase;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

:where(.pwa-shell-active) .account-university-dropdown .program-filter-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

:where(.pwa-shell-active) .account-university-dropdown .program-filter-option:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

.account-university-dropdown .program-filter-option.is-selected {
  background: rgba(255, 255, 255, 0.13);
}

.account-university-dropdown .program-filter-option-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-university-dropdown .program-filter-check {
  flex: 0 0 auto;
  font-size: 0.95rem;
  line-height: 1;
}

.profile-popup-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.profile-popup-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.77rem;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.profile-popup-checkbox input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: rgb(255 255 255);
}

.profile-popup-link {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 0.77rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  cursor: pointer;
}

.profile-popup-link:hover,
.profile-popup-link:focus-visible {
  color: rgb(255 255 255);
  text-decoration: underline;
}

.profile-popup-copy {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}


.shop-nav-cart-item {
  border-radius: 1rem;
  padding: 0.55rem;
  text-decoration: none;
}

.shop-nav-cart-thumb {
  display: flex;
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.48);
}

.shop-nav-cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-nav-cart-name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  color: rgb(255 255 255);
}

.shop-nav-cart-meta {
  margin: 0.28rem 0 0;
  font-size: 0.74rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.64);
}

.shop-nav-cart-price {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.92);
}

.shop-nav-cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.shop-nav-cart-summary-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.68);
}

.shop-nav-cart-summary-value {
  font-size: 0.95rem;
  color: rgb(255 255 255);
}

#main-nav-menu.nav-menu-enter { transition: opacity 160ms cubic-bezier(.2, .65, .3, 1); }
#main-nav-menu.nav-menu-leave { transition: opacity 120ms ease-in; }

.menu-open .nav-menu-grid {
  animation: nav-menu-grid-enter 160ms cubic-bezier(.2, .65, .3, 1) both;
}

@keyframes nav-menu-grid-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  #main-nav-menu:is(.nav-menu-enter, .nav-menu-leave) { transition: none; }
  .menu-open .nav-menu-grid { animation: none; }
}

/* Gemeinsame Sidebar für das Portal und das persönliche Menü der Website. */
:root {
  --portal-sidebar-heading-after: .25rem;
  --portal-sidebar-link-gap: .25rem;
}

.portal-sidebar-heading {
  color: color-mix(in srgb, var(--portal-text-muted, #6b7280) 16%, white 84%) !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.portal-sidebar-title {
  display: block;
  flex: 1 1 auto;
}

.portal-sidebar-orgname {
  color: var(--portal-sidebar-active-text, #ffffff);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-sidebar-separator {
  border-top: 1px solid var(--portal-sidebar-border, #9e163c);
}
.portal-sidebar-links { display: flex; flex-direction: column; gap: var(--portal-sidebar-link-gap); }
.portal-sidebar-links > * { margin-block: 0; }
@media (max-width: 1023.98px) {
  .portal-sidebar-collapsed .portal-sidebar-section-heading { display: none; }
  .portal-sidebar-collapsed .portal-sidebar-separator { margin-block: 0.125rem; }
}

.portal-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: var(--portal-sidebar-text, #ffedbb);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.portal-nav-link > .ui-icon-mask {
  flex: 0 0 auto;
  align-self: center;
  width: 1.375rem;
  height: 1.375rem;
}

.portal-nav-link > svg {
  flex: 0 0 auto;
  align-self: center;
  width: 1.375rem;
  height: 1.375rem;
}

.portal-nav-link > span:not(.ui-icon-mask) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.portal-nav-link > span.portal-sidebar-counter {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  padding: 0 0.375rem;
  border-radius: 9999px;
  background: #facc15;
  color: #111827;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.portal-nav-link > span.portal-sidebar-counter-amber {
  background: #fbbf24;
}

.portal-nav-link:hover {
  background: var(--portal-sidebar-hover-bg, #9e163c);
  color: var(--portal-sidebar-active-text, #ffffff);
}

.portal-nav-link[aria-disabled="true"],
.portal-nav-link[aria-disabled="true"]:hover {
  opacity: 0.45;
  cursor: default;
  background: transparent;
  pointer-events: none;
}

.portal-nav-link.is-active {
  background: var(--portal-sidebar-hover-bg, #9e163c);
  color: var(--portal-sidebar-active-text, #ffffff);
  font-weight: 600;
}

.portal-nav-link > span.portal-status-badge-admin-preview {
  box-sizing: border-box;
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid #777078;
  border-radius: var(--portal-status-badge-radius, .35rem);
  width: 3.25rem;
  min-width: 3.25rem;
  max-width: 3.25rem;
  flex: 0 0 3.25rem;
  margin-left: auto;
  padding: 0.15rem 0.35rem;
  overflow: visible;
  text-overflow: clip;
  background: transparent;
  color: #f4d8a3;
}

@media (max-width: 1023.98px) {
  [data-mobile-nav-scroll] {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-block-start: 0.5rem;
  }
}

@media (max-width: 1023.98px) and (prefers-reduced-motion: no-preference) {
  [data-mobile-nav-scroll]:not(:has(:focus-visible)) {
    scroll-snap-type: y proximity;
  }

  [data-mobile-nav-scroll] .mobile-portal-area > .portal-sidebar-header,
  [data-mobile-nav-scroll] .mobile-portal-area .portal-sidebar-section-heading {
    scroll-snap-align: start;
  }

  [data-mobile-nav-scroll] .mobile-portal-actions {
    scroll-snap-align: end;
  }
}
