.language-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.language-switcher__current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.language-switcher__current svg {
  transition: transform 0.3s ease;
}

.language-switcher__current:hover {
  border-color: #f6c641;
  background: rgba(246, 198, 65, 0.05);
}

.language-switcher__current.active {
  border-color: #f6c641;
  background: rgba(246, 198, 65, 0.1);
}

.language-switcher__current.active svg {
  transform: rotate(180deg);
}

.language-switcher__name {
  font-size: 14px;
  font-weight: 500;
}

.language-switcher__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 8px;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.language-switcher__dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-switcher__dropdown li {
  list-style: none;
}

.language-switcher__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  color: #1a1a1a;
  text-decoration: none;
  transition: all 0.2s ease;
}

.language-switcher__link:hover {
  background: rgba(246, 198, 65, 0.1);
  color: #1a1a1a;
}

.language-switcher__link .language-switcher__name {
  flex: 1;
  font-weight: 400;
}

body.farmer-page .language-switcher__current,
body.provider-page .language-switcher__current {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.15);
}

@media (min-width: 1101px) {
  body.farmer-page .language-switcher__current:hover,
  body.provider-page .language-switcher__current:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.25);
  }

  body.farmer-page .language-switcher__current.active,
  body.provider-page .language-switcher__current.active {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.3);
  }
}

/* Hide language menu items on desktop */
@media (min-width: 1101px) {
  .menu__item--language-divider,
  .menu__item--language {
    display: none !important;
  }
}

/* Show language menu items on mobile */
@media (max-width: 1100px) {
  .language-switcher {
    display: none !important;
  }

  /* Show footer language switcher on mobile */
  .footer__language-switcher .language-switcher {
    display: flex !important;
  }

  .menu__item--language-divider {
    margin-top: 20px !important;
    margin-bottom: 12px !important;
  }

  .menu__divider {
    display: block;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
  }

  .menu__item--language {
    margin-top: 0 !important;
  }

  .menu__item--language + .menu__item--language {
    margin-top: 8px !important;
  }

  .menu__item--language.active .menu__link {
    color: #f6c641;
    font-weight: 500;
  }

  .menu__item--language .menu__link {
    font-size: 16px;
    font-weight: 400;
  }
}

/* Footer language switcher styles */
.footer__language-switcher {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.language-switcher--footer {
  position: relative;
}

.language-switcher--footer .language-switcher__current {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.language-switcher--footer .language-switcher__current:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.language-switcher--footer .language-switcher__current.active {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.language-switcher--footer .language-switcher__dropdown {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  right: 0;
  left: auto;
  min-width: 180px;
  top: auto;
  bottom: calc(100% + 8px);
}

.language-switcher--footer .language-switcher__link {
  color: #1a1a1a;
  padding: 10px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.language-switcher--footer .language-switcher__link:hover {
  background: rgba(246, 198, 65, 0.1);
  color: #1a1a1a;
}

.language-switcher__flag {
  font-size: 16px;
  line-height: 1;
  margin-right: 8px;
}

/* Mobile styles for footer language switcher */
@media (max-width: 768px) {
  .footer__language-switcher {
    justify-content: center;
    margin-top: 15px;
  }
  
  .language-switcher--footer .language-switcher__current {
    font-size: 13px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #1a1a1a;
    backdrop-filter: none;
  }
  
  .language-switcher--footer .language-switcher__current:hover {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.3);
  }
  
  .language-switcher--footer .language-switcher__current.active {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.4);
  }
  
  .language-switcher--footer .language-switcher__dropdown {
    min-width: 160px;
  }
}


