@import url("./shared/icons/iovo-icons.css");
/* Uses each world's existing palette; no page-specific menu implementations. */
.ws-menu, [data-world-switcher-trigger], [data-world-pill] {
  --ws-bg: var(--surface-1, var(--panel-a, var(--card)));
  --ws-panel-bg: #071e2a;
  --ws-text: var(--text-1, var(--ink, var(--text)));
  --ws-muted: var(--text-2, var(--ink-2, var(--text-dim)));
  --ws-line: var(--hairline-strong, var(--panel-line, var(--border-hi)));
  --ws-accent: var(--primary, var(--accent, var(--aqua)));
}
html[data-theme="light"] .ws-menu, html[data-office-theme="day"] .ws-menu { --ws-panel-bg: #f6fbfc; }
html[data-theme="dark"] .ws-menu, html[data-office-theme="night"] .ws-menu { --ws-panel-bg: #130b06; }
.ws-menu[hidden] { display: none !important; }
.ws-menu { position: fixed; z-index: 1500; box-sizing: border-box; padding: 8px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--ws-line); border-radius: 22px; background: var(--ws-panel-bg); background: color-mix(in srgb, var(--ws-panel-bg) 96%, transparent); -webkit-backdrop-filter: blur(28px) saturate(1.5); backdrop-filter: blur(28px) saturate(1.5); color: var(--ws-text); box-shadow: 0 22px 60px rgba(0, 0, 0, .52), inset 0 1px 0 color-mix(in srgb, var(--ws-text) 10%, transparent); font: 400 13px/1.45 'DM Sans', sans-serif; text-align: start; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .ws-menu { background: var(--ws-panel-bg); } }
.ws-menu *, .ws-menu *::before, .ws-menu *::after { box-sizing: border-box; }
.ws-head { display: grid; gap: 2px; padding: 10px 10px 8px; }
.ws-head strong { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ws-head > span, .ws-copy > span, .ws-foot, .ws-section, .ws-status { color: var(--ws-muted); }
.ws-row { display: grid !important; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 54px; margin: 3px 0; padding: 8px 12px; border-radius: 16px; color: var(--ws-text) !important; text-decoration: none; border: 1px solid transparent; }
.ws-row:hover, .ws-row:focus-visible { background: color-mix(in srgb, var(--ws-accent) 10%, transparent); border-color: var(--ws-line); }
.ws-row:focus-visible, [data-world-switcher-trigger]:focus-visible, [data-world-pill]:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; }
.ws-row[aria-current] { background: color-mix(in srgb, var(--ws-accent) 14%, transparent); border-color: color-mix(in srgb, var(--ws-accent) 36%, transparent); }
.ws-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--ws-line); border-radius: 999px; background: color-mix(in srgb, var(--ws-accent) 10%, transparent); color: var(--ws-accent); }
@media (pointer: coarse), (max-width: 768px) { .ws-foot { display: none !important; } }
.ws-icon svg, .ws-state svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ws-copy { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.ws-copy strong { font-size: 14px; font-weight: 600; }
.ws-copy > span { font-size: 12px; }
.ws-state { display: grid; place-items: center; min-width: 18px; color: var(--ws-muted); font-size: 13px; }
.ws-state svg { stroke-width: 2.2; }
.ws-row[aria-current] .ws-state { color: var(--ws-accent); }
.ws-section { border-top: 1px solid var(--ws-line); margin-top: 6px; padding: 12px 10px 4px; font-weight: 600; }
.ws-foot { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--ws-line); margin: 6px 4px 0; padding: 8px 6px 4px; font-size: 12px; }
.ws-status { padding: 12px; }
.ws-status--quiet { padding: 6px 12px 10px; font-size: 12px; }
button[data-world-switcher-trigger] { cursor: pointer; color: inherit; font: inherit; }
button.sidebar-user { width: 100%; border: 0; background: transparent; text-align: start; }
button.shx-rail__logo { padding: 0; background: transparent; border: 0; flex-shrink: 0; }
button.shx-user { text-align: start; }
button.who { border: 0; background: transparent; padding: 0; }

