/* 地区切换器样式 - 127.0.0.6 (郑州站) - 美化版 */

/* PC/移动端显示控制 */
.pc-only {
  display: block;
}

.mobile-only {
  display: none;
}

/* 确保在.nav容器内也能隐藏 */
.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: 10000;
}

.city-top-bar .main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* 地区切换器 */
.city-selector {
  position: relative;
  display: inline-block;
  z-index: 10001;
  top: 4px;
}

/* 简约边框按钮 */
.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: #f05e0b;
  color: #f05e0b;
}

.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: 10002;
  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:before,
.city-dropdown-link:after {
  display: none !important;
  content: none !important;
}

.city-dropdown-link:hover {
  color: #f05e0b;
  background: #f9f9f9;
}

/* 响应式设计 */
@media (max-width: 767px) {
  /* 切换显示 */
  .pc-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .nav .mobile-only {
    display: block !important;
  }

  /* 移动端城市切换器定位 */
  .mobile-only.city-selector {
    position: absolute;
    right: 15%;
    top: 21px;
    z-index: auto;
  }

  .mobile-only .city-selector-btn {
    padding: 4px 10px;
    height: 26px;
    font-size: 12px;
    gap: 4px;
  }

  .mobile-only .city-dropdown {
    min-width: 100px;
    z-index: 1000001;
  }

  /* 增强选择器特异性，确保覆盖导航菜单样式 */
  .nav .mobile-only .city-dropdown-list .city-dropdown-item .city-dropdown-link {
    display: block !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    color: #666 !important;
    text-decoration: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    text-align: left !important;
    width: auto !important;
    background: transparent !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    font-weight: 450 !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  .nav .mobile-only .city-dropdown-link:hover {
    color: #f05e0b !important;
    background: #f9f9f9 !important;
  }
}
