/* ========================================
   频道页面专用样式
   ======================================== */

/* ========================================
   表格受限区：rowspan 合并大单元格 + 中央权限卡片
   ======================================== */

/* 合并后的大单元格容器 */
.locked-region-cell {
  background: #FAFBFC;
  border-top: none !important;
  vertical-align: middle;
  text-align: center;
  padding: 24px 0;
}

/* 权限卡片：居中，与图表 lock-panel 风格一致 */
.locked-region-panel {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #F4F5F8;
  border-radius: var(--border-radius-sm);
  padding: 12px 16px 12px 14px;
  min-width: 300px;
  max-width: 380px;
  box-shadow: none;
}

.locked-region-panel .lock-panel-body {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.locked-region-panel .lock-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1F2329;
  line-height: 1.4;
  margin-bottom: 5px;
}

.locked-region-panel .lock-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.locked-region-panel .lock-panel-desc {
  font-size: 11px;
  color: #86909C;
  line-height: 1.5;
  padding-left: 20px;
}

.locked-region-panel .lock-panel-action {
  flex-shrink: 0;
}

.locked-region-panel .lock-panel-btn {
  display: inline-block;
  padding: 0 14px;
  height: 30px;
  line-height: 28px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: #1A4FBE;
  border: 1px solid #1240A0;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}

.locked-region-panel .lock-panel-btn:hover {
  background: #1240A0;
  border-color: #0D3280;
}

.category-st{
  display: flex;
  justify-content: end;
  width: 100%;
}

/* ========================================
   侧边栏热点排行榜：粘性定位
   ======================================== */
.hot-ranking-widget {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #E4E6EB transparent;
}

/* ========================================
   历年数据表：限制高度 + 新版横向滑动
   ======================================== */


/* 限制历年数据表在页面内的最大高度 */
.region-data-scroll-limited {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 708px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}
.region-data-scroll-limited::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.region-data-scroll-limited::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: var(--border-radius-sm);
}
.region-data-scroll-limited::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--border-radius-sm);
}
.region-data-scroll-limited::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 表头在竖直方向也固定（sticky），确保横向滚动时表头始终可见 */
.region-data-scroll-limited thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-gray-th-2);
}
.region-data-scroll-limited tbody td.sticky-col,
.region-data-scroll-limited thead th.sticky-col {
  position: sticky;
  left: 0;
  background: white; /* 单元格底色 */
  z-index: 22;
}
.region-data-scroll-limited thead th.sticky-col {
  z-index: 25; /* 左上角交叉区域层级最高 */
  background: var(--bg-gray-th-2);
}

/* 历年数据全屏弹窗：复用 index.css 的 .fullscreen-modal 体系，
   此处仅补充弹窗内表格的自由滚动样式 */
.fullscreen-modal .fullscreen-table {
  overflow: auto;
  width: 100%;
  height: 100%;
}
.fullscreen-modal .fullscreen-data-table {
  width: max-content; /* 允许超出容器宽度，由外层滚动 */
  min-width: 100%;
}

/* 弹窗内表格：固定表头行 */
.fullscreen-modal .fullscreen-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-gray-th-2);
}
/* 弹窗内表格：固定年份列（首列） */
.fullscreen-modal .fullscreen-table tbody td.sticky-col,
.fullscreen-modal .fullscreen-table thead th.sticky-col {
  position: sticky;
  left: 0;
  z-index: 22;
}
/* 弹窗内表格：左上角交叉区域层级最高 */
.fullscreen-modal .fullscreen-table thead th.sticky-col {
  z-index: 25;
  background: var(--bg-gray-th-2);
}

/* ========================================
   筛选器
   ======================================== */
.ranking-filters {
    background: var(--bg-white);
    /* padding: var(--spacing-md);*/
    /* border-radius: var(--border-radius-md); */
    border-top-left-radius: var(--border-radius-md);;
    border-top-right-radius: var(--border-radius-md);;
    /* border-bottom-right-radius: 6px; */
    /* border-bottom-left-radius: 6px; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ranking-filters .unlock-toolbar-slot:empty {
    display: none;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0;
}

.filter-group .form-select {
    width: 150px;
}

.filter-info {
    font-size: 14px;
}


/* ========================================
   区域信息卡片样式
   ======================================== */

/* 区域头部 */
.region-header {
  background: white;
}

.region-header-content {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* 头部单行控制面板 */
.region-header-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 16px;
  flex: 1;
}

.region-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  color: #1D2129;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
  flex-shrink: 0;
}


