/* ====================================================================== */
/* 功能六：批量专利查询与解读 - 样式文件 */
/* ====================================================================== */

/* 专利配置网格布局 */
.patent-batch-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .patent-batch-config-grid {
        grid-template-columns: 1fr;
    }
}

/* 专利号输入区域 */
.patent-input-section {
    display: flex;
    flex-direction: column;
}

.patent-input-wrapper {
    position: relative;
}

.patent-input-wrapper textarea {
    width: 100%;
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.copy-btn-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.copy-btn-overlay:hover {
    opacity: 1;
}

.patent-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

/* 配置区域 */
.patent-config-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.config-item-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.config-item-compact label {
    font-weight: 500;
    font-size: 0.95em;
}

.config-input-group {
    display: flex;
    gap: 8px;
}

.config-input-group select {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.info-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}

.info-hint svg {
    flex-shrink: 0;
}

.config-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.primary-btn {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.delete-button {
    background-color: #dc3545 !important;
    color: white !important;
}

/* 专利条带列表 */
.patent-strip-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 统一后的专利条带样式 - 与同族引用相似结果样式一致 */
.patent-strip {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.patent-strip:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.patent-strip.success {
    border-left: 4px solid #28a745;
}

.patent-strip.error {
    border-left: 4px solid #dc3545;
    cursor: default;
}

.patent-strip.error:hover {
    background: white;
    border-color: #e0e0e0;
    box-shadow: none;
}

/* 专利条带图片区域 */
.patent-strip-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 15px;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.patent-strip-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.patent-strip-image .no-image {
    font-size: 0.75em;
    color: #999;
    text-align: center;
}

.patent-strip-content {
    flex: 1;
    min-width: 0;
}

.patent-strip-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1em;
    margin-bottom: 4px;
}

.patent-strip-title {
    color: #333;
    font-size: 0.95em;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 专利条带元信息 - 申请人、发明人、申请日等 */
.patent-strip-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85em;
    color: #666;
    flex-wrap: wrap;
}

.patent-strip-meta span {
    display: inline-flex;
    align-items: center;
}

.patent-strip-error {
    color: #dc3545;
    font-size: 0.9em;
}

.patent-strip-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.patent-strip-copy-btn {
    padding: 4px 10px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.patent-strip-copy-btn:hover {
    background: #218838;
}

/* 缓存标记 */
.cache-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
}

/* 解读状态标记 */
.analysis-badge {
    margin-left: 10px;
    padding: 2px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 10px;
    font-size: 12px;
}

/* 解读结果区域 */
.patent-analysis-result {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

/* 原始结果标签页特殊样式 */
.original-results-tab .patent-tab-source-banner {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%) !important;
    border-left-color: var(--primary-color) !important;
}

/* 专利详情弹窗 - 无遮罩层版本 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    pointer-events: none; /* 让背景不拦截点击事件 */
}

.modal.show {
    display: flex; /* 显示时使用flex布局 */
}

.modal-content {
    pointer-events: auto; /* 弹窗内容可以接收点击事件 */
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.1); /* 增强阴影效果 */
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--primary-color);
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3em;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2em;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
    font-family: 'Noto Sans SC', Arial, sans-serif;
    line-height: 1.6;
}

/* 专利卡片头部 */
.patent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.ask-patent-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    transition: background 0.2s;
    flex-shrink: 0;
}

.ask-patent-btn:hover {
    background: #0056b3;
}

