/**
 * Language Switcher for Bentol Navbar Two
 * Modern dropdown language switcher with flags integrated into header
 * Based on original language-switcher-module styles
 */

/* ================================
   LANGUAGE SWITCHER IN NAVBAR TWO
   ================================ */

.navbar-two-language-switcher {
  position: relative;
  display: inline-block;
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 3px;
  padding: 8px 12px;
  background: var(--secondary-color, #c9302c);
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.language-toggle:hover {
  background: #b52628ff;
}

.language-flag {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: contain;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.language-name {
  font-size: 12px;
  font-weight: 500;
  color: white;
}

.dropdown-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  color: white;
}

.navbar-two-language-switcher.open .dropdown-arrow {
  transform: rotate(180deg);
}

.language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-radius: 3px;
  background: var(--secondary-color, #c9302c);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  margin-top: 4px;
}

.navbar-two-language-switcher.open .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-options {
  list-style: none;
  margin: 0;
  padding: 4px;
}

.language-item {
  margin: 0;
  padding-left: 0px !important;
}

.language-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: white;
  text-decoration: none;
  transition: background 0.2s;
  font-size: 12px;
  font-weight: 500;
  border-radius: 2px;
}

.language-link:hover {
  background: #b52628ff;
}

.language-link.active {
  background: rgba(0, 0, 0, 0.2);
}

/* ================================
   MOBILE RESPONSIVE
   ================================ */

@media (max-width: 991px) {
  .navbar-two-language-switcher {
    margin: 15px 0;
    width: 100%;
  }

  .language-toggle {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }

  .language-dropdown {
    left: 0;
    right: 0;
  }
}

@media (max-width: 767px) {
  .language-name {
    font-size: 11px;
  }

  .language-flag {
    width: 18px;
    height: 13.5px;
  }

  .language-toggle {
    padding: 8px 12px;
  }
}

/* ================================
   STICKY HEADER VARIATIONS
   ================================ */

.header-sticky .navbar-two-language-switcher .language-toggle {
  background: var(--secondary-color, #c9302c);
}

.header-sticky .navbar-two-language-switcher .language-toggle:hover {
  background: #b52628ff;
}

/* ================================
   NAVBAR SPECIFIC ADJUSTMENTS
   ================================ */

.navbar-two-language-switcher + .sidebar-icon {
  margin-left: 15px;
}

/* ================================
   ALTERNATIVE LAYOUT OPTIONS
   ================================ */

/* Compact version - flag only */
.navbar-two-language-switcher.hide-name .language-name {
  display: none;
}

.navbar-two-language-switcher.hide-name .language-toggle {
  padding: 8px;
}

/* Icon only version */
.navbar-two-language-switcher.hide-flag .language-flag {
  display: none;
}

.navbar-two-language-switcher.hide-flag.hide-name .language-toggle {
  padding: 8px 12px;
  gap: 4px;
}

/* ================================
   ACCESSIBILITY & INTERACTIONS
   ================================ */

.language-toggle:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.language-link:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .language-toggle {
    border: 1px solid rgba(255, 255, 255, 0.5);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .language-toggle,
  .language-dropdown,
  .dropdown-arrow,
  .language-link {
    transition: none;
  }
}
