/* Etzean Internationalisierung CSS */
/* =============================== */

/* Sprachauswahl in Navigation */
.navbar .lang-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0;
}

.navbar .lang-btn:hover {
  background-color: #f8f9fa;
}

.navbar .lang-btn.active {
  background-color: #e9ecef;
  border-left: 3px solid #4CAF50;
  font-weight: bold;
}

/* Entferne alte separate Sprachauswahl */
.language-selector {
  display: none;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .navbar .lang-btn {
    padding: 0.75rem 1rem;
  }
}

/* Animation für Sprachwechsel */
[data-i18n] {
  transition: opacity 0.2s ease;
}

[data-i18n].translating {
  opacity: 0.7;
}

/* Tooltip für Sprach-Buttons */
.lang-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10001;
  margin-bottom: 4px;
}

/* Sprachauswahl in Footer */
.footer-language-selector {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 10px;
}

.footer-language-selector .lang-btn {
  font-size: 16px;
  min-width: 28px;
  padding: 3px 6px;
}

/* Loading-Indikator für Übersetzungen */
.translation-loading {
  position: relative;
}

.translation-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
}

.translation-loading::before {
  content: 'Übersetze...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: #666;
  z-index: 1;
}

/* Sprachauswahl für mobile Geräte */
.mobile-language-selector {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10000;
}

.mobile-language-selector .lang-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .language-selector {
    background: rgba(30, 30, 30, 0.95);
    border-bottom-color: rgba(255,255,255,0.1);
  }
  
  .lang-btn {
    background: rgba(50, 50, 50, 0.95);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .lang-btn:hover {
    background: rgba(70, 70, 70, 1);
    border-color: #4CAF50;
  }
  
  .lang-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
  }
}

/* Accessibility */
.lang-btn:focus {
  outline: 2px solid #4CAF50;
  outline-offset: 2px;
}

.lang-btn:focus:not(:focus-visible) {
  outline: none;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .language-selector {
    background: white;
    border-bottom: 2px solid black;
  }
  
  .lang-btn {
    background: white;
    border: 2px solid black;
    color: black;
  }
  
  .lang-btn.active {
    background: black;
    color: white;
    border-color: black;
  }
}

