.language-selector {
  position: relative;
  display: inline-block;
}

/* Кнопка селектора */
.language-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #64748b;
  font-weight: 500;
  padding: 8px 16px;
  min-width: 110px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  position: relative;
}

.language-button:hover {
  border-color: #cbd5e1;
}

.language-button:focus,
.language-button.open {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1);
}

/* Стрелка dropdown */
.dropdown-arrow {
  width: 16px;
  height: 16px;
  fill: #94a3b8;
  transition: transform 0.2s ease;
  margin-left: auto;
}

.dropdown-arrow.rotated {
  transform: rotate(180deg);
}

/* Изображения флагов */
.flag-img {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* Выпадающий список */
.language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  margin-top: 2px;
  padding: 4px 0;
  z-index: 1000;
  min-width: 140px;
}

/* Опции в списке */
.language-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  color: #64748b;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.language-option:hover {
  background: #f8fafc;
  color: #3b82f6;
}

.language-option.selected {
  background: #eff6ff;
  color: #3b82f6;
  font-weight: 500;
}

/* Alpine.js cloak для предотвращения мерцания */
[x-cloak] {
  display: none !important;
}

/* Мобильная адаптивность */
@media (max-width: 768px) {
  .language-dropdown {
    min-width: 120px;
  }

  .language-button {
    min-width: 100px;
    padding: 6px 12px;
  }
}