/* ============ 组件样式 ============ */

/* 顶部 Tab */
.nav-tab {
  color: rgba(255, 255, 255, .85);
  font-size: 15px; padding: 8px 16px; border-radius: 20px; transition: .2s;
}
.nav-tab:hover { background: rgba(255, 255, 255, .15); }
.nav-tab.active { background: #fff; color: var(--primary); font-weight: 600; }

/* 面板 Tab 内容 */
.panel-tab { display: none; padding: 16px; }
.panel-tab.active { display: block; }

/* 分类筛选 chips */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  font-size: 13px; padding: 5px 14px; border-radius: 16px; transition: .2s;
}
.chip:hover { border-color: var(--primary-2); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 景点列表 */
.spot-list { display: flex; flex-direction: column; gap: 10px; }
.spot-item {
  display: flex; gap: 12px; padding: 10px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  cursor: pointer; transition: .2s;
}
.spot-item:hover { border-color: var(--primary-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.spot-thumb { width: 76px; height: 60px; border-radius: 8px; overflow: hidden; flex: none; }
.spot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.no-img {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e0ecf7, #cfd9e2); font-size: 22px;
}
.spot-info { flex: 1; min-width: 0; }
.spot-name { font-weight: 600; font-size: 15px; }
.spot-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 3px 0; }
.mini-tag { font-size: 11px; color: var(--primary); background: rgba(107, 165, 215, .14); padding: 1px 7px; border-radius: 8px; }
.spot-intro {
  font-size: 12.5px; color: var(--text-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 路线卡片 */
.route-list { display: flex; flex-direction: column; gap: 12px; }
.route-card {
  border: 1px solid var(--border); border-radius: 14px; padding: 14px;
  background: #fff; cursor: pointer; transition: .2s;
}
.route-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.route-head { display: flex; justify-content: space-between; align-items: center; }
.route-name { font-weight: 700; font-size: 16px; }
.route-days { font-size: 12px; color: #fff; background: var(--accent); padding: 2px 10px; border-radius: 12px; }
.route-theme { font-size: 12px; color: var(--gold); margin: 4px 0 6px; font-weight: 600; }
.route-path { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.route-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

/* 天气卡片 */
.weather-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.weather-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  background: #fff; cursor: pointer; transition: .2s;
}
.weather-card:hover { border-color: var(--primary-2); box-shadow: var(--shadow); }
.wc-top { display: flex; justify-content: space-between; align-items: center; }
.wc-name { font-size: 13px; font-weight: 600; }
.wc-emoji { font-size: 18px; }
.wc-temp { font-size: 26px; font-weight: 700; margin: 4px 0 2px; }
.wc-unit { font-size: 13px; font-weight: 400; color: var(--text-2); }
.wc-desc { font-size: 12px; color: var(--text-2); }
.wc-range { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.weather-loading { grid-column: 1 / -1; text-align: center; color: var(--text-2); padding: 30px 0; }

/* 地图大头针 */
.amap-pin {
  position: relative; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 600; padding: 5px 11px;
  border-radius: 14px 14px 14px 3px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
  cursor: pointer; white-space: nowrap;
}
.amap-pin::after {
  content: ''; position: absolute; bottom: -6px; left: 9px;
  border: 6px solid transparent; border-top-color: var(--primary); border-bottom: 0;
}
.amap-pin.red { background: var(--red); }
.amap-pin.red::after { border-top-color: var(--red); }

/* 地图信息窗 */
.iw { width: 230px; overflow: hidden; border-radius: 12px; background: #fff; }
.iw-img { width: 100%; height: 120px; object-fit: cover; display: block; }
.iw-body { padding: 12px; }
.iw-cat { display: inline-block; color: #fff; font-size: 11px; padding: 2px 9px; border-radius: 10px; margin-bottom: 6px; }
.iw-title { font-size: 16px; margin-bottom: 4px; }
.iw-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin-bottom: 6px; }
.iw .mini-tag { margin-right: 4px; }

/* 详情入口 */
.spot-detail { flex: none; align-self: center; font-size: 12px; color: var(--primary); padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
.spot-detail:hover { background: rgba(107, 165, 215, .12); }
.route-detail { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent); font-weight: 600; }
.route-detail:hover { text-decoration: underline; }
.iw-detail { display: inline-block; margin-top: 8px; color: var(--primary); font-weight: 600; font-size: 13px; }
.iw-detail:hover { text-decoration: underline; }

/* 地图加载失败提示 */
.map-error {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: #a33; font-size: 14px; padding: 20px; text-align: center;
}
