/* ============================================
   NoteView - History & Diff Modals
   ============================================ */

.history-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.history-modal-container {
    background: var(--bg-primary);
    width: 90vw;
    height: 90vh;
    max-width: 1400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    overflow: hidden;
}

.history-sidebar {
    width: 300px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.history-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.close-history-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.close-history-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.history-timeline {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.history-commit-item {
    padding: 0.85rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: all 0.15s ease;
    background: var(--bg-primary);
    border: 1px solid transparent;
}

.history-commit-item.selected {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

.commit-msg {
    font-size: 0.9rem;
    font-weight: 500;
}

.commit-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.commit-oid {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.no-history {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

.history-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.history-actions {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.restore-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

.diff-editor-container {
    flex: 1;
    overflow: auto;
}

