/* Language Switcher Styles - Compact and Modern */
.language-switcher {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
}

.language-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 119, 200, 0.2);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0077C8;
  min-width: 2.5rem;
  justify-content: center;
  backdrop-filter: blur(10px);
  
}

.language-button:hover {
  background: #0077C8;
  color: white;
  border-color: #0077C8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 119, 200, 0.3);
}

.language-button:active {
  transform: translateY(0);
}

.language-button:focus {
  outline: none;
  ring: 2px;
  ring-color: rgba(0, 119, 200, 0.5);
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  width: 3rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  padding: 0.25rem 0;
  z-index: 50;
  display: none;
  border: 1px solid rgba(0, 119, 200, 0.1);
  backdrop-filter: blur(10px);
}

.language-dropdown.show {
  display: block;
  animation: fadeInDown 0.15s ease-out;
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.375rem 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  min-height: 2rem;
}

.language-option:hover {
  background: #0077C8;
  color: white;
}

.language-option:focus {
  outline: none;
  background: #0077C8;
  color: white;
}

/* RTL/LTR support */
[dir="rtl"] .language-dropdown {
  right: auto;
  left: 0;
}

/* Mobile optimizations */
@media (max-width: 1024px) {
  .language-switcher {
    margin-left: 0.25rem;
  }
  
  .language-button {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    min-width: 2.25rem;
  }
  
  .language-dropdown {
    width: 2.75rem;
  }
  
  .language-option {
    padding: 0.3rem 0.4rem;
    font-size: 0.7rem;
    min-height: 1.75rem;
  }
}

/* Dropdown arrow rotation */
.language-button[aria-expanded="true"] svg:last-child {
  transform: rotate(180deg);
}

/* Smooth transitions */
.language-button svg {
  transition: transform 0.2s ease;
}

/* Language code styling */
.language-code {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}

/* Active language indicator */
.language-option.active {
  background: #0077C8;
  color: white;
  font-weight: 700;
}

/* Hover effects for better UX */
.language-button:hover svg {
  transform: scale(1.1);
}

/* Focus ring for accessibility */
.language-button:focus-visible {
  outline: 2px solid #0077C8;
  outline-offset: 2px;
}

.language-option:focus-visible {
  outline: 2px solid #0077C8;
  outline-offset: -2px;
}

/* Animation keyframes */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Compact mode for very small screens */
@media (max-width: 480px) {
  .language-button {
    padding: 0.15rem 0.3rem;
    font-size: 0.65rem;
    min-width: 2rem;
    gap: 0.15rem;
  }
  
  .language-dropdown {
    width: 2.5rem;
  }
  
  .language-option {
    padding: 0.25rem 0.3rem;
    font-size: 0.65rem;
    min-height: 1.5rem;
  }
}
