/* ============================================
   SELECTOR DE IDIOMA - DISEÑO PERSONALIZADO
   ============================================ */

.language-selector-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  margin-right: 2rem;
  height: 62px;
}

.language-selector-custom {
  position: relative;
  width: 140px;
  display: flex;
  align-items: center;
}

/* Botón principal del selector */
.language-selector-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 8px;
  height: 40px;
  width: 100%;
}

.language-selector-trigger:hover {
  background-color: #F9FAFB;
}

.language-selector-custom.active .language-selector-trigger {
  background-color: #F3F4F6;
}

/* Iconos y texto */
.language-icon {
  flex-shrink: 0;
}

.language-selected {
  flex: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #000000;
  line-height: 1;
}

.language-arrow {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.language-selector-custom.active .language-arrow {
  transform: rotate(180deg);
}

/* Dropdown menu */
.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.language-selector-custom.active .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Opciones del dropdown */
.language-option {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  gap: 10px;
}

.language-option:hover {
  background-color: #F3F4F6;
}

.language-option span {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #000000;
}

/* Radio button (círculo) */
.language-radio {
  width: 18px;
  height: 18px;
  border: 2px solid #D1D5DB;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}

.language-radio.selected {
  border-color: #6B7280;
}

.language-radio.selected::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: #6B7280;
  border-radius: 50%;
}

/* Responsive */
@media screen and (max-width: 991px) {
  .language-selector-wrapper {
    margin-left: 0;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .language-selector-custom {
    width: 160px;
  }
  
  .language-selector-trigger {
    padding: 12px 16px;
  }
  
  .language-selected,
  .language-option span {
    font-size: 15px;
  }
}

@media screen and (max-width: 479px) {
  .language-selector-custom {
    width: 140px;
  }
}
