﻿.sheet-timeline-slot[hidden] {
    display: none !important;
}

.sheet-timeline-slot {
    margin: 0 0 4px;
}

.timeline-card {
    width: 100%;
    border: 1px solid rgba(129, 140, 248, 0.16);
    border-radius: 14px;
    background:
        radial-gradient(circle at 100% 0, rgba(99, 102, 241, 0.075), transparent 40%),
        linear-gradient(145deg, rgba(13, 20, 36, 0.96), rgba(7, 11, 22, 0.98));
    color: var(--text-primary);
    padding: 10px 10px 8px;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.timeline-header,
.timeline-title-wrap,
.timeline-event-rail,
.timeline-footer {
    display: flex;
    align-items: center;
}

.timeline-header {
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.timeline-title-wrap {
    gap: 7px;
    min-width: 0;
}

.timeline-title-icon {
    width: 25px;
    height: 25px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.09);
    border: 1px solid rgba(165, 180, 252, 0.15);
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 850;
}

.timeline-title-wrap > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.timeline-title-wrap strong {
    font-size: 0.7rem;
    font-weight: 850;
    line-height: 1.2;
}

.timeline-title-wrap small {
    color: var(--text-secondary);
    font-size: 0.49rem;
    font-weight: 600;
    line-height: 1.2;
}

.timeline-status {
    min-height: 19px;
    border-radius: 999px;
    padding: 3px 6px;
    color: #94a3b8;
    font-size: 0.46rem;
    font-weight: 750;
    white-space: nowrap;
}

.timeline-status.is-live {
    color: #5eead4;
    border: 1px solid rgba(94, 234, 212, 0.15);
    background: rgba(45, 212, 191, 0.07);
}

.timeline-status.is-warning {
    color: #fbbf24;
}

.timeline-message {
    padding: 15px 8px 11px;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.53rem;
    font-weight: 650;
}

.timeline-message.is-error {
    color: #fda4af;
}

.timeline-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 3px 0 0;
}

.timeline-event {
    position: relative;
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    padding: 8px 0;
}

.timeline-event:not(:last-child)::after {
    content: '';
    position: absolute;
    inset-inline-start: 7px;
    top: 25px;
    bottom: -4px;
    width: 1px;
    background: rgba(148, 163, 184, 0.13);
}

.timeline-event-rail {
    align-self: start;
    gap: 5px;
    direction: rtl;
    color: #94a3b8;
}

.timeline-event-marker {
    position: relative;
    z-index: 1;
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #94a3b8;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.08);
}

.timeline-event-time {
    direction: rtl;
    color: #94a3b8;
    font-family: var(--font-ui);
    font-size: 0.46rem;
    font-weight: 700;
    white-space: nowrap;
}

.timeline-event-text {
    min-width: 0;
    margin: 0;
    color: #dbe4f0;
    font-size: 0.59rem;
    font-weight: 680;
    line-height: 1.55;
    text-align: right;
    overflow-wrap: anywhere;
}

.timeline-event.tone-positive .timeline-event-marker {
    color: #5eead4;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.09);
}

.timeline-event.tone-negative .timeline-event-marker {
    color: #fb7185;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.09);
}

.timeline-event.tone-material .timeline-event-marker,
.timeline-event.tone-warning .timeline-event-marker {
    color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.09);
}

.timeline-footer {
    justify-content: center;
    min-height: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.035);
}

.timeline-older-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #a5b4fc;
    padding: 8px 12px 2px;
    font-family: inherit;
    font-size: 0.52rem;
    font-weight: 800;
    cursor: pointer;
}

.timeline-older-button:disabled {
    color: #64748b;
    cursor: wait;
}

.timeline-older-button:focus-visible {
    outline: 2px solid rgba(165, 180, 252, 0.7);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (max-width: 370px) {
    .timeline-title-wrap small {
        display: none;
    }

    .timeline-event {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 6px;
    }

    .timeline-event-text {
        font-size: 0.56rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .timeline-card,
    .timeline-older-button {
        scroll-behavior: auto;
        transition: none;
    }
}