/* 字段复制按钮 - 超小尺寸 */
.copy-field-btn {
    margin-left: 4px;
    padding: 2px 4px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    min-height: auto !important;
    height: auto !important;
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    border-radius: 2px !important;
    cursor: pointer;
    transition: background 0.2s;
    vertical-align: middle;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.copy-field-btn svg {
    width: 10px !important;
    height: 10px !important;
}

.copy-field-btn:hover {
    background: #218838 !important;
}

/* 权利要求容器 */
.claims-container {
    /* 移除内置滚动区域限制，让权利要求直接展示在弹窗页面中 */
    max-height: none;
    overflow-y: visible;
}

.claim-item {
    margin-bottom: 8px;
    padding: 8px;
    background-color: white;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Noto Sans SC', Arial, sans-serif;
}

/* 模板编辑器面板 */
.template-editor-panel {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.template-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.template-info input,
.template-info textarea {
    width: 100%;
}

.fields-container {
    margin-bottom: 20px;
}

.fields-container h5 {
    margin-bottom: 10px;
}

#fields_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.template-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95% !important;
        max-height: 85vh !important;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .patent-strip {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .patent-strip-actions {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .patent-strip-copy-btn {
        flex: 1;
        justify-content: center;
    }
}

/* 问一问按钮样式 */
.patent-chat-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 14px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.9em !important;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.patent-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.patent-chat-btn svg {
    flex-shrink: 0;
}

/* ====================================================================== */
/* 功能六增强：缓存、自动解读、实时显示 - 新增样式 */
/* ====================================================================== */

/* 自动批量解读开关 */
.auto-analyze-toggle {
    transition: all 0.3s ease;
}

.auto-analyze-toggle:hover {
    background: #bbdefb !important;
}

.auto-analyze-toggle input[type="checkbox"] {
    accent-color: #1976d2;
}

/* 进度条容器 */
#crawl_progress_container,
#analyze_progress_container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 进度条动画 */
#crawl_progress_bar,
#analyze_progress_bar {
    position: relative;
    overflow: hidden;
}

#crawl_progress_bar::after,
#analyze_progress_bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 旋转动画（用于加载图标） */
.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 缓存标记 */
.cache-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
}

/* 缓存确认弹窗样式 */
.cache-confirm-modal .modal-content {
    max-height: 85vh;
    overflow-y: auto;
}

.cache-summary {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.cache-list {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.cache-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.cache-item:last-child {
    border-bottom: none;
}

.cache-item:hover {
    background: #f8f9fa;
}

.cache-item.old-cache {
    background: #fff8e1;
}

.cache-item.old-cache:hover {
    background: #ffecb3;
}

/* 解读结果项 */
.analysis-result-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analysis-result-header {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.analysis-status {
    transition: all 0.3s ease;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge.pending {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.processing {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.completed {
    background: #e8f5e9;
    color: #388e3c;
}

.status-badge.failed {
    background: #ffebee;
    color: #d32f2f;
}

/* 实时结果显示区域 */
#patent_results_list {
    min-height: 50px;
}

#analysis_results_list {
    min-height: 50px;
    margin-top: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .cache-confirm-modal .modal-content {
        max-width: 95% !important;
        margin: 10px;
    }
    
    .cache-summary {
        padding: 15px;
    }
    
    .cache-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cache-item button {
        width: 100%;
    }
}

/* ====================================================================== */
/* 功能六：关系专利分析标签页样式 */
/* ====================================================================== */

/* 标签页容器 */
.patent-batch-tabs-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.patent-tabs-wrapper {
    display: flex;
    flex-direction: column;
}

/* 标签页头部 */
.patent-tabs-header {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.patent-tabs-header::-webkit-scrollbar {
    height: 6px;
}

.patent-tabs-header::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.patent-tabs-header::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* 标签页按钮 */
.patent-tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-size: 0.9em;
    color: #666;
}

.patent-tab-button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.patent-tab-button.active {
    background: white;
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.patent-tab-button .tab-title {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.patent-tab-button .tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 14px;
    color: #999;
    opacity: 0;
    transition: all 0.2s;
}

.patent-tab-button:hover .tab-close {
    opacity: 1;
}

.patent-tab-button .tab-close:hover {
    background: #ffebee;
    color: #d32f2f;
}

/* 标签页内容区域 */
.patent-tabs-content {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
}

.patent-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.patent-tab-content.active {
    display: block;
}

/* 来源信息横幅 */
.patent-tab-source-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.patent-tab-source-banner .source-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.patent-tab-source-banner .source-label {
    font-size: 0.9em;
    color: #666;
}

.patent-tab-source-banner .source-patent {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1em;
}

.patent-tab-source-banner .relation-type-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.patent-tab-source-banner .patent-count {
    font-size: 0.9em;
    color: #666;
}

.patent-tab-source-banner .source-actions {
    display: flex;
    gap: 8px;
}

/* 标签页结果容器 */
.patent-tab-results-container {
    padding: 20px;
}

/* 加载状态 */
.patent-tab-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.patent-tab-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.patent-tab-loading .loading-text {
    margin-top: 20px;
    font-size: 1.1em;
    color: #666;
}

.patent-tab-loading .loading-progress {
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
}

.patent-tab-loading .progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.patent-tab-loading .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #4fc3f7);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.patent-tab-loading .progress-text {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

/* 空状态 */
.patent-tab-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

.patent-tab-empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.patent-tab-empty p {
    font-size: 1.1em;
}

/* 专利条带项（标签页内）- 使用统一样式 .patent-strip */
.patent-tab-results-container .patent-strip {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.patent-tab-results-container .patent-strip:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.patent-tab-results-container .patent-strip.success {
    border-left: 4px solid #28a745;
}

.patent-tab-results-container .patent-strip.error {
    border-left: 4px solid #d32f2f;
    background: #ffebee;
}

.patent-tab-results-container .patent-strip-title {
    color: #333;
    font-size: 0.95em;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.patent-tab-results-container .patent-strip-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85em;
    color: #666;
    flex-wrap: wrap;
}

.patent-tab-results-container .patent-strip-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.patent-tab-results-container .patent-strip-error {
    color: #d32f2f;
    font-size: 0.9em;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .patent-tab-source-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .patent-tab-source-banner .source-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .patent-tab-results-container .patent-strip,
    .patent-strip {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .patent-tab-results-container .patent-strip-image,
    .patent-strip-image {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .patent-tab-results-container .patent-strip-actions,
    .patent-strip-actions {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
    }
    
    .patent-tab-results-container .patent-strip-actions button,
    .patent-strip-actions button {
        flex: 1;
    }
}

/* ====================================================================== */
/* 解读结果表格样式 */
/* ====================================================================== */

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.analysis-table-header {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    background-color: #f2f2f2;
}

.analysis-table-field {
    border: 1px solid #ddd;
    padding: 8px;
    font-weight: 500;
}

.analysis-table-value {
    border: 1px solid #ddd;
    padding: 8px;
}

/* 解读状态样式 */
.analysis-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.analysis-status.completed {
    background: #d4edda;
    color: #155724;
}

.analysis-status.cached {
    background: #fff3cd;
    color: #856404;
}

.analysis-status.error {
    background: #f8d7da;
    color: #721c24;
}

.analysis-status.pending {
    background: #e3f2fd;
    color: #1976d2;
}

/* AI声明样式 */
.ai-disclaimer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    margin-bottom: 10px;
}

.ai-disclaimer.compact {
    padding: 6px 10px;
}

.ai-disclaimer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.ai-disclaimer-text {
    font-size: 0.85em;
    color: #64748b;
}

/* 解读警告框样式 */
.analysis-warning-box {
    padding: 10px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    margin-bottom: 10px;
    color: #856404;
}

/* 解读原始内容样式 */
.analysis-raw-content {
    white-space: pre-wrap;
    font-family: monospace;
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
}

/* 解读错误框样式 */
.analysis-error-box {
    padding: 10px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

/* 解读区域容器样式 */
.analysis-section-container {
    margin-top: 15px;
    padding: 10px;
    background-color: #e3f2fd;
    border-radius: 5px;
}

.analysis-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.analysis-section-title {
    color: var(--primary-color);
}

/* ====================================================================== */
/* 专利详情弹窗区域样式 */
/* ====================================================================== */

.detail-section {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
}

.detail-section-header {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-section-title {
    color: var(--primary-color);
}

.detail-section-actions {
    display: flex;
    gap: 6px;
}

/* 附图区域 */
.detail-section-drawings {
    background-color: #fce4ec;
}

.detail-drawings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.detail-drawing-thumbnail {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.detail-drawing-thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.detail-drawing-thumbnail-img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
}

.detail-drawing-thumbnail-caption {
    text-align: center;
    font-size: 0.75em;
    color: #666;
    margin-top: 4px;
    font-weight: 500;
}

.detail-drawing-more {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px dashed #90caf9;
}

.detail-drawing-more:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
}

.detail-drawing-more-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #1976d2;
    font-weight: 600;
}

.detail-drawing-more-content svg {
    margin-bottom: 4px;
}

.detail-drawing-more-content span {
    font-size: 0.9em;
}

.detail-drawings-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-drawing-preview {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 8px;
    max-width: 300px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-drawing-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
}

.detail-drawing-caption {
    text-align: center;
    font-size: 0.85em;
    color: #666;
    margin-top: 6px;
}

/* 权利要求区域 */
.detail-section-claims {
    background-color: #f8f9fa;
}

.claims-container {
    margin-top: 8px;
}

/* 说明书区域 */
.detail-section-description {
    background-color: #f0f8ff;
}

.detail-description-content {
    margin-top: 8px;
    font-size: 0.9em;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
}

/* CPC分类区域 */
.detail-section-cpc {
    background-color: #e3f2fd;
}

.cpc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.cpc-item {
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.cpc-code {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.cpc-description {
    font-size: 0.85em;
    color: #666;
}

/* 技术领域区域 */
.detail-section-landscapes {
    background-color: #f3e5f5;
}

.detail-landscapes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.landscape-tag {
    padding: 6px 12px;
    background-color: white;
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid #ddd;
}

/* 优先权日期区域 */
.detail-section-priority {
    background-color: #fff9c4;
}

.detail-priority-text {
    margin: 0;
}

/* 同族信息区域 */
.detail-section-family {
    background-color: #fff3e0;
}

.detail-family-id {
    margin: 5px 0;
}

.detail-family-applications {
    margin-top: 10px;
}

.detail-family-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* 外部链接区域 */
.detail-section-links {
    background-color: #e8f5e9;
}

.detail-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-link-item {
    padding: 8px 16px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: var(--primary-color);
}

/* 时间轴区域 */
.detail-section-timeline {
    background-color: transparent;
}

/* 法律事件区域 */
.detail-section-legal {
    background-color: #fff3e0;
}

/* 相似文档区域 */
.detail-section-similar {
    background-color: #e8f5e9;
}

/* 通用表格样式 */
.detail-table-container {
    max-height: 300px;
    overflow-y: auto;
}

.detail-table {
    width: 100%;
    font-size: 0.85em;
    border-collapse: collapse;
}

.detail-table-header-row {
    background-color: #e3f2fd;
}

.detail-table-header-legal {
    background-color: #ffe0b2;
}

.detail-table-header-similar {
    background-color: #c8e6c9;
}

.detail-table-header {
    padding: 5px;
    text-align: left;
    border: 1px solid #ddd;
}

.detail-table-cell {
    padding: 5px;
    border: 1px solid #ddd;
}

.detail-table-link {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 引用专利区域 */
.detail-section-citations {
    background-color: #e8f5e9;
}

.detail-table-header-citations {
    background-color: #c8e6c9;
}

/* 被引用专利区域 */
.detail-section-citedby {
    background-color: #fff3e0;
}

.detail-table-header-citedby {
    background-color: #ffe0b2;
}

/* 表格居中样式 */
.detail-table-header-center {
    text-align: center;
    width: 80px;
}

.detail-table-cell-center {
    text-align: center;
}

/* 审查员标记样式 */
.examiner-mark {
    color: #d32f2f;
    font-weight: bold;
}

