/* Language Dropdown Globe Styles */
.language-dropdown {
  position: relative;
  display: inline-block;
  margin-top: 0;
  z-index: 99999;
}

/* Header Icons Positioning */
.header-icons-right {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 0px;
  position: relative;
  z-index: 99999;
}

.header-icons-right .flags,
.header-icons-right .login {
  margin-top: 0;
  position: relative;
  z-index: 99999;
  display: flex;
  align-items: flex-start;

}

/* Spezifische Ausrichtung für beide Icons */
.header-icons-right .flags .language-dropdown {
	margin-top: 0;
}

.header-icons-right .login {
	margin-top: 4px;
}

.header-icons-right .login img {
	vertical-align: middle;
	/* Natürliche Größe der Bilddatei verwenden */
	width: auto;
	height: auto;
}.language-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.language-toggle:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.language-toggle img {
  vertical-align: middle;
  width: 24px;
  height: 24px;
}

.dropdown-arrow {
  font-size: 12px;
  color: #6c757d;
  transition: transform 0.3s ease;
}

.language-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.language-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 99999 !important;
  display: none;
  margin-top: 2px;
  padding: 8px 0;
}

.language-dropdown.active .language-dropdown-menu {
  display: block;
}

.language-option {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f8f9fa;
  text-decoration: none;
  text-align: left;
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background-color: #f8f9fa;
  text-decoration: none;
}

/* Links füllen die komplette Schaltfläche aus - entfernt */

.language-option.active {
  background-color: #e3f2fd;
  font-weight: bold;
}

.language-option img {
  width: 20px;
  height: 14px;
  margin-right: 8px;
  flex-shrink: 0;
}

.lang-text {
  color: #495057;
  font-size: 14px;
  flex-grow: 1;
}

.language-option.active .lang-text {
  color: #1976d2;
}

/* Spans auch vollständig klickbar machen */
.language-option span {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  padding: 10px 15px !important;
  margin: 0 !important;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.language-option a:hover,
.language-option span:hover {
  text-decoration: none !important;
  background-color: #f8f9fa !important;
}

/* Zurück zur ursprünglichen, funktionierenden Lösung */
.language-option a,
.language-option span {
  text-decoration: none;
  color: inherit;
  display: contents;
}

.language-option a:hover,
.language-option span:hover {
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .language-dropdown-menu {
    right: auto;
    left: 0;
    min-width: 180px;
  }
  
  .language-option {
    padding: 8px 12px;
  }
  
  .lang-text {
    font-size: 13px;
  }
}

/* Spezifische Überschreibung für SmartMenus und andere Navigation */
.language-dropdown,
.language-dropdown-menu {
  z-index: 99999 !important;
}

/* Sicherstellen, dass das Dropdown über allen Menüs liegt */
.header-icons-right .language-dropdown {
  z-index: 99999 !important;
  position: relative;
}

.header-icons-right .language-dropdown-menu {
  z-index: 99999 !important;
}

/* Legacy compatibility */
.language-globe-container {
  position: relative;
  display: inline-block;
}

.language-globe-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.language-globe-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
}

.language-dropdown-flag {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.language-dropdown-flag:hover {
  background: #f0f0f0;
}

.language-dropdown-flag img {
  width: 24px;
  height: 16px;
  margin-right: 8px;
  border-radius: 2px;
}

/* Sehr spezifische Regel für leere Elemente */
.language-dropdown-menu .language-option:not(:has(img)):not(:has([href])) {
  display: none !important;
}
