/* It Is Leon — Timeline Frontend CSS v1.2.2 */

/*
   CENTERING SYSTEM:
   The line sits at a fixed anchor: left = (gutter/2), centered via translateX(-50%).
   Every dot uses the same anchor + translateX(-50%) so it always centers on the line
   regardless of its size — small dot, large image, emoji, all aligned perfectly.
*/

:root {
    --tl-gutter: 56px; /* left padding — must be >= largest dot radius + margin */
}

.tl-wrap {
    position: relative;
    padding: 8px 0 8px var(--tl-gutter);
    max-width: 800px;
}

/* Vertical line — center at gutter/2 */
.tl-line {
    position: absolute;
    left: calc( var(--tl-gutter) / 2 );
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    background: var(--tl-line, #e87722);
}

/* Each item */
.tl-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
}

.tl-item:last-child { margin-bottom: 0; }

/* Dot — anchored at same point as line, centered via translateX(-50%) */
.tl-dot {
    position: absolute;
    left: calc( -1 * var(--tl-gutter) / 2 );
    top: 16px;
    width: 20px;
    height: 20px;
    transform: translateX(-50%);
    background: var(--tl-dot, #e87722);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

/* Image dot — larger size, transparent bg, coloured ring */
.tl-dot:has(.tl-dot-img) {
    width:      var(--tl-img-dot-size, 60px);
    height:     var(--tl-img-dot-size, 60px);
    top:        8px;
    background: transparent;
    border:     2px solid var(--tl-dot, #e87722);
    /* translateX(-50%) still centers it on the line — no extra offset needed */
}

.tl-dot.circle  { border-radius: 50%; }
.tl-dot.square  { border-radius: 3px; }
.tl-dot.diamond { border-radius: 2px; transform: translateX(-50%) rotate(45deg); }
.tl-dot.diamond .tl-dot-emoji,
.tl-dot.diamond .tl-dot-img { transform: rotate(-45deg); }

.tl-dot-emoji { font-size: 12px; line-height: 1; }

.tl-dot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card */
.tl-card {
    background: var(--tl-card-bg, #ffffff);
    border: 1px solid var(--tl-card-border, #e5e7eb);
    border-radius: 10px;
    padding: 18px 22px;
    flex: 1;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.tl-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.09); }

.tl-date {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--tl-date, #e87722);
    margin-bottom: 6px;
}

.tl-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tl-title, #111);
    margin: 0 0 8px;
    line-height: 1.3;
}

.tl-desc {
    font-size: 0.9rem;
    color: var(--tl-desc, #555);
    margin: 0;
    line-height: 1.6;
}

/* =======================================================================
   SCROLL ANIMATION — disabled in editor context
======================================================================= */

.tl-animate .tl-item {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.tl-animate .tl-item.tl-visible {
    opacity: 1;
    transform: translateX(0);
}

.block-editor-block-list__block .tl-animate .tl-item,
.editor-styles-wrapper .tl-animate .tl-item {
    opacity: 1 !important;
    transform: none !important;
}

.tl-animate .tl-item:nth-child(1)  { transition-delay: 0s; }
.tl-animate .tl-item:nth-child(2)  { transition-delay: 0.08s; }
.tl-animate .tl-item:nth-child(3)  { transition-delay: 0.16s; }
.tl-animate .tl-item:nth-child(4)  { transition-delay: 0.24s; }
.tl-animate .tl-item:nth-child(5)  { transition-delay: 0.32s; }
.tl-animate .tl-item:nth-child(6)  { transition-delay: 0.40s; }
.tl-animate .tl-item:nth-child(7)  { transition-delay: 0.48s; }
.tl-animate .tl-item:nth-child(8)  { transition-delay: 0.56s; }
.tl-animate .tl-item:nth-child(9)  { transition-delay: 0.64s; }
.tl-animate .tl-item:nth-child(10) { transition-delay: 0.72s; }

/* =======================================================================
   BLOCK ALIGNMENT WRAPPERS
======================================================================= */

.tl-block-wrap { width: 100%; box-sizing: border-box; }
.tl-align-full .tl-wrap { max-width: 100%; }
.tl-align-center .tl-wrap { margin-left: auto; margin-right: auto; }
.tl-align-left .tl-wrap { margin-left: 0; }
