/* Language Toggle Styles */
.language-toggle {
  position: relative;
  margin-left: 0.5rem;
}

.language-toggle-btn {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.5rem 0.75rem;
  color: #000;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-align: right;
}

.language-toggle-btn:hover,
.language-toggle-btn.active {
  background-color: rgba(0, 0, 0, 0.05);
}

.flag-icon {
  width: 24px;
  height: 16px;
  margin-right: 0.5rem;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.language-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 1rem;
  color: #333;
  transition: all 0.2s ease;
  text-align: right;
}

.language-option:hover {
  background-color: #f5f5f5;
}

.language-name {
  margin-left: 0.75rem;
  font-weight: 500;
}

/* Language change transition effect */
.language-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(33, 33, 33, 0.97);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

.language-transition-overlay.active {
  opacity: 1;
  visibility: visible;
}

.transition-flag {
  width: 120px;
  height: 80px;
  animation: flagPulse 0.8s ease-in-out;
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes flagPulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* Responsive styles */
@media (max-width: 991.98px) {
  .language-toggle {
    width: 100%;
  }
  
  .language-toggle-btn {
    padding: 0.5rem;
    width: 100%;
    text-align: right;
    justify-content: flex-end;
  }
  
  .language-dropdown {
    right: 0;
    width: 100%;
  }
  
  .language-option {
    justify-content: flex-end;
    text-align: right;
  }
}