/* ============================================================
   hl-url-switcher.css — URL Tabanlı Dil Değiştirici
   HorsLanguage WordPress Eklentisi
   Sitenizin header'ına wp_enqueue_style() ile ekleyin.
   ============================================================ */

/* ── Konteyner ───────────────────────────────── */
.hl-has-theme-switcher .hl-menu-item,
.hl-has-theme-switcher .hl-floating-switcher {
  display: none !important;
}

.hl-mobile-switcher {
  display: none;
}

.pxl-switch-language .pxl-item--language[data-hl-lang] {
  cursor: pointer;
}

.hl-url-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: inherit;
}

/* ── Tetikleyici Buton ───────────────────────── */
.hl-url-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: currentColor;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background .22s ease,
    border-color .22s ease,
    transform .18s ease;
  white-space: nowrap;
  line-height: 1;
}

.hl-url-switcher__btn:hover,
.hl-url-switcher__btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, .15);
  border-color: rgba(255, 255, 255, .4);
  transform: translateY(-1px);
}

/* ── Ok ──────────────────────────────────────── */
.hl-url-switcher__arrow {
  width: 10px;
  height: 6px;
  flex-shrink: 0;
  transition: transform .22s ease;
}

.hl-url-switcher__btn[aria-expanded="true"] .hl-url-switcher__arrow {
  transform: rotate(180deg);
}

/* ── Açılır Menü ─────────────────────────────── */
.hl-url-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9999;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(15, 15, 25, .97);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .45);

  /* pointer-events değil display kullanıyoruz:
     Tema JS'i menüyü görünür kılsa bile linkler tıklanabilir olsun. */
  display: none;
  transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  transition:
    opacity .2s ease,
    transform .2s ease;
  opacity: 0;
}

.hl-url-switcher__menu.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Tema CSS'i .hl-url-switcher__menu'yu override ederse bile
   linkler her zaman tıklanabilir kalır. */
.hl-url-switcher__option {
  pointer-events: auto !important;
}

/* ── Menü Öğeleri ────────────────────────────── */
.hl-url-switcher__option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: 9px;
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background .18s ease,
    color .18s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.hl-url-switcher__option:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.hl-url-switcher__option.is-active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-weight: 700;
}

/* RTL uyumu */
[dir="rtl"] .hl-url-switcher__menu {
  right: auto;
  left: 0;
  transform-origin: top left;
}

.hl-mobile-switcher .hl-url-switcher__menu {
  top: auto;
  right: 0;
  bottom: calc(100% + 8px);
  transform-origin: bottom right;
}

.hl-mobile-switcher.hl-mobile-rtl .hl-url-switcher__menu {
  right: auto;
  left: 0;
  transform-origin: bottom left;
}

.hl-mobile-switcher .hl-url-switcher__menu.is-open {
  transform: translateY(0) scale(1);
}

/* ── Ürün kartı beyaz overlay kaldır ────────────── */
.mh-cat-visual-wrap::after,
.mh-cat-visual-wrap::before,
.mh-cat-visual::after,
.mh-cat-visual::before {
  display: none !important;
  opacity: 0 !important;
  background: none !important;
}

/* Mobil */
@media (max-width: 1024px) {
  .hl-mobile-switcher {
    display: inline-flex;
    z-index: 999999 !important;
  }

  .hl-url-switcher__label {
    display: none;
  }
  .hl-url-switcher__btn {
    padding: 8px 10px;
  }
  .hl-mobile-switcher .hl-url-switcher__btn {
    min-width: 42px;
    min-height: 42px;
    justify-content: center;
    background: rgba(5, 24, 54, .92);
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  }
  .hl-url-switcher__menu {
    right: -6px;
    min-width: 130px;
  }
  .hl-mobile-switcher .hl-url-switcher__menu {
    min-width: 156px;
  }
}
