.header .language-selector {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
}

.header .language-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: none;
  transform: none;
}

.header .language-toggle:hover,
.header .language-toggle[aria-expanded="true"] {
  border: none;
  box-shadow: none;
  transform: none;
}

.csl-language-toggle__content {
  display: flex;
  align-items: center;
  gap: 6px;
}

.csl-language-toggle__copy strong {
  color: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.csl-language-toggle__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  line-height: 1;
  transition: transform 0.2s ease;
}

.csl-language-toggle__chevron svg {
  width: 10px;
  height: 7px;
}

.header .language-toggle[aria-expanded="true"] .csl-language-toggle__chevron {
  transform: rotate(180deg);
}

.header .language-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fafafa;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 1.5rem;
  box-sizing: border-box;
  z-index: 100;
  flex-direction: column;
  gap: 10px;
  text-align: right;
  min-width: 220px;
}

.header .language-dropdown.visible {
  display: flex;
}

.header .language-dropdown li {
  text-align: right;
}

.header .language-dropdown li a {
  text-decoration: none;
  display: block;
  width: 100%;
  color: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 0;
  background: none;
  border-radius: 0;
}

.header .language-dropdown li a:hover {
  color: var(--color-primary);
}

.csl-language-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row-reverse;
  gap: 10px;
}

.csl-language-option__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.csl-language-option__copy strong {
  color: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.csl-translation-flag--selector {
  width: 20px;
  height: 14px;
  border-radius: 3px;
}

@media (max-width: 991px) {
  .header .language-selector {
    padding: 0;
  }

  .header .language-dropdown {
    top: calc(100% + 25px);
  }
}
