/* TR / EN dropdown — bayrak + kod + chevron */
.locale-switcher {
  position: relative;
  flex-shrink: 0;
  z-index: 40;
}

.locale-switcher__trigger {
  display: inline-flex;
  list-style: none;
  cursor: pointer;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #131a22;
  color: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.locale-switcher__trigger::-webkit-details-marker {
  display: none;
}

.locale-switcher__trigger:hover,
.locale-switcher[open] > .locale-switcher__trigger {
  border-color: rgba(255, 255, 255, 0.16);
  background: #18222c;
  color: #fff;
}

.locale-switcher__flag {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.locale-switcher__flag-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.locale-switcher__code {
  line-height: 1;
  min-width: 1.25rem;
}

.locale-switcher__chevron {
  width: 0.75rem;
  height: 0.75rem;
  color: rgba(241, 245, 249, 0.7);
  transition: transform 0.2s ease, color 0.15s ease;
}

.locale-switcher[open] .locale-switcher__chevron {
  transform: rotate(180deg);
  color: #fff;
}

.locale-switcher__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 50;
  min-width: 8.5rem;
  overflow: hidden;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #131a22;
  padding: 0.3rem;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.55);
}

.locale-switcher--footer .locale-switcher__menu {
  right: auto;
  left: 0;
}

.locale-switcher__option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.55rem;
  border: none;
  border-radius: 0.65rem;
  background: transparent;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.locale-switcher__option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

.locale-switcher__option[aria-pressed="true"] {
  background: rgba(0, 255, 134, 0.12) !important;
  color: #f1f5f9 !important;
}

.locale-switcher__option[aria-pressed="false"] {
  color: #94a3b8 !important;
}

@media (min-width: 1280px) {
  .locale-switcher__trigger {
    min-height: 2.5rem;
    padding: 0.4rem 0.75rem 0.4rem 0.45rem;
    font-size: 0.8125rem;
  }
}

[data-theme="light"] .locale-switcher__trigger {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

[data-theme="light"] .locale-switcher__trigger:hover,
[data-theme="light"] .locale-switcher[open] > .locale-switcher__trigger {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

[data-theme="light"] .locale-switcher__chevron {
  color: #64748b;
}

[data-theme="light"] .locale-switcher__menu {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 16px 40px -16px rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .locale-switcher__option {
  color: #64748b;
}

[data-theme="light"] .locale-switcher__option:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .locale-switcher__option[aria-pressed="true"] {
  background: rgba(21, 148, 91, 0.12) !important;
  color: #0f172a !important;
}