.ws-launcher { border: 1px solid var(--ws-line); border-radius: 999px; min-height: 40px; padding: 8px 14px; background: var(--ws-bg); color: var(--ws-text); }

/* Always-visible world pill in each top bar. Height follows the neighbouring controls. */
.ws-pill[hidden] { display: none !important; }
.ws-pill { --ws-pill-h: 36px; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; box-sizing: border-box; height: var(--ws-pill-h); max-width: 100%; margin: 0; padding: 0 10px 0 6px; border: 1px solid var(--ws-line); border-radius: 999px; background: color-mix(in srgb, var(--ws-bg) 72%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); color: var(--ws-text); font: 600 13px/1 'DM Sans', sans-serif; letter-spacing: 0; white-space: nowrap; cursor: pointer; transition: background-color .18s ease, border-color .18s ease; -webkit-tap-highlight-color: transparent; }
.ws-pill:hover, .ws-pill[aria-expanded="true"] { background: color-mix(in srgb, var(--ws-accent) 12%, var(--ws-bg)); border-color: color-mix(in srgb, var(--ws-accent) 45%, transparent); }
.ws-pill__icon { display: grid; place-items: center; flex: 0 0 auto; width: calc(var(--ws-pill-h) - 12px); height: calc(var(--ws-pill-h) - 12px); border-radius: 999px; background: color-mix(in srgb, var(--ws-accent) 16%, transparent); color: var(--ws-accent); }
.ws-icon .ic, .ws-state .ic { width: 18px; height: 18px; --ic-size: 16px; }
.ws-pill .ic { width: 15px; height: 15px; --ic-size: 16px; }
.ws-pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ws-pill__label { white-space: nowrap; }
.ws-pill__chevron { display: grid; place-items: center; color: var(--ws-muted); transition: transform .18s ease; }
.ws-pill__chevron svg { width: 14px; height: 14px; stroke-width: 2; }
.ws-pill[aria-expanded="true"] .ws-pill__chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .ws-pill, .ws-pill__chevron { transition: none; } }
/* Per-world sizing: match the control row it sits in (Rep theme toggle, Office/CEO pickers). */
.shx-topbar .ws-pill, .tools .ws-pill { --ws-pill-h: 36px; }
html[data-ds] .header-right .ws-pill:not(#_) { --ws-pill-h: 32px; min-height: 0; }
@media (pointer: coarse) { html[data-ds] .header-right .ws-pill:not(#_) { --ws-pill-h: var(--ds-hit, 40px); } }
/* Rep phone: the header row has no spare width, so the pill keeps its icon (name in the
   accessible label) and the language toggle shows EN / ES like Office and CEO. */
@media (max-width: 480px) {
  .header-right .ws-pill { gap: 4px; padding: 0 8px 0 6px; }
  .header-right .ws-pill__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  html[data-ds] .header-right:has(> .ws-pill:not([hidden])) .lang-opt:not(#_) { font-size: 0; min-width: 0; padding: 0 10px; }
  html[data-ds] .header-right:has(> .ws-pill:not([hidden])) .lang-opt:not(#_)::before { content: attr(data-lang); content: attr(data-lang) / ""; font-size: 12px; text-transform: uppercase; }
}
/* Scrawl #6 (Frame #9): never show Worlds / Espacios button on Mail, Leads, or mobile Office headers, even for Super Admin. */
body.im-mail-surface :is(.ws-pill, .ws-launcher, [data-world-pill], [data-world-switcher-trigger], #world-switcher-menu),
[data-leads-standalone] :is(.ws-pill, .ws-launcher, [data-world-pill], [data-world-switcher-trigger], #world-switcher-menu) {
  display: none !important;
}
@media (max-width: 900px) {
  [data-shell] .shx-topbar :is(.ws-pill, .ws-launcher, [data-world-pill]) {
    display: none !important;
  }
}
