/* FG Hair — language dropdown (header + sticky) */
.fg-lang-switch {
  position: relative;
  z-index: 120;
}

.fg-lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(5, 18, 41, 0.12);
  border-radius: 999px;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tj-color-heading-primary, #051229);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  line-height: 1.2;
}

/* Tıklama her zaman butona gitsin (Font Awesome SVG / shadow DOM sorunu) */
.fg-lang-switch__btn > * {
  pointer-events: none;
}

.fg-lang-switch__btn:hover {
  border-color: rgba(5, 18, 41, 0.22);
  box-shadow: 0 2px 10px rgba(5, 18, 41, 0.08);
}

.fg-lang-switch.is-open .fg-lang-switch__btn {
  border-color: rgba(5, 18, 41, 0.28);
  box-shadow: 0 2px 12px rgba(5, 18, 41, 0.1);
}

.fg-lang-switch__globe {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.5;
}

/* Emoji bayrak yerine tutarlı harf rozetleri (Windows’ta 🇬🇧 → "GB" hatası olmaz) */
.fg-lang-switch__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
}

.fg-lang-switch__badge--tr {
  background: #e30a17;
}

.fg-lang-switch__badge--en {
  background: #012169;
}

.fg-lang-switch__badge--ar {
  background: #165b33;
}

.fg-lang-switch__badge--drawer {
  min-width: 2.5rem;
  height: 1.75rem;
  font-size: 0.75rem;
  border-radius: 8px;
}

.fg-lang-switch__caret {
  font-size: 0.5rem;
  opacity: 0.55;
  margin-inline-start: 0.1rem;
  transition: transform 0.2s ease;
}

.fg-lang-switch.is-open .fg-lang-switch__caret {
  transform: rotate(180deg);
}

.fg-lang-switch__list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 0.4rem);
  min-width: 12rem;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(5, 18, 41, 0.1);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(5, 18, 41, 0.14);
  display: none;
}

.fg-lang-switch.is-open .fg-lang-switch__list {
  display: block;
}

.fg-lang-switch__item {
  margin: 0;
  padding: 0;
}

.fg-lang-switch__opt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: start;
  cursor: pointer;
  transition: background 0.15s ease;
}

a.fg-lang-switch__opt:hover,
button.fg-lang-switch__opt:hover {
  background: rgba(5, 18, 41, 0.06);
}

.fg-lang-switch__opt.is-active {
  background: rgba(5, 18, 41, 0.08);
  font-weight: 600;
  cursor: default;
}

.fg-lang-switch__opt .fg-lang-switch__badge {
  flex-shrink: 0;
}

.fg-lang-switch__opt .fg-lang-switch__label {
  flex: 1;
}

.fg-lang-switch__opt .fg-lang-switch__check {
  font-size: 0.75rem;
  color: var(--tj-color-theme-primary, #c9a227);
  opacity: 0;
}

.fg-lang-switch__opt.is-active .fg-lang-switch__check {
  opacity: 1;
}

/* Header: show language on all breakpoints; tighten on very small screens */
.header_right_info .fg-lang-switch__btn {
  padding: 0.38rem 0.55rem;
}

@media (max-width: 380px) {
  .fg-lang-switch__globe {
    display: none;
  }
}

/* Hamburger drawer — dark panel, large touch targets */
.fg-lang-switch--drawer {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.fg-lang-switch__drawer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.fg-lang-switch__drawer-opt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(247, 247, 247, 0.1);
  color: var(--tj-color-common-white, #fff);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

a.fg-lang-switch__drawer-opt:hover {
  background: rgba(247, 247, 247, 0.18);
  color: var(--tj-color-theme-primary, #c9a227);
}

.fg-lang-switch__drawer-opt.is-active {
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.12);
  cursor: default;
}

.fg-lang-switch__drawer-label {
  flex: 1;
}

/* No stray divider after language when phone + CTA are hidden (mobile) */
@media (max-width: 767px) {
  .tj-header-area.header-9 .header_right_info > *:first-child::after {
    display: none;
  }
}
