/* v1.8: self-contained, mobile-first control. No theme font or third-party assets. */
.saryer-switcher,
.saryer-switcher * { box-sizing: border-box; }
.saryer-switcher {
  --saryer-ink: #1a3049;
  --saryer-muted: #4b5d72;
  --saryer-surface: #ffffff;
  --saryer-active: #144b70;
  --saryer-outline: #f4b342;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: min(100%, 348px);
  max-width: 100%;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #cfdae5;
  border-radius: 18px;
  background: var(--saryer-surface);
  color: var(--saryer-ink);
  box-shadow: 0 5px 22px rgb(23 51 77 / 9%);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: start;
  direction: inherit;
  isolation: isolate;
  container-type: inline-size;
}
.saryer-switcher__heading {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--saryer-ink);
}
.saryer-switcher__glyph {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  background: #e9f1f8;
  color: #144b70;
  font-size: 16px;
  line-height: 1;
}
.saryer-switcher__label {
  min-width: 0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.saryer-switcher__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  padding: 4px;
  border: 1px solid #e3e9ef;
  border-radius: 15px;
  background: #f1f5f9;
  direction: ltr; /* SAR left, YER right in both LTR and RTL. */
}
.saryer-switcher button.saryer-switcher__choice {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  position: relative;
  min-width: 62px;
  min-height: 48px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #263d55;
  box-shadow: none;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: start;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.saryer-switcher__flag { display: inline-block; flex: none; font-size: 20px; line-height: 1.1; font-weight: 400; }
.saryer-switcher__choice-copy { display: grid; gap: 2px; min-width: 0; }
.saryer-switcher__code { color: inherit; font-size: 13px; font-weight: 800; line-height: 1.2; letter-spacing: .035em; font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.saryer-switcher__name { color: var(--saryer-muted); font-size: 11px; font-weight: 500; line-height: 1.25; white-space: nowrap; unicode-bidi: isolate; }
.saryer-switcher__check { display: none; flex: none; margin-inline-start: auto; font-size: 13px; font-weight: 800; line-height: 1; }
.saryer-switcher button.saryer-switcher__choice[aria-pressed="true"] {
  background: var(--saryer-active);
  border-color: var(--saryer-active);
  color: #fff;
  box-shadow: 0 2px 7px rgb(11 52 83 / 18%);
}
.saryer-switcher button.saryer-switcher__choice[aria-pressed="true"] .saryer-switcher__name { color: #e6f2fb; }
.saryer-switcher button.saryer-switcher__choice[aria-pressed="true"] .saryer-switcher__check { display: inline-block; }
@media (hover: hover) {
  .saryer-switcher button.saryer-switcher__choice:hover:not([aria-pressed="true"]) {
    background: #e0eaf4;
    border-color: #c9dbe9;
    color: #173a57;
  }
}
.saryer-switcher button.saryer-switcher__choice:focus-visible {
  outline: 3px solid var(--saryer-outline);
  outline-offset: 2px;
  z-index: 1;
}
.saryer-switcher button.saryer-switcher__choice:active { transform: translateY(1px); }
.saryer-switcher__readout {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d6e5ef;
  border-radius: 13px;
  background: #eaf3f9;
  color: var(--saryer-ink);
  direction: ltr;
}
.saryer-switcher__current { font-size: 14px; font-weight: 800; unicode-bidi: isolate; }
.saryer-switcher__readout-name { color: #465c70; font-size: 12px; font-weight: 500; }
.saryer-switcher__readout .saryer-switcher__check { display: inline-block; margin-inline-start: auto; color: #17603d; }
.saryer-switcher__note {
  display: block;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f0f6fb;
  color: #34546e;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.saryer-switcher__note::before { content: "ⓘ "; font-weight: 800; }
.saryer-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.saryer-switcher[data-saryer-submitting="1"] { opacity: .8; }
/* Compact manual shortcode for header and sidebar placements. */
.saryer-switcher--compact { display: inline-grid; width: min(100%, 268px); gap: 7px; padding: 8px; margin-block: 0; border-radius: 15px; }
.saryer-switcher--compact .saryer-switcher__heading { gap: 5px; }
.saryer-switcher--compact .saryer-switcher__glyph { width: 20px; height: 20px; font-size: 14px; }
.saryer-switcher--compact .saryer-switcher__choices { padding: 3px; gap: 3px; border-radius: 12px; }
.saryer-switcher--compact button.saryer-switcher__choice { min-height: 44px; padding: 6px 8px; gap: 6px; border-radius: 9px; }
.saryer-switcher--compact .saryer-switcher__flag { font-size: 17px; }
.saryer-switcher--compact .saryer-switcher__name { display: none; }
.saryer-switcher--compact .saryer-switcher__readout { min-height: 44px; padding: 7px 9px; }
.saryer-switcher--compact .saryer-switcher__note { font-size: 11px; padding: 7px 9px; }
/* Physical corners remain stable on Arabic / RTL storefronts. */
.saryer-switcher--floating {
  position: fixed;
  z-index: 9998;
  width: min(328px, calc(100vw - 24px));
  margin: 0;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 12px 40px rgb(15 36 55 / 22%);
}
.saryer-switcher--bottom-right { right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
.saryer-switcher--bottom-left { left: max(12px, env(safe-area-inset-left, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
.saryer-switcher--top-right { right: max(12px, env(safe-area-inset-right, 0px)); top: max(12px, env(safe-area-inset-top, 0px)); }
.saryer-switcher--top-left { left: max(12px, env(safe-area-inset-left, 0px)); top: max(12px, env(safe-area-inset-top, 0px)); }
/* Extremely narrow sidebar / embedded shortcode: keep both actions usable. */
@container (max-width: 215px) {
  .saryer-switcher button.saryer-switcher__choice { justify-content: center; padding: 7px 4px; gap: 4px; }
  .saryer-switcher__name { display: none; }
  .saryer-switcher__flag { font-size: 16px; }
  .saryer-switcher button.saryer-switcher__choice .saryer-switcher__check { display: none; }
}
@media (max-width: 360px) {
  .saryer-switcher { gap: 9px; padding: 10px; }
  .saryer-switcher button.saryer-switcher__choice { padding: 8px 7px; gap: 5px; }
  .saryer-switcher__flag { font-size: 18px; }
  .saryer-switcher__check { font-size: 11px; }
}
@media (min-width: 640px) {
  .saryer-switcher { padding: 14px; }
  .saryer-switcher--compact { padding: 8px; }
  .saryer-switcher--floating { max-width: 340px; }
  .saryer-switcher--bottom-right { right: max(22px, env(safe-area-inset-right, 0px)); bottom: max(22px, env(safe-area-inset-bottom, 0px)); }
  .saryer-switcher--bottom-left { left: max(22px, env(safe-area-inset-left, 0px)); bottom: max(22px, env(safe-area-inset-bottom, 0px)); }
  .saryer-switcher--top-right { right: max(22px, env(safe-area-inset-right, 0px)); top: max(22px, env(safe-area-inset-top, 0px)); }
  .saryer-switcher--top-left { left: max(22px, env(safe-area-inset-left, 0px)); top: max(22px, env(safe-area-inset-top, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .saryer-switcher button.saryer-switcher__choice { transition: none; }
  .saryer-switcher button.saryer-switcher__choice:active { transform: none; }
}
@media (forced-colors: active) {
  .saryer-switcher,
  .saryer-switcher__choices,
  .saryer-switcher__readout { border: 1px solid CanvasText; forced-color-adjust: auto; }
  .saryer-switcher button.saryer-switcher__choice { border: 1px solid ButtonText; }
  .saryer-switcher button.saryer-switcher__choice[aria-pressed="true"] { background: Highlight; color: HighlightText; border-color: Highlight; box-shadow: none; }
  .saryer-switcher button.saryer-switcher__choice[aria-pressed="true"] .saryer-switcher__name { color: HighlightText; }
  .saryer-switcher button.saryer-switcher__choice:focus-visible { outline-color: Highlight; }
}

/* Existing order / checkout labeling styles remain independent of widget placement. */
.saryer-order-currency {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  max-width: 100%;
  margin: 12px 0;
  padding: 10px 12px;
  border-inline-start: 3px solid #155b8b;
  border-radius: 6px;
  background: #f1f6fa;
  color: #172a41;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.saryer-order-currency span { font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.saryer-checkout-currency th,
.saryer-checkout-currency td { overflow-wrap: anywhere; }
.saryer-checkout-currency td strong { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
@media (max-width: 480px) {
  .saryer-order-currency { padding: 8px 10px; margin-block: 8px; }
  .saryer-checkout-currency th,
  .saryer-checkout-currency td { font-size: 13px; }
}

/* Base-currency checkout retains native charge amounts while showing a
   clearly labeled, optional estimate in the shopper's selected currency. */
.saryer-cart-estimate {
  display: block;
  color: var(--saryer-fg, #364152);
  font-size: .83em;
  font-weight: 600;
  line-height: 1.5;
  margin-block-start: .2em;
  overflow-wrap: anywhere;
}
.saryer-cart-estimate .woocommerce-Price-amount { white-space: nowrap; }
.saryer-cart-estimate__mark { font-weight: 700; }
.saryer-cart-estimate small { font-size: .88em; font-weight: 400; }
.saryer-mini-cart-preview { margin: .5em 0 .15em; font-size: .92em; }
.saryer-mini-cart-preview .saryer-cart-estimate { display: inline-block; }
.saryer-mini-cart-charge { margin: 0 0 .75em; font-size: .82em; opacity: .85; }
.saryer-preview-total th, .saryer-preview-total td { vertical-align: middle; }
.saryer-preview-total td .saryer-cart-estimate { margin-block-start: 0; }
