/* Mr & Miss Iran 2.14 (R8) · THE member menu — a byte-for-byte copy of ipn/assets/css/site.d/umenu.css.
   The client's request: the avatar menu on this site, on IPN and on the welcome page must be indistinguishable.
   So nothing here is re-tokened. Instead the neutral token contract of R4-SHARED §0 is pinned to IPN's own values
   on `.umenu--member` below, which makes the dropdown render in IPN's colours (red accent, IPN paper / ink / line /
   sunk) inside the Prime header, in light and in dark. The Prime palette still dresses the TEAM dropdown
   (`.umenu--staff` in prime-public.css); this file never touches it.
   Edit nothing here by hand: copy ipn/assets/css/site.d/umenu.css over it and keep the two blocks below. */

/* IPN's Latin face, from this site's own files (OFL, assets/fonts/OFL-inter.txt), so the English menu is set in the
   very type IPN sets it in. Declared here and used by nothing else, so it is only fetched when a signed-in member's
   menu is on the page. Persian is Vazirmatn on both sites already. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-700-normal.woff2) format("woff2"); }

/* R4-SHARED §0 tokens, IPN's values (ipn/assets/themes/classic/css/base.css) — light */
.umenu--member { --paper: #FFFFFF; --ink: #0B1324; --ink-2: #3A4660; --muted: #6A7591; --line: rgba(10,20,40,.10); --sunk: rgba(10,20,40,.05); --accent: #E11D2E; }
html[data-mode="dark"] .umenu--member { --paper: #0E1526; --ink: #F3F5FA; --ink-2: #B7C0D4; --muted: #7D879E; --line: rgba(255,255,255,.09); --sunk: rgba(255,255,255,.07); }
/* Two things the Prime sheets do to this component, undone so the menu measures the same as IPN's.
   1. The pop must state its own colour and type: the Prime header paints white text with its own display font on the
      band the button sits in, and Prime's body line-height (1.7) would make every row three pixels taller than IPN's.
   2. prime-core.css stacks `.umenu__who` (avatar above the name); IPN's identity header is a row. */
.umenu--member .umenu__pop { color: var(--ink); font-family: "Inter", "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px; line-height: 1.55; letter-spacing: 0; text-transform: none; }
html[dir="rtl"] .umenu--member .umenu__pop { font-family: "Vazirmatn", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
html[dir="rtl"] .umenu--member .umenu__pop { line-height: 1.75; }
.umenu--member .umenu__pop strong, .umenu--member .umenu__pop b, .umenu--member .umenu__pop small { letter-spacing: 0; text-transform: none; }
/* prime-core.css dresses every `.umenu` in the Prime palette (lines 146-166). That is right for the TEAM dropdown and
   wrong for this one, so each of its declarations is given back IPN's value here, at one class more specificity (and
   with !important only where prime-core used it). Nothing below invents a value: every one is read off IPN's own file. */
html.prime-ui .umenu--member > summary, html.prime-ui .umenu--member .umenu__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; }
html.prime-ui[dir="rtl"] .umenu--member > summary, html.prime-ui[dir="rtl"] .umenu--member .umenu__btn { padding: 0 4px 0 10px; }
html.prime-ui .umenu--member > summary:hover, html.prime-ui .umenu--member .umenu__btn:hover, html.prime-ui .umenu--member[open] > .umenu__btn { border-color: var(--line); background: var(--sunk); }
html.prime-ui .umenu--member .umenu__av { width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--paper)) !important; color: var(--accent) !important; font-weight: 800; font-size: 13px; letter-spacing: .02em; }
html.prime-ui .umenu--member .umenu__av--lg { width: 44px; height: 44px; font-size: 16px; }
html.prime-ui .umenu--member .umenu__name { max-width: 9em; }
html.prime-ui .umenu--member > summary .ic:last-child, html.prime-ui .umenu--member .umenu__chev { width: 16px; height: 16px; color: var(--muted); }
html.prime-ui .umenu--member[open] > summary .ic.umenu__chev { transform: rotate(180deg); }
html.prime-ui .umenu--member .umenu__n { display: inline-grid; margin-inline-start: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 800; }
html.prime-ui .umenu--member .umenu__who { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 10px 10px 12px; }
html.prime-ui .umenu--member .umenu__who-t { display: grid; min-width: 0; }
html.prime-ui .umenu--member .umenu__who-t strong { font-size: 14.5px; line-height: 1.3; }
html.prime-ui .umenu--member .umenu__who-t small { color: var(--muted); font-size: 12px; direction: ltr; text-align: start; }

/* IPN 1.10 · User menu (partials/user_menu.php). Identical copies in site.d / account.d / studio.d — edit one, copy to all.
   Layout only, neutral: the Prime theme may restyle colours. Light & dark, LTR & RTL. */
.umenu { position: relative; display: inline-block; flex: none; }
.umenu > summary { list-style: none; }
.umenu > summary::-webkit-details-marker { display: none; }
.umenu__btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--line, rgba(0,0,0,.12)); background: var(--paper, transparent); color: var(--ink, inherit); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; user-select: none; white-space: nowrap; transition: background-color .18s ease-out, border-color .18s ease-out; }
html[dir="rtl"] .umenu__btn { padding: 0 4px 0 10px; }
.umenu__btn:hover, .umenu[open] > .umenu__btn { background: var(--sunk, rgba(0,0,0,.05)); }
.umenu__btn:focus-visible { outline: 2px solid var(--accent, #E8313F); outline-offset: 2px; }
.umenu__av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; background: color-mix(in srgb, var(--accent, #E8313F) 14%, var(--paper, #fff)); color: var(--accent, #E8313F); font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.umenu__av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.umenu__av--lg { width: 44px; height: 44px; font-size: 16px; }
.umenu__name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.umenu__chev { width: 16px; height: 16px; color: var(--muted, #777); transition: transform .2s ease-out; }
.umenu[open] .umenu__chev { transform: rotate(180deg); }
.umenu__dot { position: absolute; top: 4px; inset-inline-end: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #E8313F); box-shadow: 0 0 0 2px var(--paper, #fff); }

.umenu__pop { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 90; min-width: 264px; max-width: min(320px, calc(100vw - 24px)); padding: 6px; border-radius: 14px; background: var(--paper, #fff); color: var(--ink, #111); border: 1px solid var(--line, rgba(0,0,0,.12)); box-shadow: 0 18px 44px -18px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.06); text-align: start; animation: umenu-in .18s ease-out; }
.umenu--drawer .umenu__pop { position: static; margin-top: 8px; box-shadow: none; max-width: none; }
.umenu--drawer, .umenu--drawer .umenu__btn { width: 100%; }
.umenu--drawer .umenu__btn { justify-content: flex-start; height: 48px; border-radius: 14px; }
.umenu--drawer .umenu__name { max-width: none; flex: 1; }
@keyframes umenu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .umenu__pop { animation: none; } .umenu__chev { transition: none; } }

.umenu__who { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.umenu__who-t { display: grid; min-width: 0; }
.umenu__who-t strong { color: var(--ink, #111); font-size: 14.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu__who-t small { color: var(--muted, #777); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu__group { display: grid; gap: 1px; padding: 4px 0; border-top: 1px solid var(--line, rgba(0,0,0,.1)); }
.umenu__group a, .umenu__group button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink, #111); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; text-align: start; cursor: pointer; transition: background-color .15s ease-out; }
.umenu__group a:hover, .umenu__group button:hover, .umenu__group a:focus-visible, .umenu__group button:focus-visible { background: var(--sunk, rgba(0,0,0,.05)); outline: none; }
.umenu__group .ic { width: 18px; height: 18px; flex: none; color: var(--muted, #777); }
.umenu__group a span, .umenu__group button span { flex: 1; min-width: 0; }
.umenu__group small { color: var(--muted, #777); font-size: 11.5px; font-weight: 700; }
.umenu__n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent, #E8313F); color: #fff; font-size: 11.5px; font-weight: 800; }
.umenu__studio .ic { color: var(--accent, #E8313F); }
.umenu__row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line, rgba(0,0,0,.1)); }
.umenu__row a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; border-radius: 10px; background: var(--sunk, rgba(0,0,0,.05)); color: var(--ink, #111); font-size: 13px; font-weight: 700; text-decoration: none; transition: background-color .15s ease-out; }
.umenu__row a:hover { background: color-mix(in srgb, var(--ink, #000) 10%, var(--sunk, transparent)); }
.umenu__row .ic { width: 16px; height: 16px; }
.umenu__group--out form { display: contents; }
.umenu__group--out button { color: var(--accent, #E8313F); }
.umenu__group--out button .ic { color: currentColor; }
.umenu__group:empty { display: none; }

/* compact on narrow screens: avatar only (site header) */
@media (max-width: 1280px) { .umenu--hdr .umenu__name, .umenu--hdr .umenu__chev { display: none; } .umenu--hdr .umenu__btn { width: 40px; padding: 0; justify-content: center; border-color: transparent; background: transparent; } }
@media (max-width: 640px) { .umenu--portal .umenu__name, .umenu--account .umenu__name, .umenu--studio .umenu__name { display: none; } .umenu--portal .umenu__btn, .umenu--account .umenu__btn, .umenu--studio .umenu__btn { padding: 0 6px 0 3px; } html[dir="rtl"] .umenu--portal .umenu__btn, html[dir="rtl"] .umenu--account .umenu__btn, html[dir="rtl"] .umenu--studio .umenu__btn { padding: 0 3px 0 6px; } }

/* 1.13 · phones: a proper anchored sheet.
   It used to be `position: fixed; bottom: …`, but every header that carries the menu has a backdrop-filter, so the
   "fixed" panel was laid out inside the 56px header instead of the window: it shot off the top of the page and only
   the last row ("sign out") stayed on screen. Anchored + scrollable keeps the whole list reachable and the page still. */
@media (max-width: 760px) {
  .umenu:not(.umenu--drawer) .umenu__pop {
    position: absolute; top: calc(100% + 10px); inset-inline: auto 0;
    width: min(320px, calc(100vw - 20px)); min-width: 0; max-width: none;
    max-height: min(74svh, calc(100svh - 108px));
    overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    border-radius: 18px; box-shadow: 0 26px 64px -22px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.14);
  }
  .umenu:not(.umenu--drawer) .umenu__group a, .umenu:not(.umenu--drawer) .umenu__group button { min-height: 46px; font-size: 15px; }
  .umenu:not(.umenu--drawer) .umenu__row a { height: 44px; }
  .umenu:not(.umenu--drawer) .umenu__who { position: sticky; top: 0; z-index: 1; background: var(--paper, #fff); }
  .umenu:not(.umenu--drawer) .umenu__name, .umenu:not(.umenu--drawer) .umenu__chev { display: none; }
  .umenu--portal .umenu__btn, .umenu--account .umenu__btn, .umenu--studio .umenu__btn,
  html[dir="rtl"] .umenu--portal .umenu__btn, html[dir="rtl"] .umenu--account .umenu__btn, html[dir="rtl"] .umenu--studio .umenu__btn { padding: 0; justify-content: center; }
}

/* the welcome / doors page sits on a dark picture (the dropdown itself follows the page's light/dark tokens) */
.ld-top .umenu__pop, .stage__tools .umenu__pop { color: var(--ink, #111); }
.ld-top .umenu__btn, .stage__tools .umenu__btn { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.12); color: #fff; }
.ld-top .umenu__btn:hover, .stage__tools .umenu__btn:hover { background: rgba(255,255,255,.22); }
.ld-top .umenu__chev, .stage__tools .umenu__chev { color: rgba(255,255,255,.8); }
.ld-top .umenu__av, .stage__tools .umenu__btn .umenu__av { background: #fff; color: var(--accent, #E8313F); }

/* IPN site header (1.12): the button follows the header's text colours, the dropdown its own paper */
.hdr__tools .umenu__btn, .hdr__me .umenu__btn { color: var(--text, var(--ink)); border-color: var(--line-2, var(--line)); }
.hdr__tools .umenu__btn:hover, .hdr__tools .umenu[open] > .umenu__btn,
.hdr__me .umenu__btn:hover, .hdr__me .umenu[open] > .umenu__btn { background: var(--surface-2, var(--sunk)); }

/* Studio top bar */
.st-top .umenu { margin-inline-start: 4px; }
.st-top .umenu__btn { height: 38px; background: var(--paper); }
