/* 地区切换器样式 - 127.0.0.8 (北京站) - 美化版 */

/* PC/移动端显示控制 */
.pc-only {
  display: block;
}

.mobile-only {
  display: none;
}

/* 确保在.ab_nav容器内也能隐藏 */
.ab_nav .mobile-only {
  display: none !important;
}

/* 顶部条容器 - 半透明效果 */
.city-top-bar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  height: 42px;
  line-height: 42px;
  position: relative;
  z-index: 10002;
  width: 100%;
}

.city-top-bar .main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 42px;
}

/* 地区切换器 */
.city-selector {
  position: relative;
  display: inline-block;
  z-index: 10003;
}

/* 简约边框按钮 */
.city-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  height: 32px;
  /* 无背景 */
  background: transparent;
  /* 细边框 */
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.city-selector-btn:hover {
  border-color: #333;
  color: #333;
}

.city-selector-btn .text {
  font-weight: 500;
}

.city-selector-btn .arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.city-selector.active .city-selector-btn .arrow {
  transform: rotate(180deg);
}

/* 简约下拉菜单 */
.city-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  /* 白色背景 */
  background: #fff;
  /* 细边框 */
  border: 1px solid #ddd;
  border-radius: 8px;
  /* 轻微阴影 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 8px;
  z-index: 10004;
  padding: 8px 0;
}

.city-selector.active .city-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.city-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.city-dropdown-item {
  padding: 0 8px;
}

.city-dropdown-link {
  display: block;
  padding: 10px 16px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
  font-weight: 450;
}

.city-dropdown-link:hover {
  color: #333;
  background: #f9f9f9;
}

/* 移动端城市切换器定位 */
.ab_nav .mobile-only.city-selector {
  position: absolute;
  right: 12%;
  top: -44px;
  z-index: 999;
}

.mobile-only .city-selector-btn {
  padding: 4px 10px;
  height: 26px;
  font-size: 12px;
  gap: 4px;
}

.mobile-only .city-dropdown {
  min-width: 100px;
}

/* 响应式设计 */
@media (max-width: 767px) {
  /* 切换显示 */
  .pc-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .ab_nav .mobile-only {
    display: block !important;
  }

  .city-selector-btn {
    padding: 4px 10px;
    height: 26px;
    font-size: 12px;
    gap: 4px;
  }

  .city-dropdown {
    min-width: 100px;
  }

  .city-dropdown-link {
    padding: 8px 12px;
    font-size: 12px;
  }
}
