/**
 * Language Switcher Styles
 * Matches the header navigation dropdown style
 */

/* Language select container - matches menu-item-has-children */
.cs_language_select {
  position: relative;
}

/* Main language link - matches nav links */
.cs_lang_link {
  display: inline-flex;
  position: relative;
  height: inherit;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
  transition: color 0.3s ease;
  padding-right: 16px;
}

.cs_lang_link:hover {
  color: inherit;
  opacity: 0.8;
}

/* Dropdown arrow - matches menu-item-has-children arrow */
.cs_lang_link::before {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-size: 10px;
  font-weight: 900;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Language dropdown - matches nav dropdown */
.cs_lang_dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: none;
}

/* Let the default menu dropdown toggle styles handle the + icon */

/* Mobile styles - let default menu behavior handle most of it */
@media (max-width: 1199px) {
  /* Hide desktop arrow */
  .cs_lang_link::before {
    display: none;
  }
  
  /* Style the dropdown for mobile */
  .cs_lang_dropdown {
    position: static;
    box-shadow: none;
    background: transparent;
    min-width: auto;
    padding-left: 0;
    margin-left: 0;
  }
  
  .cs_lang_dropdown li a {
    display: block;
    padding: 8px 0 8px 20px;
    color: inherit;
    text-decoration: none;
    font-size: inherit;
  }
  
  .cs_lang_dropdown li a:hover {
    opacity: 0.7;
  }
}
  list-style: none;
  margin: 0;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border-radius: 4px;
}

/* Show dropdown on hover */
.cs_language_select:hover .cs_lang_dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown items */
.cs_lang_dropdown li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs_lang_dropdown li a {
  display: block;
  padding: 10px 20px;
  color: #333333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cs_lang_dropdown li a:hover {
  background: #f5f5f5;
  color: #000000;
  padding-left: 25px;
}

/* Active language */
.cs_lang_dropdown li.active a {
  background: #f8f9fa;
  font-weight: 600;
  color: #000000;
}

/* Transition Animation */
body.language-transitioning {
  position: relative;
}

body.language-transitioning::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.3);
  opacity: 0;
  animation: fadeInOut 0.3s ease;
  pointer-events: none;
  z-index: 9999;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* Responsive Styles */
@media (max-width: 991px) {
  .cs_lang_dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin-top: 10px;
  }

  .cs_lang_dropdown li a {
    padding: 8px 15px;
    color: inherit;
  }

  .cs_lang_dropdown li a:hover {
    padding-left: 20px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

  .cs_lang_link,
  .cs_lang_dropdown,
  .cs_lang_dropdown li a {
    transition: none;
  }

  body.language-transitioning::after {
    animation: none;
  }
}