/* 标签组：收藏人数 + rank-badge，flex:1 自动撑满把按钮推到最右 */
.region-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.region-followers {
  font-size: 12px;
  color: #86909C;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 右侧操作按钮组 */
.region-actions {
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

/* 头部收藏/订阅：与原始 btn-outline-secondary 保持一致的明显边框样式 */
.btn-pro-outline {
  background: transparent;
  border: 1px solid #C9CDD4;
  color: #4A5568;
  border-radius: var(--border-radius-sm);
}

.btn-pro-outline:hover {
  border-color: #1A4FBE;
  color: #1A4FBE;
  background: #F0F4FB;
}


/* 频道标签样式 - 单行布局 + 更多下拉 */
.channel-tabs {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.channel-tabs-wrapper {
  display: flex;
  align-items: stretch;
  /* overflow 必须保持 visible，否则 overflow-x:auto 会强制裁剪下拉菜单 */
  overflow: visible;
  flex-wrap: nowrap;
  gap: 0;
}

/* 用伪元素不行，直接让标签区域本身可横向滚动，
   但 more-trigger 必须跟着走，所以整体不 clip */

/* 标签 - 下划线激活式（专业金融终端风格） */
.channel-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 400;
  color: #6B7280;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease, border-bottom-color 0.15s ease;
  margin-bottom: -1px;
}

.channel-tab:hover {
  color: #1A4FBE;
  background: transparent;
  border-bottom-color: #B8C8EF;
}

.channel-tab.active {
  color: #1A4FBE;
  font-weight: 600;
  background: transparent;
  border-bottom-color: #1A4FBE;
}

.channel-tab.active:hover {
  color: #1240A0;
  border-bottom-color: #1240A0;
}

/* 更多按钮和下拉菜单 */
.channel-tab-more {
  position: relative;
  flex-shrink: 0;
}

.channel-tab.more-trigger {
  gap: 4px;
  cursor: pointer;
}

.channel-tab.more-trigger .iconfont {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.channel-tab-more:hover .more-trigger .iconfont {
  transform: rotate(180deg);
}

.channel-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
}

.channel-tab-more:hover .channel-dropdown {
  opacity: 1;
  visibility: visible;
}

.channel-dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 400;
  color: #4A5568;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  border-bottom: 1px solid #f0f2f5;
}

.channel-dropdown-item:last-child {
  border-bottom: none;
}

.channel-dropdown-item:hover {
  background: #f0f4fa;
  color: #1A4FBE;
}

.channel-dropdown-item.active {
  background: #EBF4FF;
  color: #1A4FBE;
  font-weight: 600;
  border-left: 3px solid #1A4FBE;
  padding-left: 13px;
}

.channel-dropdown-item.active:hover {
  background: #dbeeff;
}

/* 区域对比样式 - 文本链接布局 */
.region-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.region-compare-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 13px;
  color: #4A5568;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.region-compare-item:hover {
  background: #f0f4fa;
  border-color: #C8D0DB;
  color: #1A4FBE;
}

.region-compare-item i {
  margin-right: 6px;
  font-size: 14px;
}

.region-compare-item span {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.region-compare-item.full-width {
  grid-column: 1 / -1;
  background: #EBF4FF;
  color: #1A4FBE;
  font-weight: 500;
}

.region-compare-item.full-width:hover {
  background: #1A4FBE;
  border-color: #1A4FBE;
  color: white;
}

.region-compare-links {
  grid-template-columns: repeat(2, 1fr);
  display: grid;
  gap: 8px;
}

.region-compare-link {
  font-size: 13px;
  color: var(--color-link);
  text-decoration: none;
  line-height: 1.5;
  word-break: break-word;
}

.region-compare-link:hover {
  color: #005fcc;
  text-decoration: underline;
}

.region-compare-link .iconfont {
  font-size: 15px;
}

.region-compare-link.full-width {
  grid-column: 1 / -1;
}

.region-compare-link-more {
  font-weight: 600;
}

/* 排名标签样式 */
.rank-badge {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: #1A4A7B;
  white-space: nowrap;
  text-decoration: none;
}

.rank-badge i {
  margin-right: 3px;
  font-size: 11px;
}

/* === Quick Navigation Component === */
/* 快速导航优化 */
.quick-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-nav-list li {
  margin-bottom: 8px;
}

.quick-nav-list li:last-child {
  margin-bottom: 0;
}

.quick-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: #4A5568;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  background-color: #F8FAFC;
  border: 1px solid var(--border-color);
  font-size: 14px;
}

