/* Estilos mejorados para el selector de idiomas */
.language-selector .dropdown-toggle {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  min-width: 50px;
  max-width: 60px;
  /* transition: all 0.3s ease; */
  text-align: center;
}

.language-selector .dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.language-selector .dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Language Selector Styles */
.language-selector {
  position: relative;
}

.language-selector .dropdown-menu {
/* position: absolute; */
top: 100%;
right: 0;
left: auto;
z-index: 1000;
margin-top: 0;
}

.language-current {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  /* transition: all 0.3s ease; */
}

.language-current:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.language-dropdown {
background: rgba(15, 15, 15, 0.95);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 0.5rem 0;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
min-width: 80px;
max-width: 100px;
}

.language-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  /* transition: all 0.3s ease; */
  border: none;
  background: none;
  font-weight: 600;
  font-size: 14px;
  min-height: 32px;
}

.language-dropdown .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.language-dropdown .dropdown-item.active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

/* Flag Icons Styles - Custom overrides for flag-icons package */
.fi {
  display: inline-block;
  width: 1.33em;
  height: 1em;
  border-radius: 3px;
  vertical-align: middle;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.flag-small {
  width: 20px;
  height: 15px;
  border-radius: 2px;
}

.flag {
  width: 24px;
  height: 18px;
  border-radius: 3px;
}

/* Ensure flag-icons package styles are applied correctly */
.fi-gb, .fi-en {
  background-image: url('/assets/flags/4x3/gb.svg');
}

.fi-es {
  background-image: url('/assets/flags/4x3/es.svg');
}

.fi-pt {
  background-image: url('/assets/flags/4x3/pt.svg');
}

.fi-de {
  background-image: url('/assets/flags/4x3/de.svg');
}

.fi-it {
  background-image: url('/assets/flags/4x3/it.svg');
}

/* Mobile styles */
.language-selector-mobile {
  margin-top: 1rem;
}

.language-selector-mobile .btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  max-width: 80px;
  padding: 6px 12px;
  font-weight: 600;
}

.language-selector-mobile .btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.language-selector-mobile .btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Animation for dropdown */

/* Responsive adjustments */
@media (max-width: 768px) {
  .language-selector {
    display: none;
  }
  
  .language-selector-mobile {
    display: flex;
  }
}

@media (min-width: 769px) {
  .language-selector-mobile {
    display: none;
  }
}

/* Versión móvil del selector */
@media (max-width: 991px) {
  .language-selector-mobile {
    display: block !important;
    margin-top: 15px;
  }
  
  .language-selector-mobile .dropdown-toggle {
    width: 100%;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
  }
  
  .language-selector-mobile .dropdown-menu {
    width: 100%;
    margin-top: 5px;
  }
}

/* Animaciones */

/* Indicador de idioma activo */
.language-dropdown .dropdown-item.active::after {
  content: '✓';
  margin-left: auto;
  color: #007bff;
  font-weight: bold;
}
