/*---------------------------------------
  LANGUAGE SWITCHER STYLES               
-----------------------------------------*/

.language-switcher {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 10px;
  visibility: visible !important;
  opacity: 1 !important;
}

.language-switcher-btn {
  background-color: #667eea !important;
  border: 2px solid #667eea !important;
  color: white !important;
  padding: 8px 15px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 5px !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
  min-width: 120px !important;
  height: auto !important;
  line-height: 1.5 !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1049 !important;
}

.language-switcher-btn:hover {
  background-color: #5568d3 !important;
  border-color: #5568d3 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

.language-switcher-btn:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25) !important;
}

.language-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 2px solid #667eea;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  z-index: 1050;
  display: none;
  overflow: hidden;
  animation: slideDown 0.3s ease;
}

.language-switcher-dropdown.active {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: white;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background: #f8f9fa;
  color: #667eea;
  padding-left: 20px;
}

.language-option.active {
  background: #667eea;
  color: white;
  font-weight: 600;
}

.language-option-icon {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 30px;
  text-align: center;
}

.language-option-text {
  display: flex;
  flex-direction: column;
}

.language-option-name {
  font-weight: 600;
  color: inherit;
}

.language-option-local {
  font-size: 12px;
  opacity: 0.7;
}

/* Mobile Responsive */
@media screen and (max-width: 991px) {
  .language-switcher {
    margin: 0 5px;
  }

  .language-switcher-btn {
    padding: 6px 12px !important;
    font-size: 13px !important;
    min-width: 100px !important;
  }

  .language-option {
    padding: 10px 14px;
    font-size: 13px;
  }

  .language-switcher-dropdown {
    min-width: 150px;
  }
}

@media screen and (max-width: 576px) {
  .language-switcher {
    margin: 0;
  }

  .language-switcher-btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
    min-width: 90px !important;
  }

  .language-option {
    padding: 8px 12px;
    font-size: 12px;
  }

  .language-switcher-dropdown {
    min-width: 140px;
    right: -20px;
  }
}

/* Ensure button is visible */
.nav-item .language-switcher {
  display: flex !important;
  align-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.nav-item .language-switcher-btn {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  appearance: button !important;
}

/* Critical overrides for navbar items */
.navbar-nav .nav-item .language-switcher {
  display: flex !important;
}

.navbar-nav .language-switcher-btn {
  appearance: button !important;
  background: #667eea !important;
  border: 2px solid #667eea !important;
  color: white !important;
  padding: 8px 15px !important;
  border-radius: 5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

