/**
 * Guest Hero language panel — scoped by .zs-guest-language-menu on the listbox
 * itself (works in Portal; no ancestor selector required).
 */

.zs-guest-language-menu {
  box-sizing: border-box;
  min-width: 220px;
  padding: var(--zs-pop-pad-block, 8px) !important;
  border: 1px solid var(--zs-pop-line, rgba(17, 21, 18, 0.1)) !important;
  border-radius: var(--zs-pop-radius, 12px) !important;
  background: var(--zs-pop-bg, #ffffff) !important;
  color: var(--zs-pop-ink, #111512) !important;
  box-shadow: var(--zs-pop-shadow, 0 16px 40px -12px rgba(15, 18, 16, 0.22)) !important;
  font-family: var(--zs-header-nav-font-family, "Tajawal", "IBM Plex Sans Arabic", sans-serif);
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

.zs-guest-language-menu [role='option'] {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: var(--zs-pop-row-h, 44px) !important;
  padding-inline: 14px !important;
  padding-block: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #111111 !important;
  font-family: var(--zs-header-nav-font-family, "Tajawal", "IBM Plex Sans Arabic", sans-serif) !important;
  font-size: var(--zs-header-nav-font-size, 14px) !important;
  font-weight: 500 !important;
  line-height: var(--zs-header-nav-line-height, 1.3) !important;
  letter-spacing: var(--zs-header-nav-letter-spacing, 0) !important;
  text-align: start !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: background-color 140ms ease, color 140ms ease !important;
}

.zs-guest-language-menu [role='option']:hover,
.zs-guest-language-menu [role='option']:focus-visible {
  background: var(--zs-pop-hover, #f4f5f3) !important;
  color: var(--zs-pop-ink, #111512) !important;
  outline: none !important;
  box-shadow: none !important;
}

.zs-guest-language-menu [role='option'][aria-selected='true'] {
  background: var(--zs-pop-selected, #f0f2ee) !important;
  color: var(--zs-pop-ink, #111512) !important;
  font-weight: 700 !important;
}

.zs-guest-language-menu [role='option'][aria-selected='true']::after {
  content: '';
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-inline-start: auto;
  border-radius: 999px;
  background: var(--zs-pop-marker, #a3ff12);
  box-shadow: 0 0 0 1px #7cc70a;
}

.zs-guest-language-menu [role='option'] span {
  color: inherit !important;
}

/* Desktop V2: keyboard focus is a visible ink ring (hover stays a plain tint). */
.zs-guest-language-menu [role='option']:focus-visible {
  box-shadow: var(--zs-pop-focus, inset 0 0 0 2px #111512) !important;
}

/* قائمة اللغات — تمرير بدون شريط مرئي */
.HeaderLanguageGlobe_languageDropdown__vTXkl {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.HeaderLanguageGlobe_languageDropdown__vTXkl::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.HeaderLanguageGlobe_languageDropdownMobile__f_0zl {
  max-height: min(360px, calc(100dvh - 76px));
  overflow-x: hidden;
  overscroll-behavior: contain;
  touch-action: manipulation;
  transform: translateZ(0);
}

/* TradingView-like light account menu */

.ProfileMenu_shell__eydbJ {
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 0;
  overflow: hidden;
  margin-left: 0;
  margin-right: 0;
  border-radius: 8px;
  border: 1px solid #d9dce3;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  color: #111827;
  font-family: "Tajawal", "IBM Plex Sans Arabic", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ProfileMenu_shellEnter__GZwd1 {
  animation: ProfileMenu_profileMenuEnter__5bvSV 180ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .ProfileMenu_shellEnter__GZwd1 {
    animation: none;
  }
}

@keyframes ProfileMenu_profileMenuEnter__5bvSV {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ProfileMenu_identity__Jlbw4 {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 72px;
  padding: 14px 16px;
  border-block-end: 1px solid #eceff3;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
}

.ProfileMenu_identity__Jlbw4:hover {
  background: #f7f8fa;
}

.ProfileMenu_identityAvatar__Iy4Jy {
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  flex: 0 0 40px;
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  overflow: hidden;
  background: #5b8a96;
  box-shadow: none;
  border: none;
}

.ProfileMenu_identityAvatarImg__RhYAT {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ProfileMenu_identityAvatarFallback__5EJet {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.ProfileMenu_identityText__lAGuG {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.ProfileMenu_identityName__3TTV1 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ProfileMenu_identityEmail__cd3op {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ProfileMenu_body__EmivL {
  padding: 0;
}

.ProfileMenu_groupDivider__04dX8 {
  height: 1px;
  margin: 0;
  border: 0;
  background: #eceff3;
}

.ProfileMenu_row__ZVz51 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  min-height: 48px;
  padding-inline: 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  width: 100%;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: #111827;
  transition: background-color 120ms ease;
  text-align: start;
}

.ProfileMenu_row__ZVz51:hover {
  background: #f7f8fa;
}

.ProfileMenu_row__ZVz51:active {
  background: #f1f3f6;
}

.ProfileMenu_row__ZVz51:focus-visible {
  outline: none;
  background: #f7f8fa;
  box-shadow: inset 0 0 0 2px #2962ff;
}

.ProfileMenu_rowActive__9tR4X {
  background: #f1f3f6;
}

.ProfileMenu_rowIcon__ZZnxt {
  display: none;
}

.ProfileMenu_rowLabel__6qrLe {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: start;
}

.ProfileMenu_rowSuffix__p8SyO {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 400;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.ProfileMenu_rowBadge__gU_TH {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ef4444;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  padding-inline: 5px;
  flex-shrink: 0;
}

.ProfileMenu_chevron__i82PX {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #9ca3af;
  opacity: 1;
}

.ProfileMenu_footer__rV1mL {
  border-block-start: 1px solid #eceff3;
  padding: 0;
}

.ProfileMenu_logoutRow__HNbN8 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  min-height: 48px;
  padding-inline: 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: #111827;
  transition: background-color 120ms ease;
  text-align: start;
}

.ProfileMenu_logoutRow__HNbN8:hover {
  background: #f7f8fa;
}

.ProfileMenu_logoutRow__HNbN8:active {
  background: #f1f3f6;
}

.ProfileMenu_logoutRow__HNbN8 .ProfileMenu_rowIcon__ZZnxt {
  display: none;
}

.ProfileMenu_switch__dpWrY {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: #d1d5db;
  padding: 0;
  cursor: pointer;
}

.ProfileMenu_switchOn__unFhB {
  background: #4b5563;
}

.ProfileMenu_switchThumb___ezRs {
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.18);
  transition: inset-inline-start 140ms ease;
  pointer-events: none;
}

.ProfileMenu_switchOn__unFhB .ProfileMenu_switchThumb___ezRs {
  inset-inline-start: 18px;
}

.ProfileMenu_nestedPanel__j82DL {
  animation: ProfileMenu_nestedPanelIn__qX6xa 180ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .ProfileMenu_nestedPanel__j82DL {
    animation: none;
  }
}

@keyframes ProfileMenu_nestedPanelIn__qX6xa {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

[dir='rtl'] .ProfileMenu_nestedPanel__j82DL {
  animation-name: ProfileMenu_nestedPanelInRtl__F7J6r;
}

@keyframes ProfileMenu_nestedPanelInRtl__F7J6r {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ProfileMenu_dropdownAnchor__4a2YH {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 9999;
}

.ProfileMenu_triggerWrap__tShP2 {
  position: relative;
}

.ProfileMenu_inDropdown__bvkW4 {
  width: 100%;
  max-width: none;
}

/* ── Desktop V2 (≥ 1024px): header popover grammar ──────────────────
   Same surface, radius, elevation, row height, ink, focus and motion as the
   mega menus, guest menu, language menu, notifications and search
   (--zs-pop-* in app/design-system/zs-desktop-v2.css). Scoped to desktop so
   SchoolHeader's account menu on phones keeps its Mobile V2 presentation. */
@media (min-width: 1024px) {
  .ProfileMenu_shell__eydbJ {
    border-radius: var(--zs-pop-radius, 12px);
    border: 1px solid var(--zs-pop-line, rgba(17, 21, 18, 0.1));
    background: var(--zs-pop-bg, #ffffff);
    box-shadow: var(--zs-pop-shadow, 0 16px 40px -12px rgba(15, 18, 16, 0.22)), var(--zs-hdr-pop-ring, 0 0 0 0 transparent);
    color: var(--zs-pop-ink, #111512);
  }

  .ProfileMenu_shellEnter__GZwd1 {
    animation-duration: var(--zs-dur-d, 180ms);
    animation-timing-function: var(--zs-ease-d, ease-out);
  }

  .ProfileMenu_identity__Jlbw4 {
    padding-inline: var(--zs-pop-row-pad, 16px);
    border-block-end-color: var(--zs-pop-line-soft, #eceff3);
    background: transparent;
  }

  .ProfileMenu_identity__Jlbw4:hover {
    background: var(--zs-pop-hover, #f4f5f3);
  }

  .ProfileMenu_identity__Jlbw4:focus-visible {
    outline: none;
    box-shadow: var(--zs-pop-focus, inset 0 0 0 2px #111512);
  }

  .ProfileMenu_identityName__3TTV1 {
    font-weight: 700;
    color: var(--zs-pop-ink, #111512);
  }

  .ProfileMenu_identityEmail__cd3op,
  .ProfileMenu_rowSuffix__p8SyO,
  .ProfileMenu_chevron__i82PX {
    color: var(--zs-pop-muted, #646b67);
  }

  .ProfileMenu_groupDivider__04dX8 {
    margin: 4px 0;
    background: var(--zs-pop-line-soft, #eceff3);
  }

  .ProfileMenu_footer__rV1mL {
    border-block-start-color: var(--zs-pop-line-soft, #eceff3);
  }

  .ProfileMenu_row__ZVz51,
  .ProfileMenu_logoutRow__HNbN8 {
    height: var(--zs-pop-row-h, 44px);
    min-height: var(--zs-pop-row-h, 44px);
    padding-inline: var(--zs-pop-row-pad, 16px);
    font-size: var(--zs-pop-label, 15px);
    font-weight: 500;
    color: var(--zs-pop-ink, #111512);
    transition: background-color var(--zs-dur-d-fast, 120ms) var(--zs-ease-d, ease);
  }

  .ProfileMenu_row__ZVz51:hover,
  .ProfileMenu_logoutRow__HNbN8:hover {
    background: var(--zs-pop-hover, #f4f5f3);
  }

  .ProfileMenu_row__ZVz51:active,
  .ProfileMenu_logoutRow__HNbN8:active,
  .ProfileMenu_rowActive__9tR4X {
    background: var(--zs-pop-press, #eceee9);
  }

  .ProfileMenu_row__ZVz51:focus-visible,
  .ProfileMenu_logoutRow__HNbN8:focus-visible {
    outline: none;
    background: var(--zs-pop-hover, #f4f5f3);
    box-shadow: var(--zs-pop-focus, inset 0 0 0 2px #111512);
  }

  .ProfileMenu_dropdownAnchor__4a2YH {
    inset-block-start: calc(100% + var(--zs-pop-offset, 8px));
    z-index: var(--zs-z-d-page-popover, 1000); /* was 9999 */
  }
}

