/* ── City Switcher ────────────────────────────────────────────── */
.city-switcher-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 12px;
  z-index: 1001;
}

.city-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #1a1a2e;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  user-select: none;
}

.city-switcher-btn:hover {
  border-color: #4361ee;
  box-shadow: 0 2px 8px rgba(67,97,238,0.12);
}

.city-switcher-btn .arrow {
  width: 10px;
  height: 10px;
  transition: transform 0.2s;
}

.city-switcher-btn .arrow.open {
  transform: rotate(180deg);
}

.city-switcher-btn .pin {
  font-size: 14px;
  line-height: 1;
}

/* ── Dropdown ──────────────────────────────────────────────────── */
.city-switcher-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-height: 420px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1002;
}

.city-switcher-dropdown.open {
  display: flex;
}

.city-switcher-search {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.city-switcher-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: #f8f9fa;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.city-switcher-search input:focus {
  border-color: #4361ee;
  background: #fff;
}

.city-switcher-search input::placeholder {
  color: #aaa;
}

.city-switcher-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.city-switcher-list li {
  margin: 0;
  padding: 0;
}

.city-switcher-list a {
  display: block;
  padding: 8px 16px;
  color: #333;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s;
}

.city-switcher-list a:hover {
  background: #f0f2ff;
  color: #4361ee;
}

.city-switcher-list li.active a {
  background: #eef0ff;
  color: #4361ee;
  font-weight: 600;
}

.city-switcher-list li.active a::before {
  content: "✓ ";
  font-weight: 700;
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
.city-switcher-list::-webkit-scrollbar {
  width: 5px;
}

.city-switcher-list::-webkit-scrollbar-track {
  background: transparent;
}

.city-switcher-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* ── Mobile adjustments ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .city-switcher-wrap {
    margin: 0 6px;
    order: 2;
  }

  .city-switcher-btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  .city-switcher-dropdown {
    position: fixed;
    top: 60px;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: 50vh;
    transform: none;
    z-index: 9999999;
  }

  .city-switcher-btn .city-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ── Desktop layout within nav ──────────────────────────────────── */
@media (min-width: 769px) {
  .city-switcher-wrap {
    margin-right: 16px;
  }
}

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes cityFadeIn {
  from { opacity: 0; transform: translateY(-6px) translateX(-50%); }
  to { opacity: 1; transform: translateY(0) translateX(-50%); }
}

.city-switcher-dropdown.open {
  animation: cityFadeIn 0.15s ease-out;
}
