/* 资源专题页（国家公园 / 世界遗产 / 地质遗迹）补充样式 */

/* earthquakes.css 只声明了 #eqChart；本页用 #themeChart，不镜像会高度坍成 0，
   ECharts resize/create 坐标系时对 null[0] 抛错 */
#themeChart {
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* 详情：上方固定介绍，下方关联文档独立滚动（对齐 /map/chengshiqun） */
#themeDetail.eq-detail {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    overflow: hidden;
}

#themeDetail.eq-detail.d-none {
    display: none !important;
}

.theme-detail-info {
    flex-shrink: 0;
}

.theme-detail-desc {
    padding: 0.35rem 0.75rem 0;
    font-size: 0.84rem;
    color: #37424c;
    line-height: 1.65;
    word-break: break-word;
    white-space: pre-wrap;
}

.theme-detail-meta {
    padding: 0.35rem 0.75rem 0.55rem;
    font-size: 0.72rem;
    color: #8a95a1;
}

/* 关联文档区复用 cityclusters.css 的 .cc-docs-* / .cc-doc-item */
#themeDocsList {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 0.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.theme-layer-btn.active {
    color: #fff !important;
}

/* 图层开关与右侧「全国 / 全屏」同高同字号，避免图标按钮偏矮或偏高 */
#themeWorkspace .eq-top-actions {
    --theme-ctrl-h: 1.875rem;
}

#themeWorkspace .eq-top-actions .geo-layer-btn,
#themeWorkspace .eq-top-actions .eq-view-switch .btn {
    box-sizing: border-box;
    height: var(--theme-ctrl-h);
    min-height: var(--theme-ctrl-h);
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    --bs-btn-padding-y: 0;
    font-size: 0.8rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#themeWorkspace .eq-top-actions .geo-layer-btn {
    --bs-btn-padding-x: 0.65rem;
    gap: 0.3rem;
}

#themeWorkspace .eq-top-actions .geo-layer-btn i,
#themeWorkspace .eq-top-actions .eq-view-switch .btn i {
    font-size: 0.8rem;
    line-height: 1;
    width: 1em;
    height: 1em;
    margin: 0;
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 顶栏与地震页统一：静态图集不呼吸闪烁 */
#themeUpdateLine .eq-live-dot {
    animation: none;
    background: var(--bs-primary, #2163e8);
    box-shadow: none;
}

/* —— 移动适配 —— */
@media (max-width: 991.98px) {
    #themeWorkspace .eq-top-actions {
        --theme-ctrl-h: 1.75rem;
    }

    /* 覆盖 geography：移动端仍显示完整文案（图标+文字），不用单字短标签 */
    #themeWorkspace .geo-layer-txt-full {
        display: inline !important;
    }

    #themeWorkspace .geo-layer-txt-short {
        display: none !important;
    }

    /* 与右侧「全国/全屏」同一行右对齐；宽度随文字，不拉满整行 */
    #themeWorkspace .eq-top-actions {
        flex-wrap: nowrap;
        justify-content: flex-end;
        width: auto;
        flex: 0 1 auto;
        min-width: 0;
        gap: 0.3rem;
    }

    #themeWorkspace .eq-top-actions .eq-view-switch {
        order: 2;
        flex: 0 0 auto;
    }

    #themeWorkspace #themeLayerSwitch.geo-layer-switch {
        order: 1;
        flex: 0 1 auto !important;
        width: auto !important;
        max-width: 100%;
        min-width: 0;
        display: inline-flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        margin-left: 0;
    }

    #themeWorkspace #themeLayerSwitch.geo-layer-switch::-webkit-scrollbar {
        display: none;
    }

    #themeWorkspace .eq-top-actions .geo-layer-btn,
    #themeWorkspace .eq-top-actions .eq-view-switch .btn {
        font-size: 0.74rem;
        --bs-btn-padding-x: 0.45rem;
        white-space: nowrap;
    }

    #themeWorkspace .eq-top-actions .geo-layer-btn {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0;
    }

    #themeWorkspace .eq-top-actions .geo-layer-btn i,
    #themeWorkspace .eq-top-actions .eq-view-switch .btn i {
        font-size: 0.74rem;
    }

    /* 窄屏压缩状态文案，给右侧操作留空 */
    #themeWorkspace #themeUpdateLine {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 42%;
    }

    #themeWorkspace #themeUpdateTime {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }
}

@media (max-width: 575.98px) {
    #themeWorkspace .eq-top-actions {
        --theme-ctrl-h: 1.7rem;
    }

    #themeWorkspace .eq-top-actions .geo-layer-btn,
    #themeWorkspace .eq-top-actions .eq-view-switch .btn {
        font-size: 0.72rem;
        font-weight: 600;
        --bs-btn-padding-x: 0.38rem;
    }

    #themeWorkspace .eq-top-actions .geo-layer-btn {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    /* 手机：状态行只留「静态图集」，时间放到 title 里看 */
    #themeWorkspace .eq-update-sep,
    #themeWorkspace #themeUpdateTime {
        display: none;
    }

    #themeWorkspace #themeUpdateLine {
        max-width: none;
    }
}
