/* Timeline Maker (/timeline-maker): Views/SeoLanding/_TimelineDemo.cshtml */

/* The timeline keeps its shape (slide, A4, story, banner ...) and fits the screen's height. */
.timeline-app .timeline-canvas {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(82vh, 980px);
    margin-inline: auto;
    touch-action: manipulation;
    border-radius: 6px;
    box-shadow: 0 12px 34px rgba(25, 42, 69, 0.24);
}

.timeline-app .timeline-canvas:focus-visible {
    outline: 3px solid var(--landing-accent, #2563eb);
    outline-offset: 3px;
}

.timeline-stage {
    padding: clamp(8px, 2vw, 20px);
}

/* Templates: a row of live previews that scrolls sideways. */
.timeline-templates {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    align-items: flex-start;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.timeline-template {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 112px;
    padding: 6px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--landing-surface-2, rgba(127, 127, 127, 0.08));
    color: inherit;
    font: inherit;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.timeline-template:hover {
    transform: translateY(-2px);
}

.timeline-template.is-active,
.timeline-template:focus-visible {
    border-color: var(--landing-accent, #2563eb);
    outline: none;
}

.timeline-template-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.timeline-template-name {
    font-size: 0.78rem;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

/* The picked event: the events as chips, its name between previous and next, its fields and actions. */
.timeline-event {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    background: var(--landing-surface-2, rgba(127, 127, 127, 0.08));
}

.timeline-event > * {
    min-width: 0;
}

.timeline-event-head,
.timeline-event-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-event-actions > [data-tl-add] {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.timeline-event-name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-event-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 8px;
}

.timeline-event-row > *,
.timeline-event-row .filter-landing-text-input {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.timeline-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.timeline-chip {
    max-width: 100%;
    padding: 3px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--landing-surface, rgba(127, 127, 127, 0.12));
    color: inherit;
    font: inherit;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.timeline-chip:hover,
.timeline-chip:focus-visible {
    border-color: var(--landing-accent, #2563eb);
    outline: none;
}

.timeline-chip.is-active {
    background: var(--landing-accent, #2563eb);
    color: var(--landing-on-accent, #ffffff);
}

.timeline-chip.has-photo::before {
    content: "\25A3  ";
    opacity: 0.8;
}
