/*
 * 数据详情页（/data/<id>/）
 * 布局参考 rsdata.gisbook.cn 数据详情页：
 * 顶部标题通栏 + 左侧 9 栏正文 + 右侧 3 栏信息栏
 */

/* ---------- 页面容器与标题 ---------- */
.containerBg {
    background: #FFFFFF;
}

.detail-page {
    padding-bottom: 40px;
}

.detail-breadcrumb {
    margin-top: 15px;
    margin-bottom: 0;
}

.detail-title-bar {
    margin-top: 20px;
}

.detail-title {
    margin: 0 0 8px;
    color: #1f2d3d;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.4;
    word-wrap: break-word;
}

.detail-title-bar .englishTitle {
    margin: 0;
    color: #7b8794;
    font-size: 16px;
    line-height: 1.5;
}

.detail-divider {
    margin: 18px 0 22px;
    border-top: 1px solid #e6e8eb;
}

/* ---------- 正文（左侧） ---------- */
.leftContent {
    padding-bottom: 20px;
}

.leftContent p {
    margin-bottom: 12px;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.9;
    text-align: justify;
}

.leftContent h6,
.rightContent h6 {
    margin: 26px 0 14px;
    padding: 4px 10px;
    border-left: 4px solid var(--sanji-color, #1590ff);
    border-radius: 2px;
    background: #f4f8ff;
    color: #1f2d3d;
    font-size: 16px;
    font-weight: 600;
    line-height: 26px;
}

.leftContent h6 i,
.rightContent h6 i {
    margin-right: 5px;
    color: var(--sanji-color, #1590ff);
}

.rightContent h6:first-of-type {
    margin-top: 18px;
}

/* 摘要 + 缩略图 */
.metadataContent .metaDesc {
    overflow: hidden;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.9;
    text-align: justify;
}

.metadataContent .metadata-thumbnail {
    float: left;
    margin: 4px 20px 12px 0;
    text-align: center;
}

.metadataContent .metadata-thumbnail img.metadata-img {
    width: 220px;
    height: 155px;
    padding: 4px;
    border: 1px solid #e1e5eb;
    border-radius: 4px;
    background: #FFFFFF;
    object-fit: cover;
    cursor: zoom-in;
}

.metadataContent .metadata-thumbnail p {
    margin: 6px 0 0;
    text-align: center;
}

.metadataContent .metadata-thumbnail p a {
    color: #8492a6;
    font-size: 12px;
    text-decoration: none;
}

.metadataContent .metadata-thumbnail p a:hover {
    color: var(--sanji-color, #1590ff);
}

.metaDesc-text p {
    margin: 0 0 10px;
}

/* 引用区块 */
.leftContent h6.reference-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.reference-title .reference-actions {
    margin-left: auto;
    padding-left: 10px;
}

.reference-title .reference-actions .btn {
    margin-left: 6px;
    border-radius: 14px;
}

.citation-label {
    display: inline-block !important;
    margin: 6px 0;
    padding: 5px 10px;
    border-radius: 12px;
    background: #eaf4ff !important;
    color: #1565c0 !important;
    font-size: 12px;
    font-weight: 500;
}

.citation-text {
    word-break: break-word;
}

.citation-tip {
    padding: 8px 10px;
    border: 1px dashed #f0c36d;
    border-radius: 4px;
    background: #fffaf0;
    color: #7a5b13 !important;
    font-size: 13px !important;
}

.citation-tip .glyphicon {
    margin-right: 4px;
    color: #e6a23c;
}

/* 相关资源选项卡 */
.detail-page .resource-tabs {
    margin-bottom: 10px;
}

.detail-page #myTab {
    border-bottom: 1px solid #e1e5eb;
}

.detail-page #myTab > li > a {
    margin-right: 4px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    color: #52606d;
}

.detail-page #myTab > li > a:hover {
    background: #f4f8ff;
    color: var(--sanji-color, #1590ff);
}

.detail-page #myTab > li.active > a,
.detail-page #myTab > li.active > a:hover,
.detail-page #myTab > li.active > a:focus {
    border-color: #e1e5eb #e1e5eb transparent;
    background: #FFFFFF;
    color: var(--sanji-color, #1590ff);
    font-weight: 600;
}

.detail-page #myTabContent {
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 1px solid #e1e5eb;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: #FFFFFF;
}

.detail-page #myTabContent p {
    margin-bottom: 8px;
    line-height: 1.8;
    text-indent: 0;
}


/* ---------- 右侧信息栏 ---------- */
.rightContent {
    padding-bottom: 20px;
}

.rightContent p {
    margin-bottom: 8px;
    color: #52606d;
    font-size: 13px;
    line-height: 1.8;
}

