@use "tokens" as *;

.locale-selector {
  position: relative;
}

.locale-trigger {
  display: flex;
  align-items: center;
  gap: 2px;
  background: $surface-2;
  border: 1px solid $border;
  border-radius: $radius-sm;
  padding: $space-1 $space-2;
  font-size: $fs-12;
  font-weight: $k-fw-semibold;
  color: $text-2;
  cursor: pointer;
  transition: all 0.15s ease;

  &:hover {
    background: $surface-3;
    color: $text-1;
  }
}

.locale-chevron {
  flex-shrink: 0;
}

.locale-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: $surface;
  border: 1px solid $border;
  border-radius: $radius-md;
  box-shadow: $shadow-md;
  min-width: 160px;
  padding: 4px;
  z-index: 100;
}

.locale-option {
  display: flex;
  align-items: center;
  gap: $space-2;
  width: 100%;
  padding: $space-2 $space-3;
  border: none;
  border-radius: $radius-sm;
  background: transparent;
  font-size: $fs-13;
  color: $text-2;
  cursor: pointer;
  text-align: left;
  transition: all 0.1s ease;

  &:hover {
    background: $ui-hover-bg;
    color: $text-1;
  }

  &.active {
    color: $accent-600;
    font-weight: $k-fw-semibold;
  }
}

.locale-code {
  font-weight: $k-fw-bold;
  font-size: $fs-12;
  min-width: 24px;
}

.locale-label {
  flex: 1;
}

// Transición del dropdown
.dropdown-enter-active,
.dropdown-leave-active {
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.dropdown-enter-from,
.dropdown-leave-to {
  opacity: 0;
  transform: translateY(-4px);
}
