/* Shared with lang-dropdown.js — see that file for context. Turns the plain .lang-switch/.lang-btn row on
   the standalone pages into a compact dropdown (trigger button with the current short code + chevron,
   opening a small panel). Uses logical (inset-inline-*) properties so it mirrors correctly for Hebrew
   (dir="rtl") without a separate override. Kept self-contained (does not depend on motion-overrides.css,
   which these pages do not otherwise load) so it works the same on both the light pages (pricing, refund)
   and the dark pages (samples, faq, accessibility). */
.lang-dropdown-wrap { position: relative; display: inline-block; }
/* On the standalone pages' header row (.pricing-head), if the row wraps at a narrow width, keep the
   trigger aligned to the end of its own line (next to where the back link is) instead of the flex
   default of snapping a lone wrapped item to the line's start. */
.pricing-head .lang-dropdown-wrap { margin-inline-start: auto; }

.lang-dropdown-wrap .lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 14px;
  background: #fff;
  color: #1d1a3a;
  font: 700 13px/1 Rubik, Inter, sans-serif;
  cursor: pointer;
}
.lang-dropdown-wrap .lang-trigger:hover { filter: brightness(0.97); }
.lang-dropdown-wrap .lang-trigger svg { flex: none; transition: transform 0.15s; }
.lang-dropdown-wrap .lang-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.lang-dropdown-wrap .lang-trigger-code { text-transform: uppercase; }

.lang-dropdown-wrap .lang-switch {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 168px;
  max-width: calc(100vw - 24px);
  max-height: min(70vh, 360px);
  overflow-y: auto;
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}
.lang-dropdown-wrap .lang-switch[hidden] { display: none; }
.lang-dropdown-wrap .lang-switch .lang-btn {
  width: 100%;
  justify-content: flex-start;
  text-align: start;
}
.lang-dropdown-wrap .lang-switch .lang-btn[aria-selected="true"] {
  outline: 2px solid var(--blue, #2f5bea);
  outline-offset: -2px;
}
.lang-dropdown-wrap .lang-switch :focus-visible { outline: 2px solid #f4c542; outline-offset: 2px; }

/* faq.html / accessibility.html / refund.html share the dark theme via body.dark-page; samples.html uses
   its own body.samples-page class for the same dark look. Match the trigger and panel to it instead of
   leaving the light-theme white panel on a dark page. */
body.dark-page .lang-dropdown-wrap .lang-trigger,
body.samples-page .lang-dropdown-wrap .lang-trigger {
  background: #0d2a56;
  border-color: #1c3d73;
  color: #e8eeff;
}
body.dark-page .lang-dropdown-wrap .lang-switch,
body.samples-page .lang-dropdown-wrap .lang-switch {
  background: #0d2a56;
  border-color: #1c3d73;
  box-shadow: 0 16px 40px rgba(2, 16, 42, 0.55);
}