.quick-nav-link:hover {
  background-color: #f0f4fa;
  color: #1A4FBE;
  border-color: #C8D0DB;
}

.quick-nav-link.active {
  background-color: #1A4FBE;
  color: white;
  border-color: #1A4FBE;
}

.quick-nav-link .iconfont {
  font-size: 12px;
}

.quick-nav-link:hover .iconfont {
  color: inherit;
}

.tags-scrollable {
  max-height: 390px;
  overflow: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .chart-controls {
    flex-direction: column !important;
    gap: 15px;
  }
  
  .chart-selector {
    width: 100%;
  }
  
  .chart-selector select {
    width: 100% !important;
    min-width: auto;
  }
  
  .chart-type-btns {
    width: 100%;
    justify-content: space-between;
  }
  
  .fullscreen-modal-content {
    width: 98%;
    height: 95%;
  }
  
  .fullscreen-modal-header h5 {
    font-size: 16px;
  }
  
  .fullscreen-modal-header .modal-actions {
    flex-wrap: wrap;
  }
  
  /* 频道标签响应式 */
  .channel-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .channel-dropdown {
    min-width: 140px;
  }
  
  .channel-dropdown-item {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ========================================
   房价频道特有样式
   ======================================== */

/* 房价高亮颜色 */
.price-highlight {
  color: #333333;
  font-weight: 600;
}

/* 房价上涨颜色 (遵循规范的下跌色，中国A股红涨绿跌习惯) */
.price-up {
  color: #BA2A20;
}

/* 房价下跌颜色 (遵循规范的上涨色，中国A股红涨绿跌习惯) */
.price-down {
  color: #0A7C4E;
}

/* ========================================
   房价指标卡片样式
   ======================================== */

/* 指标卡片容器网格布局 */
.indicator-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

/* 指标卡片容器 */
.indicator-card {
  display: block;
  padding: 15px 20px;
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  transition: background-color 0.15s ease, border-color 0.15s ease;
  min-height: 110px;
  position: relative;
}

/* 含走势图的卡片略高，给面积图留出呼吸空间 */
.indicator-card:has(.indicator-spark) {
  min-height: 138px;
}

/* 指标标签 */
.indicator-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
}

/* 指标数值容器（用于同一行显示数值和涨跌幅） */
.indicator-value-wrapper {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

/* 指标数值 */
.indicator-value {
  font-size: 24px;
  font-weight: 600;
  color: #212529;
  line-height: 1.2;
}

/* 指标数值应用涨跌颜色 */
.indicator-value.price-up {
  color: #df2f30;
}

.indicator-value.price-down {
  color: #55a500;
}

.indicator-value.price-highlight {
  color: #333333;
}

.indicator-value .unit {
  font-size: 14px;
  font-weight: 400;
  color: #999;
  margin-left: 4px;
}

/* 指标变化（涨跌幅） */
.indicator-change {
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.indicator-change.up {
  color: #f5222d;
}

.indicator-change.down {
  color: #52c41a;
}

.indicator-change i {
  font-size: 12px;
}

/* 指标元数据 */
.indicator-meta {
  font-size: 14px;
  margin-top: 6px;
  color: #6c757d;
}

.indicator-meta span {
  margin-right: 8px;
}

/* 指标备注 */
.indicator-note {
  font-size: 12px;
  color: #adb5bd;
  margin-top: 4px;
}

/* 指标走势图（复用首页热点数据同款 SVG 面积图，GhSpark 渲染；<2个历史点时容器为空，不占视觉重量） */
.indicator-spark {
  height: 24px;
  margin-top: 8px;
}
.indicator-spark .hd-spark-svg {
  display: block;
}

/* ========================================
   排行榜表格样式
   ======================================== */

.ranking-table-wrapper {
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  margin-bottom: 0;
}

.ranking-table thead th {
  background: #f8f9fa;
  font-weight: 500;
}

.ranking-table tbody td {
  vertical-align: middle;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.ranking-table tbody tr:hover {
  background: #f8f9fa;
}

/* 排行榜徽章样式（房价频道专用） */

.city-link {
  color: #333;
  text-decoration: none;
  font-weight: 500;
}

.city-link:hover {
  color: var(--primary-color);
}



.rank-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dee2e6;
  color: #495057;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.rank-top {
  font-weight: 600;
}

.region-name {
  flex: 1;
  margin-left: 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.region-name:hover {
  color: var(--primary-color);
}

.price-value {
  font-size: 14px;
  color: var(--text-dark);
  margin-right: 12px;
  font-weight: 500;
}

.price-change {
  font-size: 13px;
  font-weight: 500;
  min-width: 60px;
  text-align: right;
}

/* ========================================
   相关数据卡片样式
   ======================================== */

.related-data-item {
  padding: 12px;
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.related-data-item:hover {
  background: #f0f4fa;
  border-color: #C8D0DB;
}

.related-data-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-data-name {
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
  font-weight: 500;
}

.related-data-link:hover .related-data-name {
  color: var(--primary-color);
}

.related-data-meta {
  font-size: 12px;
  color: #6c757d;
}

/* ========================================
   表格单位标签样式
   ======================================== */

.unit-label {
  font-size: 11px;
  color: #6c757d;
  font-weight: normal;
  margin-top: 2px;
}


/* ========================================
   房价排行榜样式
   ======================================== */

.chart-fangjia {
  width: 100%;
  overflow: hidden;
  padding: var(--spacing-md) 0;
  border-radius: var(--border-radius-sm);
}

/* 右边栏小版本 - 紧凑样式 */
.housing-ranking-table {
  width: 100%;
}

.housing-ranking-table table {
  font-size: 13px;
  border-collapse: collapse;
}

.housing-ranking-table thead th {
  font-weight: 500;
  background: #f9f9f9;
  padding: 8px 4px;
}

.housing-ranking-row {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.housing-ranking-row:hover {
  background: #f8f9fa;
}

.housing-ranking-row td {
  padding: 10px 4px;
  vertical-align: middle;
}

.housing-ranking-row .ranking-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  font-weight: 500;
}

.housing-ranking-row .ranking-num.top {
  background: var(--secondary-blue) !important;
  color: #fff;
}

.housing-ranking-row .housing-name {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
  display: block;
}

.housing-ranking-row .housing-name:hover {
  color: var(--primary);
  text-decoration: underline;
}

.housing-ranking-row .housing-value {
  font-size: 13px;
  font-weight: 500;
}

.housing-ranking-row .housing-yoy {
  font-size: 12px;
  font-weight: 500;
}


/* ========================================
   子区域导航样式
   ======================================== */

/* 子区域导航3列固定布局 */
.sub-region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sub-region-item {
  display: block;
  padding: 8px 12px;
  text-align: center;
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: #4A5568;
  text-decoration: none;
  font-size: 13px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sub-region-item:hover {
  background: #1A4FBE;
  color: #fff;
  border-color: #1A4FBE;
}

/* ========================================
   月份选择器样式（房价排行榜专用）
   ======================================== */

/* 月份选择器容器 */
.month-picker-container {
  min-width: 260px;
}

.month-picker-container .btn {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.month-picker-container .btn:hover:not(:disabled) {
  filter: brightness(0.96);
}

.month-picker-container .btn-primary {
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
}

.month-picker-container .btn-outline-primary {
  border-width: 2px;
}

/* 月份选择器按钮 */
#monthPickerBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* 非会员提示样式（不再禁用，只显示提示） */
#monthPickerBtn.has-hint {
  position: relative;
}

#monthPickerBtn.has-hint::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: #ff6b00;
  border-radius: 50%;
  border: 2px solid #fff;
}

/* 月份选择器下拉菜单 */
#monthPickerDropdown {
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 年份显示 */
#monthPickerYear {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  min-width: 80px;
  text-align: center;
}

/* 月份网格布局 */
.month-picker-container .row {
  margin: 0;
}

.month-picker-container .col-4 {
  padding: 0.25rem;
}

.month-picker-container .btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
}

/* 月份选择器提示文字 */
.month-picker-hint {
  font-size: 12px;
  color: #6c757d;
  margin-top: 8px;
  text-align: center;
  padding: 4px 8px;
  background-color: #f8f9fa;
  border-radius: var(--border-radius-sm);
}

.month-picker-hint.vip-only {
  color: #ff6b00;
  background-color: #fff4e6;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .month-picker-container {
    min-width: 240px;
  }
  
  #monthPickerDropdown {
    min-width: 260px;
  }
  
  .month-picker-container .btn-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* ========================================
   PC端地图大屏弹窗样式
   ======================================== */

/* 弹窗大小限制 */
.map-modal-custom {
  width: 96vw;
  max-width: 96vw;
  min-width: 0;
  /* 弹窗精确等于视口高度（含上下 0.5rem 边距），bootstrap 的 .modal 外层不再产生第二条滚动条 */
  height: calc(100vh - 1rem);
  margin: 0.5rem auto;
}

.map-modal-custom .modal-content {
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-modal-custom .modal-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

/* 地图弹窗控制栏 */
.map-controls-pc-modal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background-color: #f8f9fa;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid #dee2e6;
}

.map-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-selector label {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}

/* 地图设置项 */
.map-settings {
  display: flex;
  align-items: center;
  gap: 16px;
}

.map-setting-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-setting-item label {
  margin: 0;
  white-space: nowrap;
}

.map-info-pc-modal {
  font-size: 14px;
  color: #6c757d;
  margin-left: auto;
}

.map-info-pc-modal .text-primary {
  color: #0d6efd !important;
  font-weight: 500;
}

/* 主舞台：地图占满 + 右侧竖列操作栏（自身不滚，溢出由内部 side-controls 处理） */
.map-stage {
  position: relative;
  display: flex;
  height: 100%;
  overflow: hidden;
}

/* 地图容器（占满主区，随竖列操作栏并排，flex 撑满剩余宽度） */
.map-container-pc-modal {
  flex: 1;
  min-width: 0;
  height: 100%;
  position: relative;
  background-color: #ffffff;
  overflow: hidden;
}

/* 右侧竖列操作栏（原顶部横向操作栏改竖排） */
.map-side-controls {
  width: 200px;
  flex-shrink: 0;
  border-left: 1px solid #e5e7eb;
  background-color: #f8f9fa;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.map-side-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.map-side-item label {
  margin: 0;
  font-size: 12px;
  color: #6c757d;
}

.map-side-item select {
  width: 100% !important;
}

/* 时间双选（年/月）并排一行 */
.map-side-time {
  display: flex;
  gap: 8px;
}
.map-side-time select {
  flex: 1;
  min-width: 0;
  width: 100% !important;
}

/* 保存按钮沉到底部 */
.map-side-save {
  margin-top: auto;
}

/* 地图提示信息（左上角，避开标题区域） */
.map-tips-footer {
  position: absolute;
  top: 80px;  /* 避开ECharts标题区域（通常在顶部60-70px） */
  left: 15px;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.map-tip-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  color: #495057;
  backdrop-filter: blur(5px);
}

.map-tip-item .iconfont {
  font-size: 14px;
  flex-shrink: 0;
}

.map-tip-item span {
  white-space: nowrap;
}

/* 加载状态 */
.map-loading-pc {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.map-loading-pc .spinner-border {
  width: 3rem;
  height: 3rem;
  color: #0d6efd;
}

.map-loading-pc p {
  margin-top: 1rem;
  color: #6c757d;
  font-size: 14px;
}

/* ========================================
   右侧边栏地图预览样式
   ======================================== */

.map-preview-container {
  width: 100%;
  height: 250px !important;
  min-height: 250px;
  position: relative;
  background-color: #f8f9fa;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease;
  border: 1px solid var(--border-color);
}

.map-preview-container:hover {
  border-color: #C8D0DB;
}

/* 预览地图加载状态 */
.map-preview-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(248, 249, 250, 0.9);
}

.map-preview-loading .spinner-border {
  width: 2rem;
  height: 2rem;
  color: #0d6efd;
}

.map-preview-loading p {
  margin-top: 0.5rem;
  font-size: 12px;
  color: #6c757d;
}

/* 预览地图空/错误占位（静态，非加载动画） */
.map-preview-empty {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
}

.map-preview-empty .iconfont {
  font-size: 32px;
  color: #cdd2da;
  margin-bottom: 6px;
}

.map-preview-empty p {
  margin: 0;
  font-size: 12px;
  color: #9aa0a8;
}

/* 响应式调整 */
@media (max-width: 1000px) {
  .map-modal-custom {
    width: 100%;
    max-width: 100%;
    min-width: auto;
    margin: 0;
  }

  .map-modal-custom .modal-content {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  /* 窄屏：地图在上、操作栏改横排沉到底部 */
  .map-stage {
    flex-direction: column;
  }
  .map-side-controls {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    gap: 10px;
  }
  .map-side-item {
    flex: 1 1 45%;
  }
  .map-side-save {
    margin-top: 0;
    flex: 1 1 100%;
  }

  .map-preview-container {
    height: 200px;
  }
}

/* ========================================
   表格受限区 — 高斯模糊 + 解锁卡片
   ======================================== */

/* 受限单元格：显示占位数字 + 模糊 + 锁定灰底
   灰底挂在格（td）上而不是行（tr）上：区域页是「行=年份、列=指标」，
   按行渲染会让可见数据也坐在灰底上。 */
.locked-cell {
  filter: blur(4px);
  user-select: none;
  /* 🔴 禁止 pointer-events:none：JS 有 td.locked-cell 的点击委托（点打码格弹解锁/会员引导），
     设成 none 会让这个入口永远收不到点击。防选中复制已由 user-select:none 承担。 */
  cursor: pointer;
  color: #86909C;
  background-color: #F7F8FA;
}

/* 🔴 没数据的格子一律保持空白，禁止铺灰底"补平"锁定区——
   灰底代表"这里有数据但被锁了"，空格子铺灰等于暗示解锁后有值，解锁后是空的必被投诉。
   锁定区出现参差空洞是诚实的表现，不是缺陷。 */

/* 受限行：仅作 JS 定位蒙层卡片的标记，不承载视觉样式（灰底已下沉到 .locked-cell） */

/* 表格 + 卡片 wrapper：卡片挂在 wrapper 上（横滚容器外），不随表格横滚移动 */
.lock-table-wrapper {
  position: relative;
}

/* 解锁卡片：绝对定位在 wrapper 上，水平居中在屏幕宽度内，垂直由 JS 动态对齐受限区中点 */
.table-lock-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  z-index: 10;
  background: #f2f2f2;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
}

.table-lock-panel .lock-panel-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.table-lock-panel .lock-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1F2329;
}

.table-lock-panel .lock-icon {
  flex-shrink: 0;
}

.table-lock-panel .lock-panel-desc {
  font-size: 12px;
  color: #86909C;
  line-height: 1.4;
}

.table-lock-panel .lock-panel-action {
  flex-shrink: 0;
}

.table-lock-panel .lock-panel-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--primary-color);
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.table-lock-panel .lock-panel-btn:hover {
  background: var(--primary-dark);
}

