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

.city-selector__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  font-size: 14px;
  color: #333;
}

.city-selector__trigger:hover {
  color: #000;
}

.city-selector__trigger::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #666;
  margin-left: 4px;
  transition: transform 0.2s;
}

.city-selector__trigger[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.city-selector__popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.4);
}

.city-selector__popup-inner {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 32px 32px 28px;
  width: min(90vw, 960px);
  max-height: 80vh;
  overflow-y: auto;
}

.city-selector__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  color: #999;
  font-size: 20px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}

.city-selector__close:hover {
  color: #333;
  background: #f0f0f0;
}

.city-selector__close::before {
  content: '\d7';
  font-size: 24px;
  line-height: 1;
}

.city-selector__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #222;
}

.city-selector__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-selector__item {
  margin: 0;
}

.city-selector__link {
  display: block;
  padding: 6px 14px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fafafa;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.city-selector__link:hover {
  background: #e3f2fd;
  border-color: #90caf9;
  color: #1565c0;
}

.city-selector__item--active .city-selector__link {
  color: #fff;
  font-weight: 600;
  cursor: default;
  background: #1976d2;
  border-color: #1976d2;
}

.city-selector__item--active .city-selector__link:hover {
  background: #1976d2;
  border-color: #1976d2;
  color: #fff;
}
