/* ==========================================================
   Language switcher dropdown - Sympatisk
   Add this at the END of public/css/mobile-readable.css
   (or load it as its own file after Bootstrap).

   Requires one class on the dropdown wrapper: .lang-switcher
   and Bootstrap's .dropdown-menu-end on the <ul class="dropdown-menu">
   ========================================================== */

.lang-switcher {
  --lang-green: #1f4d3a;          /* matches the header icons - adjust if needed */
  --lang-green-soft: #eaf2ed;     /* active item background */
  --lang-green-hover: #f4f8f5;    /* hover background */
  --lang-border: rgba(31, 77, 58, 0.14);
}

/* ---- The menu panel ---- */
.lang-switcher .dropdown-menu {
  min-width: 200px;
  padding: 6px;
  margin-top: 12px !important;
  background: #fff;
  border: 1px solid var(--lang-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(20, 50, 36, 0.16),
              0 2px 6px rgba(20, 50, 36, 0.08);
  right: 0;
  left: auto;
  animation: langMenuIn 0.16s ease-out;
}

/* Small pointer arrow towards the globe icon */
.lang-switcher .dropdown-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 14px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid var(--lang-border);
  border-left: 1px solid var(--lang-border);
  transform: rotate(45deg);
}

/* ---- Items ---- */
.lang-switcher .dropdown-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;                /* comfortable tap target on mobile */
  padding: 10px 40px 10px 12px;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 500;
  color: #2b3a33;
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switcher .dropdown-item + .dropdown-item {
  margin-top: 2px;
}

.lang-switcher .dropdown-item:hover,
.lang-switcher .dropdown-item:focus {
  background: var(--lang-green-hover);
  color: var(--lang-green);
}

/* Active language: soft green instead of Bootstrap blue, plus a check mark */
.lang-switcher .dropdown-item.active,
.lang-switcher .dropdown-item:active {
  background: var(--lang-green-soft);
  color: var(--lang-green);
  font-weight: 600;
}

.lang-switcher .dropdown-item.active::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--lang-green);
  border-bottom: 2px solid var(--lang-green);
  transform: translateY(-65%) rotate(45deg);
}

/* ---- Optional: language code badge ----
   If you change the markup to:
   <a class="dropdown-item" href="...">
     <span class="lang-code">CZ</span><span class="lang-name">Česky</span>
   </a>
   the code shows as a small pill. Plain "CZ - Česky" text works too. */
.lang-switcher .lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(31, 77, 58, 0.09);
  color: var(--lang-green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switcher .dropdown-item.active .lang-code {
  background: var(--lang-green);
  color: #fff;
}

/* Keyboard focus */
.lang-switcher .dropdown-item:focus-visible {
  outline: 2px solid var(--lang-green);
  outline-offset: -2px;
}

@keyframes langMenuIn {
  from { opacity: 0; translate: 0 -6px; }
  to   { opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lang-switcher .dropdown-menu { animation: none; }
}

/* Shop markup uses one list item per language. */
.lang-switcher .dropdown-menu > li + li { margin-top: 2px; }
.lang-switcher .lang-name { white-space: nowrap; }
/* Mobile globe sits at the left edge: open into the viewport. */
@media (max-width: 991.98px) {
  .shop-mobile-nav-language.lang-switcher .dropdown-menu { left: 0; right: auto; }
  .shop-mobile-nav-language.lang-switcher .dropdown-menu::before { left: 17px; right: auto; }
}
