/* Action History Page Styles */

.action-history-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-4);
}

.page-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.page-header p {
    margin: var(--spacing-2) 0 0 0;
    color: var(--muted);
}

/* Filter Card */
.filter-card {
    box-shadow: var(--shadow-sm);
}

.filter-card .form-group-enhanced {
    margin-bottom: 0;
}

/* Timeline */
.timeline-container {
    position: relative;
    padding: var(--spacing-4) 0;
}

.timeline-item {
    position: relative;
    padding-left: var(--spacing-6);
    margin-bottom: var(--spacing-4);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--surface);
    z-index: 2;
    box-shadow: 0 0 0 2px var(--bg);
}

.timeline-line {
    position: absolute;
    left: 5px;
    top: 12px;
    width: 2px;
    background: var(--border);
    z-index: 1;
}

.timeline-content {
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.timeline-content:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

/* Badge colors */
.badge-success {
    background: var(--success);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.badge-primary {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.badge-danger {
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.badge-warning {
    background: var(--warning);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.badge-default {
    background: var(--muted);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

/* Undo button */
.undo-action-btn {
    transition: all 0.2s ease;
}

.undo-action-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.undo-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .action-history-page {
        padding: var(--spacing-3);
    }

    .filter-card > div {
        grid-template-columns: 1fr !important;
    }

    .timeline-item {
        padding-left: var(--spacing-4);
    }

    .timeline-marker {
        width: 10px;
        height: 10px;
        left: -2px;
    }

    .timeline-content {
        padding: var(--spacing-3) !important;
    }

    .timeline-content > div {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .undo-action-btn {
        width: 100%;
        margin-top: var(--spacing-2);
    }
}

/* Details summary styling */
details summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.2s ease;
    font-size: 10px;
}

details[open] summary::before {
    transform: rotate(90deg);
}

