/* ============================================================
   舆图经纬（首页地图视图）样式
   —— 独立文件，不碰 index.css，避免影响原有浏览界面
   ============================================================ */

/* ===== 顶部视图切换条 ===== */
.view-switch {
    position: sticky;
    top: 0;
    z-index: 1400;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(247, 242, 233, .96);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    backdrop-filter: blur(6px);
}
.vs-btn {
    font: inherit;
    font-size: 15px;
    padding: 7px 22px;
    border: 1px solid rgba(166, 64, 46, .28);
    background: transparent;
    color: #6b6252;
    border-radius: 999px;
    cursor: pointer;
    transition: all .18s ease;
}
.vs-btn:hover { background: rgba(166, 64, 46, .08); }
.vs-btn.active {
    background: #a6402e;
    border-color: #a6402e;
    color: #f7f2e9;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(166, 64, 46, .28);
}

/* ===== 地图视图骨架 ===== */
.geo-view { display: none; }
.geo-view.active { display: block; }
#viewBrowse.hidden { display: none; }

.geo-layout {
    display: flex;
    height: calc(100vh - 52px);   /* 减去切换条 */
    min-height: 520px;
    overflow: hidden;
}

/* ---- 左侧栏 ---- */
.geo-side {
    flex: none;
    width: 320px;
    display: flex;
    flex-direction: column;
    background: #fffcf6;
    border-right: 1px solid rgba(0, 0, 0, .08);
    overflow: hidden;
}
.geo-side-head { padding: 14px 16px 10px; border-bottom: 1px solid rgba(0, 0, 0, .07); }
.geo-title { font-size: 17px; font-weight: 700; color: #2a2318; letter-spacing: .02em; }
.geo-sub { margin-top: 3px; font-size: 12px; color: #9a8f7b; }

.geo-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
}
.geo-chip {
    font: inherit;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .14);
    background: #fff;
    color: #6b6252;
    cursor: pointer;
}
.geo-chip:hover { border-color: rgba(166, 64, 46, .4); }
.geo-chip.active { background: #a6402e; border-color: #a6402e; color: #fff; }

.geo-list { flex: 1; overflow-y: auto; padding: 8px 10px 20px; }
.geo-item {
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.geo-item:hover { background: rgba(166, 64, 46, .06); }
.geo-item.active { background: rgba(166, 64, 46, .1); border-color: rgba(166, 64, 46, .35); }
.geo-item-t {
    font-size: 14px;
    font-weight: 600;
    color: #2a2318;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}
.geo-item-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.geo-item-m { margin-top: 3px; font-size: 12px; color: #9a8f7b; }
.geo-item-m span + span::before { content: ' · '; }
.geo-empty { padding: 28px 16px; text-align: center; color: #9a8f7b; font-size: 13px; line-height: 1.8; }

/* ---- 右侧地图 ---- */
.geo-map-wrap { position: relative; flex: 1; min-width: 0; }
#geoMap { position: absolute; inset: 0; background: #eae5d9; }

.geo-legend {
    position: absolute;
    left: 12px;
    bottom: 16px;
    z-index: 800;
    background: rgba(255, 252, 246, .95);
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12px;
    line-height: 1.9;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .14);
    max-width: 220px;
}
.geo-legend b { display: block; margin-bottom: 3px; font-size: 12px; color: #2a2318; }
.geo-legend .row { display: flex; align-items: center; gap: 7px; color: #6b6252; }
.geo-legend .sw { width: 14px; height: 10px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .2); flex: none; }

/* ---- 未配 key 的说明遮罩 ---- */
.geo-mask {
    position: absolute;
    inset: 0;
    z-index: 900;
    display: grid;
    place-items: center;
    background: #eae5d9;
    padding: 20px;
}
.geo-mask[hidden] { display: none; }
.geo-mask-box {
    max-width: 460px;
    background: #fffcf6;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    padding: 22px 24px;
    font-size: 14px;
    line-height: 1.85;
    color: #4a4234;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}
.geo-mask-t { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: #2a2318; }
.geo-mask-box code {
    background: #efe7d6;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 13px;
}
.geo-mask-box a { color: #a6402e; }
.geo-mask-note { font-size: 13px; color: #9a8f7b; }
.geo-mask-btn {
    margin-top: 12px;
    font: inherit;
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: #a6402e;
    color: #f7f2e9;
    cursor: pointer;
}
.geo-mask-btn:hover { background: #8c3525; }

/* ---- 地图上的标签（高德 AMap.Text） ---- */
.geo-tag {
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 0 6px rgba(0, 0, 0, .6);
    white-space: nowrap;
}

/* ---- 信息窗内容 ---- */
.geo-info { font-size: 13px; line-height: 1.7; min-width: 200px; }
.geo-info h4 { margin: 0 0 4px; font-size: 15px; color: #2a2318; font-weight: 700; }
.geo-info .m { color: #8a7f6b; font-size: 12px; margin-bottom: 6px; }
.geo-info .d { color: #4a4234; margin-bottom: 10px; }
.geo-info .btn {
    display: inline-block;
    padding: 6px 14px;
    background: #a6402e;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}
.geo-info .btn:hover { background: #8c3525; }

/* ===== 窄屏：侧栏改为底部抽屉 ===== */
@media (max-width: 820px) {
    .geo-layout { flex-direction: column; height: calc(100vh - 52px); }
    .geo-side { width: 100%; height: 42%; border-right: none; border-bottom: 1px solid rgba(0, 0, 0, .08); }
    .geo-map-wrap { flex: 1; }
    .geo-legend { display: none; }
}
