/* Main Container - Holds the button and dropdown */
.language-switcher-dropdown {
  position: relative;
  /* For absolute positioning of dropdown */
  display: inline-block;
  /* Inline with other navbar elements */
  margin-left: 15px;
  /* Space from previous element */
  z-index: 1000;
  /* Above other elements */
  vertical-align: top;
  /* Align with other navbar items */
}

/* Main Language Button - Shows Current Language */
.language-btn {
  display: flex;
  /* Flexbox for flag + text alignment */
  align-items: center;
  /* Center items vertically */
  gap: 10px;
  /* Space between flag and text */
  background: transparent;
  /* No background - clean look */
  border: none;
  /* No border - minimal design */
  padding: 10px 14px;
  /* Internal spacing */
  color: #333333;
  /* Dark text color */
  font-size: 14px;
  /* Readable font size */
  font-weight: 500;
  /* Medium font weight */
  cursor: pointer;
  /* Hand cursor on hover */
  transition: all 0.3s ease;
  /* Smooth transitions */
  outline: none;
  /* Remove focus outline */
  height: 46px;
  /* Fixed height for consistency */
}

.language-btn:hover {
  background: transparent;
}

.language-btn:active {
  background: transparent;
}

/* Flag Image - National flag display */
.flag-img {
  width: 32px;
  /* Flag width - fully visible */
  height: 24px;
  /* Flag height - proper proportions */
  object-fit: contain;
  /* Show entire flag without cropping */
  display: block;
  /* Block display for proper sizing */
  flex-shrink: 0;
  /* Prevent flag from shrinking */
}

/* Language Text - Shows GER or ENG */
.language-text {
  font-size: 14px;
  /* Consistent with button text */
  font-weight: 600;
  /* Bold for emphasis */
  letter-spacing: 0.5px;
  /* Better readability */
  color: #333333;
  /* Dark text color */
  min-width: 30px;
  /* Consistent width for alignment */
  text-align: center;
  /* Center text in allocated space */
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
  color: #333333;
  font-weight: bold;
  line-height: 1;
}

/* =========================================== */
/* DROPDOWN MENU - Language Options */
/* =========================================== */

/* Main Dropdown Container - Hidden by default */
.language-dropdown-menu {
  position: absolute;
  /* Position relative to button */
  top: calc(100% + 8px);
  /* 8px below the button */
  left: 0;
  /* Align with button left edge */
  right: 0;
  /* Same width as button */
  background: #ffffff;
  /* White background */
  border-radius: 8px;
  /* Rounded corners */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  /* Subtle shadow */
  opacity: 0;
  /* Hidden by default */
  visibility: hidden;
  /* Not visible initially */
  transform: translateY(-10px);
  /* Start slightly above */
  transition: all 0.3s ease;
  /* Smooth animation */
  overflow: hidden;
  /* Hide overflow content */
  min-width: 140px;
  /* Minimum width for content */
  border: 1px solid rgba(0, 0, 0, 0.1);
  /* Light border */
  z-index: 1001;
  /* Above other elements */
}

.language-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #333333;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background-color: #f8f9fa;
}

.language-option .flag-img {
  width: 32px;
  height: 24px;
}

.option-text {
  color: #333333;
  font-size: 14px;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 991px) {
  .language-switcher-dropdown {
    margin-left: 15px;
  }

  .language-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .language-text {
    font-size: 12px;
  }

  .flag-img {
    width: 26px;
    height: 20px;
  }
}

@media (max-width: 768px) {
  .language-switcher-dropdown {
    position: absolute;
    top: 15px;
    right: 60px;
  }

  .language-btn {
    border-color: rgba(255, 255, 255, 0.3);
    padding: 8px 10px;
  }
}

@media (max-width: 576px) {
  .language-switcher-dropdown {
    right: 50px;
    top: 12px;
  }

  .language-text {
    display: none;
  }

  .language-btn {
    padding: 8px;
    gap: 4px;
  }

  .language-dropdown-menu {
    right: 0;
    left: auto;
    min-width: 120px;
  }
}

/* Animation for smooth opening */
.language-dropdown-menu {
  transform-origin: top center;
}

/* Focus styles for accessibility */
.language-btn:focus {
  outline: none;
}

.language-option:focus {
  background-color: #e9ecef;
  outline: none;
}

/* Custom scrollbar for dropdown if needed */
.language-dropdown-menu::-webkit-scrollbar {
  width: 4px;
}

.language-dropdown-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.language-dropdown-menu::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

.language-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
