/* ===================================================
   POLYLANG — Language Switcher Styles
   Iran Decor Hookah Theme
   Both FA and AR are RTL — no direction overrides needed.
   =================================================== */

/* ---------- Language Switcher (Desktop) ---------- */
.idh-lang-switch {
  position: relative;
  display: flex;
  align-items: center;
}

.idh-lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--line);
  color: var(--smoke);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: border-color 0.25s, color 0.25s;
  white-space: nowrap;
}

.idh-lang-btn:hover {
  border-color: var(--ember);
  color: var(--ember-bright);
}

.idh-lang-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.idh-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 9999;
  overflow: hidden;
  list-style: none;
  padding: 0;
  margin: 0;
}

.idh-lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Polylang outputs <ul><li><a>...</a></li></ul> */
.idh-lang-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.idh-lang-dropdown li {
  margin: 0;
  padding: 0;
}

.idh-lang-dropdown li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--smoke-dim);
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s;
  font-family: var(--font-body);
}

.idh-lang-dropdown li a:hover {
  background: rgba(185, 154, 100, 0.1);
  color: var(--smoke);
}

.idh-lang-dropdown li.current-lang a {
  color: var(--ember);
  font-weight: 600;
}

/* Flag images from Polylang (if enabled) */
.idh-lang-dropdown li a img {
  width: 20px;
  height: auto;
  border-radius: 2px;
}


/* ---------- Mobile: lang switch in mobile nav ---------- */
.idh-lang-switch-mobile {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}

.idh-lang-switch-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
}

.idh-lang-switch-mobile li a {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--smoke-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.idh-lang-switch-mobile li a:hover,
.idh-lang-switch-mobile li.current-lang a {
  border-color: var(--ember);
  color: var(--ember);
}


/* ---------- Light pages: adjust switcher colors ---------- */
.page-light .idh-lang-btn {
  /* On light pages the header is still dark, so no override needed.
     But if you ever have a light header, uncomment these: */
  /* color: var(--bg-panel); border-color: rgba(0,0,0,.15); */
}