.rightContent p a,
.rightContent ul li a {
    color: var(--sanji-color, #1590ff);
}

.rightContent p a:hover,
.rightContent ul li a:hover {
    text-decoration: underline;
}

.detail-edit-btn {
    margin-bottom: 12px;
    border-radius: 4px;
}

.detail-actions {
    margin-bottom: 10px;
}

/* 下载 / 申请按钮 */
.addBtn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 9px 12px;
    border-radius: 24px;
    background: var(--sanji-color, #1590ff);
    color: #FFFFFF;
    font-size: 15px;
    text-align: center;
    text-decoration: none;
}

.addBtn:hover,
.addBtn:focus {
    background: #0f7ce0;
    color: #FFFFFF;
    text-decoration: none;
}

.detail-action-btn {
    display: block;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #e1e5eb;
    border-radius: 4px;
    background: #fbfcfe;
    color: #52606d;
    text-align: center;
}

.detail-action-btn strong {
    display: block;
    color: #334e68;
    font-size: 14px;
}

.detail-action-btn span {
    font-size: 12px;
}

.detail-action-btn.detail-action-review {
    border-color: var(--sanji-color, #1590ff);
    background: #f4f8ff;
}

.detail-action-btn.detail-action-disabled {
    color: #8492a6;
    cursor: not-allowed;
}

a.detail-action-btn:hover {
    text-decoration: none;
}

/* 关注按钮 */
.rightContent .concern {
    display: block;
    width: 100%;
    margin: 0 0 12px;
    padding: 8px 12px;
    border: 1px solid #cfe4ff;
    border-radius: 24px;
    background: #f4f8ff;
    color: #2b7fd4;
    font-size: 14px;
    text-align: center;
}

.rightContent .concern:hover,
.rightContent .concern:focus {
    border-color: var(--sanji-color, #1590ff);
    background: #eaf4ff;
    color: var(--sanji-color, #1590ff);
}

/* 关键词 */
.rightSearchBox {
    margin-bottom: 6px;
    padding: 4px 10px;
    border: 1px solid #e1e5eb;
    border-radius: 4px;
    background: #fbfcfe;
}

.rightSearchBox ul {
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}

.rightSearchBox ul li {
    overflow: hidden;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e6e8eb;
    list-style: none;
}

.rightSearchBox ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.rightSearchBox ul li span {
    display: block;
    float: left;
    min-width: 44px;
    color: #334e68;
    font-weight: 600;
    line-height: 24px;
}

.rightSearchBox ul li a {
    display: block;
    float: left;
    margin: 0 6px 6px 0;
    padding: 2px 8px;
    border-radius: 12px;
    background: #eef2f6;
    color: #52606d;
    font-size: 12px;
    line-height: 20px;
}

.rightSearchBox ul li a:hover {
    background: var(--sanji-color, #1590ff);
    color: #FFFFFF;
    text-decoration: none;
}


/* 空间位置地图 */
.topMap {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border: 1px solid #e1e5eb;
    border-radius: 4px;
    background: #f4f8ff;
}

.topMapFullScreen {
    position: fixed;
    top: 140px;
    left: 0;
    z-index: 1020;
    width: 100%;
    height: calc(100vh - 140px);
    border: none;
    background: rgba(0, 0, 0, 0.5);
}

#controlMap {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    padding: 2px 10px;
    border: none;
    border-radius: 12px;
    outline: none;
    background: rgba(31, 45, 61, 0.55);
    color: #FFFFFF;
    font-size: 12px;
    line-height: 20px;
    cursor: pointer;
}

#controlMap:hover {
    background: rgba(31, 45, 61, 0.8);
}

#controlMap.closeMap {
    background: rgba(219, 68, 55, 0.85);
}

.bbox-table {
    margin: 12px 0 0 !important;
    border: 1px solid #e1e5eb;
}

.bbox-table > tbody > tr > th {
    padding: 6px 8px;
    border: 1px solid #e1e5eb !important;
    background: #fbfcfe;
    color: #52606d;
    font-size: 12px;
    font-weight: 500;
}

/* 数据细节 */
.detail-list {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e1e5eb;
    border-radius: 4px;
    background: #fbfcfe;
    list-style: none;
}

.detail-list li {
    margin-bottom: 6px;
    color: #52606d;
    font-size: 13px;
    line-height: 22px;
    word-break: break-word;
}

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

.detail-list li strong {
    color: #334e68;
    font-weight: 600;
}

.detail-list .detail-list-action .btn {
    display: block;
    width: 100%;
    padding: 6px 12px;
    border-radius: 4px;
}

.detail-list-progress .progress {
    margin-bottom: 0;
}

/* 附件 */
.attachment-list {
    margin: 0;
    padding-left: 18px;
}

.attachment-list li {
    margin-bottom: 4px;
    color: #52606d;
    font-size: 13px;
}

/* 联系信息 */
.contact-info p {
    margin-bottom: 8px;
    word-break: break-word;
}

.contact-info i {
    margin-right: 4px;
    color: #8492a6;
}

/* 导出元数据 */
.export-box {
    margin-bottom: 10px;
}

.detail-page .export-box .btn.btn-default {
    margin: 0 6px 0 0;
    margin-bottom: 0 !important;
    border: 1px solid #d9e2ec;
    border-radius: 4px;
    color: #52606d;
}

.detail-page .export-box .btn.btn-default:hover {
    border-color: var(--sanji-color, #1590ff);
    background: #f4f8ff;
    color: var(--sanji-color, #1590ff);
}

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
    .detail-title {
        font-size: 22px;
    }

    .rightContent {
        margin-top: 10px;
    }

    .metadataContent .metadata-thumbnail {
        float: none;
        margin: 0 auto 12px;
    }
}

@media (max-width: 767px) {
    .metadataContent .metadata-thumbnail img.metadata-img {
        width: 100%;
        height: auto;
    }

    .leftContent h6.reference-title {
        align-items: flex-start;
    }

    .reference-title .reference-actions {
        width: 100%;
        margin: 6px 0 0;
        padding-left: 0;
    }
}

