/* Timeline Tab Styles */

.timeline-container {
    max-width: 900px;
}

/* Date separator */
.tl-date-sep {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #64748b);
    padding: 12px 0 6px;
    border-bottom: 1px solid var(--border, #e2e8f0);
    margin-bottom: 8px;
    margin-top: 8px;
}

.tl-date-sep:first-child {
    margin-top: 0;
}

/* Event card */
.tl-event {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    border-left: 3px solid transparent;
    transition: background 0.15s;
}

.tl-event:hover {
    background: var(--bg-hover, #f8fafc);
}

/* Color variants */
.tl-event-primary   { border-left-color: #3b82f6; }
.tl-event-info      { border-left-color: #06b6d4; }
.tl-event-success   { border-left-color: #22c55e; }
.tl-event-warning   { border-left-color: #f59e0b; }
.tl-event-danger    { border-left-color: #ef4444; }
.tl-event-secondary { border-left-color: #94a3b8; }

/* Event icon */
.tl-event-icon {
    flex: 0 0 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #f1f5f9;
    color: #475569;
}

.tl-event-primary .tl-event-icon   { background: #dbeafe; color: #2563eb; }
.tl-event-info .tl-event-icon      { background: #cffafe; color: #0891b2; }
.tl-event-success .tl-event-icon   { background: #dcfce7; color: #16a34a; }
.tl-event-warning .tl-event-icon   { background: #fef3c7; color: #d97706; }
.tl-event-danger .tl-event-icon    { background: #fee2e2; color: #dc2626; }
.tl-event-secondary .tl-event-icon { background: #f1f5f9; color: #64748b; }

/* Event body */
.tl-event-body {
    flex: 1;
    min-width: 0;
}

.tl-event-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
}

.tl-event-company {
    font-weight: 600;
    color: var(--primary, #2563eb);
    text-decoration: none;
    font-size: 13px;
}

.tl-event-company:hover {
    text-decoration: underline;
}

.tl-event-title {
    font-size: 13px;
    color: var(--text, #334155);
}

.tl-event-time {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
    margin-left: auto;
    white-space: nowrap;
}

.tl-event-detail {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    margin-top: 2px;
}

.tl-event-detail a {
    color: var(--primary, #2563eb);
    text-decoration: none;
}

.tl-event-detail a:hover {
    text-decoration: underline;
}

/* Event actions */
.tl-event-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Alerts bar */
.tl-alerts-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Feed container */
.tl-feed {
    margin-top: 8px;
}

/* Severity badges (reuse from app.css where possible) */
.severity-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.severity-badge.severity-critical { background: #fee2e2; color: #991b1b; }
.severity-badge.severity-warning  { background: #fef3c7; color: #92400e; }
.severity-badge.severity-info     { background: #dbeafe; color: #1e40af; }
.severity-badge.severity-low      { background: #f1f5f9; color: #475569; }

/* Responsive */
@media (max-width: 768px) {
    .tl-event {
        padding: 10px 8px;
        gap: 8px;
    }

    .tl-event-icon {
        flex: 0 0 28px;
        height: 28px;
        font-size: 13px;
    }

    .tl-event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .tl-event-time {
        margin-left: 0;
    }

    .tl-event-actions {
        flex-direction: column;
    }
}

/* Dark theme */
[data-theme="dark"] .tl-event:hover {
    background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .tl-event-icon {
    background: rgba(255,255,255,0.08);
    color: #94a3b8;
}

[data-theme="dark"] .tl-event-primary .tl-event-icon   { background: rgba(59,130,246,0.15); color: #60a5fa; }
[data-theme="dark"] .tl-event-info .tl-event-icon      { background: rgba(6,182,212,0.15); color: #22d3ee; }
[data-theme="dark"] .tl-event-success .tl-event-icon   { background: rgba(34,197,94,0.15); color: #4ade80; }
[data-theme="dark"] .tl-event-warning .tl-event-icon   { background: rgba(245,158,11,0.15); color: #fbbf24; }
[data-theme="dark"] .tl-event-danger .tl-event-icon    { background: rgba(239,68,68,0.15); color: #f87171; }
[data-theme="dark"] .tl-event-secondary .tl-event-icon { background: rgba(148,163,184,0.15); color: #94a3b8; }

[data-theme="dark"] .tl-date-sep {
    border-bottom-color: rgba(255,255,255,0.1);
}
