﻿/* detail.css - 文献详情页专用样式 */

/* 基础布局 */
.detail-container {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

/* 文献标题区域 */
.document-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.document-title {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: #212529;
}

.document-title-translation {
    font-size: 1.1rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 1rem;
}

/* 功能按钮区域 - 重新设计 */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 120px;
}

.action-btn-primary {
    background-color: #1e88e5;
    color: white;
    border-color: #1e88e5;
}

    .action-btn-primary:hover {
        background-color: #1976d2;
        border-color: #1565c0;
    }

.action-btn-secondary {
    background-color: white;
    color: #495057;
    border-color: #dee2e6;
}

    .action-btn-secondary:hover {
        background-color: #f8f9fa;
        border-color: #ced4da;
        color: #1e88e5;
    }

.action-btn i {
    margin-right: 0.4rem;
    font-size: 0.9em;
}

/* 移动端按钮调整 - 两行布局 */
@media (max-width: 768px) {
    .action-buttons {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .action-btn {
        min-width: 0;
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }

        .action-btn i {
            margin-right: 0.3rem;
        }
}

/* 更小的移动设备调整 */
@media (max-width: 576px) {
    .action-buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    .document-title {
        font-size: 1.5rem;
    }

    .document-title-translation {
        font-size: 1rem;
    }
}

/* 选项卡样式 */
.nav-tabs {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1.5rem;
}

    .nav-tabs .nav-link {
        color: #495057;
        border: none;
        padding: 0.75rem 1.25rem;
        font-weight: 500;
        border-bottom: 3px solid transparent;
    }

        .nav-tabs .nav-link:hover {
            color: #1e88e5;
            border-color: transparent;
        }

        .nav-tabs .nav-link.active {
            color: #1e88e5;
            background-color: transparent;
            border-color: #1e88e5;
        }

/* 元数据区域 */
.metadata-section {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.metadata-row {
    display: flex;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.metadata-label {
    flex: 0 0 120px;
    color: #6c757d;
    font-weight: 500;
}

.metadata-value {
    flex: 1;
}

.highlight {
    color: #1e88e5;
    font-weight: 500;
}

/* 摘要区域 */
.abstract-block {
    margin-bottom: 1.5rem;
}

.abstract-label {
    font-weight: 600;
    color: #1e88e5;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

    .abstract-label i {
        margin-right: 0.5rem;
    }

.abstract-content {
    line-height: 1.7;
    padding-left: 1.75rem;
}

/* 引文区域 */
.citation-content {
    background-color: #f8f9fa;
    padding: 1.25rem;
    border-radius: 4px;
    line-height: 1.7;
}

/* 相关文献区域 */
.related-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

    .related-item:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }

.related-item-title {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.25rem;
}

    .related-item-title:hover {
        color: #1e88e5;
    }

.related-item-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .metadata-row {
        flex-direction: column;
    }

    .metadata-label {
        flex: 1;
        margin-bottom: 0.25rem;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}



/* 加载动画样式 */
.fa-spinner {
    font-size: 1.5rem;
    color: #1e88e5;
    margin-bottom: 1rem;
}

/* 错误提示样式 */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* 引用文献样式 */
.citation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.citation-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

    .citation-item:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }

.citation-item-content {
    line-height: 1.6;
}

.citation-author {
    font-weight: 500;
    color: #1e88e5;
}

.citation-year {
    color: #6c757d;
    font-weight: 500;
}

.citation-title {
    font-style: italic;
    margin: 0.25rem 0;
}

.citation-journal {
    font-weight: 500;
}

.citation-volume {
    font-weight: 500;
}

.citation-pages {
    color: #6c757d;
}

.citation-doi {
    color: #6c757d;
    font-size: 0.9rem;
    word-break: break-all;
}

.citation-unstructured {
    white-space: pre-line;
    line-height: 1.7;
}

.citation-number {
    display: inline-block;
    width: 1.5rem;
    color: #6c757d;
    font-weight: 500;
    vertical-align: top;
}

.citation-text {
    display: inline-block;
    width: calc(100% - 2rem);
}



/* 引文展开/收起样式 */
.citation-list {
    max-height: none;
    overflow: hidden;
    transition: max-height 0.3s ease;
}



.expand-citations-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    text-align: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #1e88e5;
    cursor: pointer;
    transition: all 0.2s;
}

    .expand-citations-btn:hover {
        background-color: #e9ecef;
        color: #0d6efd;
    }

    .expand-citations-btn i {
        margin-left: 0.5rem;
        transition: transform 0.3s;
    }

    .expand-citations-btn.expanded i {
        transform: rotate(180deg);
    }



/* 引文列表容器 */
.citation-list-container {
    position: relative;
}

/* 引文列表 - 折叠状态 */
.citation-list.collapsed {
    max-height: none; /* 移除固定高度 */
    overflow: hidden;
    position: relative;
}

    /* 创建"折叠"效果的伪元素 */
    .citation-list.collapsed::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px; /* 渐变区域高度 */
        background: linear-gradient(to bottom, rgba(248,249,250,0) 0%, rgba(248,249,250,1) 100%);
        pointer-events: none;
    }

    /* 引文项 */
    .citation-list.collapsed li:nth-child(n+11) {
        display: none; /* 隐藏第11条及以后的条目 */
    }

/* 展开按钮 */
.expand-citations-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    text-align: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #1e88e5;
    cursor: pointer;
    transition: all 0.2s;
    position: relative; /* 确保在渐变层之上 */
    z-index: 1;
}

    .expand-citations-btn:hover {
        background-color: #e9ecef;
        color: #0d6efd;
    }

    .expand-citations-btn i {
        margin-left: 0.5rem;
        transition: transform 0.3s;
    }

    .expand-citations-btn.expanded i {
        transform: rotate(180deg);
    }