/**
 * 历史时间轴样式
 * cms_native - 2026-06-18
 */

/* =============================================
   时间轴Widget
   ============================================= */
.timeline-widget {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

/* Tab头部 */
.timeline-widget .tab-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 15px;
}

.timeline-widget .tab-btn {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-widget .tab-btn:hover {
    background: var(--gray-100);
}

.timeline-widget .tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Tab内容 */
.timeline-widget .tab-content {
    display: none;
}

.timeline-widget .tab-content.active {
    display: block;
}

/* 时间轴可视化 */
.timeline-visualization {
    width: 100%;
    height: 300px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.timeline-visualization svg {
    width: 100%;
    height: 100%;
}

/* 朝代条 */
.dynasty-bar {
    cursor: pointer;
    transition: opacity 0.2s;
}

.dynasty-bar:hover {
    opacity: 0.8;
}

/* 朝代标签 */
.dynasty-label {
    font-size: 12px;
    fill: var(--gray-700);
    font-weight: 500;
}

/* 事件列表 */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s;
}

.event-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.event-header h4 {
    font-size: 16px;
    color: var(--gray-800);
    margin: 0;
}

.event-year {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.event-desc {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 10px;
}

.event-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.event-actions button {
    padding: 4px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.event-actions button:hover {
    background: var(--gray-100);
}

/* 事件表单 */
.event-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.event-form label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.event-form input,
.event-form select,
.event-form textarea {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.event-form input:focus,
.event-form select:focus,
.event-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 空状态 */
.timeline-widget .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.timeline-widget .empty-state .icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.timeline-widget .empty-state p {
    font-size: 16px;
    margin: 0;
}

/* 分页 */
.timeline-widget .pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.timeline-widget .page-btn {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-widget .page-btn:hover {
    background: var(--gray-100);
}

.timeline-widget .page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 响应式 */
@media (max-width: 768px) {
    .timeline-widget {
        padding: 15px;
    }
    
    .timeline-visualization {
        height: 200px;
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
