/* Language switch in the header (assets/js/i18n.js). Same flags and menu as
   the client sites' switch (storehub/public/css/language_switch.css). */

.lang-switch { position: relative; }

.lang-flag {
  display: block;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  /* Keeps the white stripe visible on a white background. */
  box-shadow: 0 0 0 1px var(--color-border);
  flex-shrink: 0;
}
.lang-flag[hidden] { display: none; }

.lang-switch-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  padding: 6px 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.lang-switch-menu[hidden] { display: none; }

.lang-switch-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.lang-switch-option:hover,
.lang-switch-option:focus-visible { background: var(--color-primary-50); outline: none; }
.lang-switch-option.is-current { font-weight: 600; }

/* Tick on the current language only */
.lang-switch-tick { margin-left: auto; color: var(--color-primary); visibility: hidden; }
.lang-switch-option.is-current .lang-switch-tick { visibility: visible; }
