/* =========================================
   银发财经 — 县域详情页专属样式
   用途：仅 county_detail.html 模板生成的页面引用
   隔离说明：所有类名以 .county- 为前缀或具有页面特异性
   ========================================= */

/* ---- 页面头部 ---- */
.county-header {
  background: linear-gradient(135deg, #065f46, #059669, #10b981);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.county-header h1 { font-size: 20px; color: #fff; margin-bottom: 2px; }
.county-header p { font-size: 12px; color: rgba(255,255,255,0.82); }

/* ---- 返回按钮（绿色背景专用） ---- */
.county-back-btn {
  background: #059669;
  border: 1px solid #059669;
  color: white;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.county-back-btn:hover { background: #065f46; border-color: #065f46; }

/* ---- 内容区 ---- */
.county-content { max-width: 1000px; margin: 0 auto; padding: 30px; }

/* ---- 信息网格 ---- */
.county-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}
.county-info-item {
  background: #f8f9fa;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
}
.county-info-item .label {
  color: #999;
  font-size: 12px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.county-info-item .value { color: #333; font-weight: 600; font-size: 16px; }

/* ---- 总分 + 标签 + 地图 横向布局 ---- */
.county-score-tag-row {
  display: flex;
  gap: 20px;
  margin: 30px 0 25px;
  align-items: stretch;
}
.county-score-tag-row .left-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
  min-width: 0;
}

/* 总分卡片 */
.county-total-section {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
}
.county-total-score { font-size: 42px; font-weight: bold; margin: 6px 0; }
.county-total-grade {
  font-size: 22px;
  font-weight: bold;
  padding: 6px 20px;
  border-radius: 25px;
  background: rgba(255,255,255,0.2);
  display: inline-block;
}

/* 标签区 */
.county-tag-section { margin-bottom: 0; }
.county-tag-list { display: flex; flex-direction: column; gap: 10px; }
.county-tag-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px 16px;
  border-left: 4px solid #059669;
}
.county-tag-card.county-tag-season { border-left-color: #e74c3c; }
.county-tag-card.county-tag-advantage { border-left-color: #3498db; }
.county-tag-card.county-tag-investment { border-left-color: #f39c12; }
.county-tag-label {
  font-size: 11px;
  color: #999;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.county-tag-value { font-size: 15px; font-weight: 600; color: #333; }
.county-tag-desc { font-size: 12px; color: #666; margin-top: 4px; line-height: 1.4; }

/* 地图 */
.county-map-section {
  flex: 1;
  min-height: 320px;
  min-width: 260px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
}
.county-map-section svg { width: 100%; height: auto; }

/* ---- 维度区块 ---- */
.county-dimension-section {
  margin-bottom: 25px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}
.county-dimension-header {
  padding: 15px 20px;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.county-dimension-header.county-d1 { background: #e8f4fd; color: #2980b9; }
.county-dimension-header.county-d2 { background: #eafaf1; color: #27ae60; }
.county-dimension-header.county-d3 { background: #fef5e7; color: #f39c12; }
.county-dimension-header.county-d4 { background: #f4ecf7; color: #8e44ad; }
.county-dimension-score { font-size: 24px; }
.county-dimension-body { padding: 15px 20px; font-size: 14px; line-height: 1.8; }

/* ---- 子维度折叠 ---- */
.county-sub-dimension {
  margin-bottom: 10px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.county-sub-dimension:hover { border-color: #bbb; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.county-sub-dimension.county-expanded { border-color: #667eea; }
.county-sub-dim-header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbfc;
}
.county-sub-dimension.county-expanded .county-sub-dim-header { background: #f0f2ff; }
.county-sub-dim-title { font-weight: 600; color: #333; font-size: 15px; }
.county-sub-dim-score {
  font-weight: bold;
  color: #667eea;
  font-size: 16px;
  margin-left: auto;
  margin-right: 10px;
}
.county-sub-dim-toggle { color: #999; font-size: 12px; transition: transform 0.2s; }
.county-sub-dimension.county-expanded .county-sub-dim-toggle { transform: rotate(180deg); }
.county-sub-dim-body {
  padding: 0 16px 16px 16px;
  background: #fff;
  display: none;
}
.county-sub-dimension.county-expanded .county-sub-dim-body { display: block; }

/* ---- 数据列表 ---- */
.county-data-list { list-style: none; padding: 0; margin: 10px 0 0 0; }
.county-data-list li {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #667eea;
  font-size: 13px;
}
.county-score-badge {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
}
.county-calc-note {
  font-size: 12px;
  color: #666;
  margin: 8px 0;
  padding: 8px 12px;
  background: #f0f7ff;
  border-radius: 6px;
}
.county-raw-data { font-size: 13px; color: #555; margin: 8px 0; }
.county-raw-data strong { color: #333; }
.county-item-note {
  font-size: 11px;
  color: #999;
  margin-top: 3px;
  padding-left: 8px;
  border-left: 2px solid #eee;
}
.county-proxy-score {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f0f7ff;
  border-left: 3px solid #3498db;
  border-radius: 4px;
  font-size: 13px;
  color: #2c3e50;
}

/* ---- 等级色 ---- */
.county-grade-A { background: #c0392b; color: white; }
.county-grade-B { background: #e67e22; color: white; }
.county-grade-C { background: #2980b9; color: white; }
.county-grade-D { background: #7f8c8d; color: white; }

/* ---- 状态 ---- */
.county-loading { text-align: center; padding: 60px; color: #999; font-size: 15px; }
.county-error { background: #e74c3c; color: white; padding: 20px; border-radius: 8px; margin: 30px; font-size: 16px; }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .county-header { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
  .county-content { padding: 16px; }
  .county-score-tag-row { flex-direction: column; }
  .county-map-section {
    flex: 0 0 auto;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    min-height: auto;
    min-width: auto;
  }
}