/* 部分解锁后的工具栏解锁入口：次要按钮（非填充主色，避免与蒙层主按钮同区双主按钮） */
.unlock-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-color);
  background: #EBF0FB;
  border: none;
  border-radius: var(--border-radius-sm, 4px);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.unlock-all-btn:hover { background: #E0E8F7; }
.unlock-all-btn .iconfont { font-size: 13px; }
.unlock-all-bar { display: flex; justify-content: flex-end; margin: 8px 0 4px; }

/* ── 最新更新面板（update-feed-widget）────────────────── */
.update-feed-widget {
}

/* 列表容器 */
.update-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 单行：Grid网格布局（标题 范围） */
.update-feed-item {
  display: grid;
  grid-template-columns: 1fr 68px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #E5E6EB;
  line-height: 1.4;
}
.update-feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* 左：数据名称链接 */
.update-feed-name {
  min-width: 0;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  transition: color 0.15s ease;
}
.update-feed-name:hover {
  color: var(--primary-color);
}

/* 右：时间跨度 等宽对齐 */
.update-feed-range {
  font-size: 11px;
  color: #86909C;
  font-feature-settings: "tnum" on, "lnum" on;
  font-family: var(--font-data);
  text-align: right;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

/* ========================================
   紧凑型报价面板 (Quote Panel) - 专业终端风格
   ======================================== */
.pro-quote-panel-wrapper {
  padding: 10px 0 5px;
}

.pro-quote-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.pro-quote-item {
  padding: 12px 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: start;
}

.pro-quote-item.border-bottom {
  border-bottom: none !important; /* 在 1x4 布局中，不需要底边框 */
}

.pro-quote-item.border-end {
  border-right: 1px solid var(--border-color) !important;
}

.pro-quote-label {
  font-size: 13px;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-weight: 500;
}

.pro-quote-value-group {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.pro-quote-value {
  font-size: 22px;
  font-weight: 600;
  font-family: var(--font-data);
  font-feature-settings: "tnum" on, "lnum" on;
  line-height: 1.2;
}

.pro-quote-value.text-dark {
  color: #303133;
}

.pro-quote-unit {
  font-size: 13px;
  color: #909399;
  margin-left: 2px;
}

.pro-quote-change {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.pro-quote-change i {
  font-size: 11px;
}

.pro-quote-note {
  font-size: 12px;
  color: var(--text-dark);
  margin-top: auto;
}

.pro-quote-extreme-group {
  display: flex;
  flex-direction: column;
}

.pro-quote-extreme {
  font-size: 14px;
  color: var(--text-muted);
}

.pro-quote-extreme span {
  font-family: var(--font-data);
  font-feature-settings: "tnum" on, "lnum" on;
  font-weight: 500;
}

/* fangjia_index / fangjia_top 月份选择器 & 隐藏数据容器 */
#monthPickerBtn {
  min-width: 120px;
}

#monthPickerDropdown {
  min-width: 280px;
}

#fullRankingData {
  display: none;
}

/* ===== 辖区导航排行（PC 侧边栏：布局对齐首页房价排行 .housing-ranking-table，
   该样式在 index.css 频道页不加载，此处以 .snr- 命名空间逐条复刻同规格） ===== */
.snr-table { width: 100%; margin-top: 4px; }
.snr-table table { font-size: 13px; border-collapse: collapse; }
.snr-table thead th { font-weight: 500; background: #f9f9f9; }
.snr-table tbody::before { content: ""; display: block; height: 6px; }
.snr-row { transition: background 0.2s; }
.snr-row:hover { background: #f8f9fa; }
.snr-row td { padding: 8.5px 4px; vertical-align: middle; }
.snr-row .ranking-num { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: var(--border-radius-sm); font-size: 12px; color: #666; background: #f5f5f5; font-weight: 500; }
.snr-row .ranking-num.top { background: var(--secondary-blue) !important; color: #fff; }
.snr-row .snr-name { color: var(--text-dark); text-decoration: none; font-size: 13px; transition: color 0.2s; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snr-row .snr-name:hover { color: var(--primary-color); text-decoration: underline; }
.snr-row .snr-value { font-size: 13px; font-weight: 500; font-family: var(--font-data); font-feature-settings: "tnum" on, "lnum" on; }
.snr-row .snr-yoy { font-size: 12px; font-weight: 500; font-family: var(--font-data); font-feature-settings: "tnum" on, "lnum" on; }
.snr-row .snr-yoy.text-danger { color: #dc2626 !important; }
.snr-row .snr-yoy.text-success { color: #059669 !important; }
.snr-row .snr-na { color: #b0b8c4; }
.sub-nav-rank-more-pc { margin-top: 8px; text-align: center; }
.sub-nav-rank-more-pc a { text-decoration: none; }

/* ===== 预测结果提示条（与排行榜详情页 ranking.css 同款，房价榜等页复用） ===== */
.ranking-forecast-alert {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-gray-light);
    font-size: 13px;
    color: var(--primary-color);
}

.ranking-forecast-alert.show,
.ranking-forecast-alert:not(.d-none) {
    display: flex !important;
}

.ranking-forecast-alert-btns {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
