/* Language & currency picker, its drawer row and the pricing currency control (IT4Y_MKT_LOCALE_PICKER_2026_11_11).
   Follows the Customer Panel picker: 44 px targets, radius 11/14/9, endonyms, a check on the chosen option.
   Logical properties only, so Arabic mirrors without extra rules. The --lp-* tokens are scoped to these
   components and map the site's design-system tokens for light and dark themes. */
.locale-picker, .lc-panel, .lc-drawer-row, .mk-cur-row {
  --lp-panel: var(--ds-surface, #fff);
  --lp-bg: var(--ds-surface-2, #f8fafc);
  --lp-border: var(--ds-border, #e2e8f0);
  --lp-text: var(--ds-text, #0f172a);
  --lp-text-2: var(--ds-text-2, #475569);
  --lp-muted: var(--ds-text-2, #475569);
  --lp-accent: var(--ds-blue, #2563eb);
  --lp-accent-ink: #1d4ed8;
  --lp-accent-soft: #e8f0fe;
  --lp-on-accent: #fff;
  --lp-warn: #b45309;
  --lp-shadow: 0 18px 44px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .08);
}
html[data-theme="dark"] :is(.locale-picker, .lc-panel, .lc-drawer-row, .mk-cur-row) {
  --lp-muted: #94a3b8;
  --lp-accent: #60a5fa;
  --lp-accent-ink: #93c5fd;
  --lp-accent-soft: rgba(96, 165, 250, .16);
  --lp-on-accent: #0b1220;
  --lp-warn: #fbbf24;
  --lp-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 1px var(--lp-border);
}

/* Header trigger: globe, language, currency code, chevron. */
.topbar-bar :is(a, button) { touch-action: manipulation; }
.locale-picker { position: relative; display: inline-flex; min-inline-size: 0; }
.locale-trigger {
  display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box;
  min-block-size: 44px; max-inline-size: 220px; padding-inline: 12px;
  border: 1px solid var(--lp-border); border-radius: 11px; background: var(--lp-panel); color: var(--lp-text);
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, transform .08s ease;
}
.locale-trigger svg, .lc-drawer-row svg, .lc-close svg, .locale-check {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.locale-globe { inline-size: 16px; block-size: 16px; flex: 0 0 auto; color: var(--lp-muted); }
.locale-chevron { inline-size: 14px; block-size: 14px; flex: 0 0 auto; stroke-width: 2.2; color: var(--lp-muted); transition: transform .15s ease; }
.locale-value { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: isolate; }
.lc-lang-short { display: none; }
.lc-sep { color: var(--lp-muted); flex: 0 0 auto; }
.lc-cur { flex: 0 0 auto; color: var(--lp-text-2); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.locale-trigger:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }
.locale-trigger:active { transform: scale(.98); }
.locale-picker[data-open] .locale-trigger {
  border-color: var(--lp-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-accent) 18%, transparent);
}
.locale-picker[data-open] .locale-chevron { transform: rotate(180deg); }
.locale-trigger[aria-busy="true"] {
  background-image: linear-gradient(90deg, transparent, var(--lp-accent), transparent);
  background-repeat: no-repeat; background-size: 40% 2px; background-position: -40% 100%;
  animation: lc-busy 1.2s linear infinite;
}
@keyframes lc-busy { to { background-position: 140% 100%; } }

/* Dialog: a popover on wide screens (geometry from the script), a bottom sheet on phones. */
.lc-panel {
  position: fixed; z-index: 10001; box-sizing: border-box;
  inset-block-start: var(--lc-top, 72px); inset-inline-start: var(--lc-start, 16px);
  inline-size: var(--lc-width, 360px); max-block-size: var(--lc-max, 70vh);
  overflow-y: auto; overscroll-behavior: contain; padding: 8px;
  border: 1px solid var(--lp-border); border-radius: 14px; background: var(--lp-panel); color: var(--lp-text);
  box-shadow: var(--lp-shadow); text-align: start; animation: lc-pop .14s ease-out;
}
.lc-panel[hidden] { display: none; }
@keyframes lc-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.lc-grab { display: none; }
.lc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 0; }
.lc-panel .lc-title { margin: 0; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--lp-text); letter-spacing: -.01em; }
.lc-close {
  display: none; place-items: center; inline-size: 44px; block-size: 44px; margin-inline-end: -10px; padding: 0;
  border: 0; border-radius: 11px; background: transparent; color: var(--lp-muted); cursor: pointer;
}
.lc-close svg { inline-size: 20px; block-size: 20px; }
.lc-section { margin: 0; }
.lc-panel .lc-h {
  margin: 0; font-family: inherit; padding: 12px 10px 6px; font-size: 12px; font-weight: 700; line-height: 1.2;
  letter-spacing: .04em; text-transform: uppercase; color: var(--lp-muted);
}
html[dir="rtl"] .lc-panel .lc-h { text-transform: none; letter-spacing: 0; }
.lc-divider { block-size: 1px; margin: 8px 4px 0; background: var(--lp-border); }

/* Languages: a two-column grid of endonyms, each name in its own language and direction. */
.lc-langs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.lc-lang {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; box-sizing: border-box;
  min-block-size: 44px; padding-block: 6px; padding-inline: 12px; border-radius: 9px;
  color: var(--lp-text); text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.25;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lc-lang-name { min-inline-size: 0; unicode-bidi: isolate; text-align: start; }
.locale-check { inline-size: 16px; block-size: 16px; flex: 0 0 auto; stroke-width: 2.2; visibility: hidden; }

/* Currencies: symbol badge, ISO code, full name, check. */
.lc-curs { display: grid; gap: 4px; }
.lc-cur-opt {
  display: grid; grid-template-columns: 32px auto minmax(0, 1fr) 16px; align-items: center; column-gap: 10px;
  box-sizing: border-box; inline-size: 100%; min-block-size: 48px; padding-block: 6px; padding-inline: 8px 12px;
  border: 0; border-radius: 9px; background: transparent; color: var(--lp-text);
  font: inherit; font-size: 14px; text-align: start; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lc-sym {
  display: grid; place-items: center; inline-size: 32px; block-size: 32px; border-radius: 8px;
  background: var(--lp-accent-soft); color: var(--lp-accent-ink); font-size: 15px; font-weight: 700; line-height: 1;
}
.lc-code { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lc-name { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lp-muted); font-size: 13px; }
.lc-note { margin: 8px 10px 0; font-size: 13px; line-height: 1.4; color: var(--lp-warn); }
.lc-note[hidden] { display: none; }
.lc-hint { margin: 8px 10px 4px; font-size: 12px; line-height: 1.45; color: var(--lp-muted); }

/* Chosen, hover, focus, pressed, disabled. */
.lc-lang[aria-current="page"], .lc-cur-opt[aria-checked="true"] {
  background: var(--lp-accent-soft); color: var(--lp-accent-ink); font-weight: 650;
}
.lc-lang[aria-current="page"] .locale-check, .lc-cur-opt[aria-checked="true"] .locale-check { visibility: visible; }
.lc-cur-opt[aria-checked="true"] .lc-sym { background: var(--lp-accent); color: var(--lp-on-accent); }
/* The site-wide focus ring (accessibility-focus.css) stays; inside the scrolling dialog it is drawn inward. */
.lc-panel :is(a, button):focus-visible { outline-offset: -3px !important; }
.lc-panel :is(.lc-lang, .lc-cur-opt):active { transform: scale(.98); }
.lc-cur-opt[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .locale-trigger:hover {
    border-color: color-mix(in srgb, var(--lp-accent) 40%, var(--lp-border));
    background: color-mix(in srgb, var(--lp-accent-soft) 45%, var(--lp-panel));
  }
  .lc-lang:not([aria-current="page"]):hover,
  .lc-cur-opt[aria-checked="false"]:not([aria-disabled="true"]):hover,
  .lc-close:hover { background: color-mix(in srgb, var(--lp-accent-soft) 55%, var(--lp-panel)); }
  .mk-curbtn[aria-checked="false"]:not([aria-disabled="true"]):hover { color: var(--lp-text); }
}

.lc-backdrop { position: fixed; inset: 0; z-index: 10000; background: rgba(2, 6, 23, .45); animation: lc-fade .2s ease-out; }
.lc-backdrop[hidden] { display: none; }
@keyframes lc-fade { from { opacity: 0; } }
body.lc-lock { overflow: hidden; }
.lc-sr {
  position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Without scripts the dialog opens under the focused trigger and lists the languages only. */
.locale-picker:not([data-lc-ready]) .lc-panel {
  position: absolute; inset-block-start: calc(100% + 6px); inset-inline-start: auto; inset-inline-end: 0;
  inline-size: min(360px, calc(100vw - 32px));
}
.locale-picker:not([data-lc-ready]):focus-within .lc-panel[hidden] { display: block; }
.locale-picker:not([data-lc-ready]) :is(.lc-cur-section, .lc-divider, .lc-sep, .lc-cur) { display: none; }

/* Drawer row: one full-width entry into the same dialog. */
.lc-drawer-row { display: none; }
@media (max-width: 900px) {
  html body .lc-drawer-row {
    display: flex; align-items: center; gap: 12px; box-sizing: border-box;
    inline-size: calc(100% - 24px); min-block-size: 56px; margin-block: 8px 2px; margin-inline: 12px; padding-inline: 14px;
    border: 1px solid var(--lp-border); border-radius: 12px; background: var(--lp-bg); color: var(--lp-text);
    font: inherit; text-align: start; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  .lc-drawer-globe { inline-size: 20px; block-size: 20px; flex: 0 0 auto; color: var(--lp-accent); }
  .lc-drawer-text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; flex: 1 1 auto; }
  .lc-drawer-cap { font-size: 12px; line-height: 1.2; color: var(--lp-muted); }
  .lc-drawer-val {
    font-size: 15px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .lc-drawer-val bdi { color: var(--lp-text-2); font-variant-numeric: tabular-nums; }
  .lc-drawer-chev { inline-size: 18px; block-size: 18px; flex: 0 0 auto; color: var(--lp-muted); }
  html[dir="rtl"] .lc-drawer-chev { transform: scaleX(-1); }
  .lc-drawer-row:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }
}

/* Pricing: a segmented currency control next to the plans. Its row keeps the control's height from the first paint,
   so showing it (disabled until the prices load) moves nothing below; the error note appears only on failure. */
.mk-cur-row {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-block-size: 46px; margin-block-start: 14px;
}
.mk-cur-note { margin-block: 8px 0; margin-inline: 0; text-align: center; }
.mk-cursel {
  display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--lp-border); border-radius: 12px; background: var(--lp-bg);
}
.mk-cursel[hidden] { display: none; }
.mk-curbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box;
  min-block-size: 36px; min-inline-size: 44px; padding-inline: 14px; border: 0; border-radius: 9px; background: transparent;
  color: var(--lp-text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, color .15s ease;
}
/* 36 px tall to the eye, a 44 px target: the hit area reaches into the control's 4 px padding. */
.mk-curbtn::after { content: ""; position: absolute; inset-block: -4px; inset-inline: -2px; }
.mk-sym { font-weight: 700; }
.mk-curbtn bdi { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mk-curbtn[aria-checked="true"] { background: var(--lp-panel); color: var(--lp-accent-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.mk-curbtn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.mk-curbtn:focus-visible { outline: 2px solid var(--lp-accent); outline-offset: 2px; }

@media (max-width: 1100px) { .locale-trigger { max-inline-size: 168px; } }
@media (max-width: 900px) {
  .mk-cur-row { min-block-size: 54px; }
  .locale-trigger { max-inline-size: 140px; padding-inline: 10px; gap: 6px; }
  .lc-lang-long { display: none; }
  .lc-lang-short { display: inline; }
}

/* Phones: compact header and a bottom sheet. */
@media (max-width: 640px) {
  #topbar .topbar-right { gap: 6px; }
  #topbar .topbar-logo { min-inline-size: 0; }
  .locale-trigger { padding-inline: 8px; }
  .lc-panel[data-mode="sheet"] {
    inset-block-start: auto; inset-block-end: 0; inset-inline: 0; inline-size: auto; max-block-size: min(85dvh, 640px);
    padding-block: 8px calc(env(safe-area-inset-bottom, 0px) + 16px); padding-inline: 16px;
    border-block-end: 0; border-start-start-radius: 20px; border-start-end-radius: 20px;
    border-end-start-radius: 0; border-end-end-radius: 0; animation: lc-sheet .22s cubic-bezier(.2, .8, .2, 1);
  }
  .lc-panel[data-mode="sheet"] .lc-grab {
    display: block; inline-size: 36px; block-size: 4px; margin-block: 4px 8px; margin-inline: auto;
    border-radius: 2px; background: var(--lp-border);
  }
  .lc-panel[data-mode="sheet"] .lc-close { display: inline-grid; }
  .lc-panel[data-mode="sheet"] .lc-lang { min-block-size: 48px; }
  .lc-panel[data-mode="sheet"] .lc-cur-opt { min-block-size: 56px; }
  .mk-cur-row { padding-inline: 16px; }
  .mk-cursel { display: flex; inline-size: 100%; max-inline-size: 420px; }
  .mk-cursel[hidden] { display: none; }
  .mk-curbtn { flex: 1 1 0; min-block-size: 44px; }
}
@keyframes lc-sheet { from { transform: translateY(100%); } }
@media (max-width: 359px) { .lc-sep { display: none; } }
@media (max-width: 400px) {
  .locale-chevron { display: none; }
  .locale-trigger { gap: 5px; }
  .lc-panel[data-mode="sheet"] .lc-lang { font-size: 13px; }
}

/* Prices rendered in USD wait as skeletons of the same size while a remembered other currency loads
   (html[data-price-pending], marketing-theme-init.js), then fade in; nothing moves. */
:is(.plan-price, [data-price-from], .it4-svl-price) { transition: color .15s ease; }
html[data-price-pending] :is(.plan-price, [data-price-from], .it4-svl-price),
html[data-price-pending] :is(.plan-price, [data-price-from], .it4-svl-price) * { color: transparent !important; }
html[data-price-pending] :is(.plan-price, [data-price-from], .it4-svl-price) {
  border-radius: 6px; background-image: linear-gradient(90deg, rgba(148, 163, 184, .16) 25%, rgba(148, 163, 184, .34) 50%,
    rgba(148, 163, 184, .16) 75%);
  background-size: 200% 100%; animation: lc-skeleton 1.2s ease-in-out infinite;
}
@keyframes lc-skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (prefers-reduced-motion: reduce) {
  html[data-price-pending] :is(.plan-price, [data-price-from], .it4-svl-price) { animation: none; }
  :is(.plan-price, [data-price-from], .it4-svl-price) { transition: none; }
  .locale-trigger, .locale-chevron, .lc-panel, .lc-backdrop, .mk-curbtn, .lc-panel :is(.lc-lang, .lc-cur-opt) {
    transition: none; animation: none;
  }
  .locale-trigger:active, .lc-panel :is(.lc-lang, .lc-cur-opt):active { transform: none; }
}
