/* Statistics - Timeline player */

/* Timeline Controller Component (Figma nodes 27471:11284 Desktop & 27471:11493 Mobile) */
.c-timeline {
    width: 100%;
    margin-top: 30px;
    position: relative;
    z-index: 2;
}

.c-timeline__header {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 18px;
}

.c-timeline__currentDate {
    font-family: Inter, sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: -0.6px;
    color: #1E1E1C;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.c-timeline.is-active .c-timeline__currentDate,
.c-timeline.is-playing .c-timeline__currentDate,
.c-timeline.is-scrubbing .c-timeline__currentDate {
    opacity: 1;
}

/* Biller graph already shows month & year in center of d3 donut chart: hide timeline date header */
#billers .c-timeline__header,
.billers .c-timeline__header,
#billers .c-timeline__currentDate,
.billers .c-timeline__currentDate {
    display: none !important;
}

.c-timeline__body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.c-timeline__playBtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1E1E1C;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    outline: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
    margin-top: -3px;
}

.c-timeline__playBtn:hover {
    background-color: #333331;
}

.c-timeline__playBtn:focus-visible {
    outline: 2px solid #0094FF;
    outline-offset: 2px;
}

.c-timeline__playBtn:active {
    transform: scale(0.95);
}

.c-timeline__icon {
    flex-shrink: 0;
}

.c-timeline__trackWrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.c-timeline__track {
    position: relative;
    width: 100%;
    height: 6px;
    background-color: #ECECEC;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    user-select: none;
    touch-action: none;
    margin-top: 15px;
}

.c-timeline__track:focus-visible {
    outline: 2px solid #0094FF;
    outline-offset: 4px;
}

.c-timeline__progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #1E1E1C;
    border-radius: 4px;
    width: 0%;
    pointer-events: none;
    transition: width 0.65s linear;
}

.c-timeline__dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.c-timeline__dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #828282;
    border: none;
    transition: background-color 0.2s ease;
}

.c-timeline__dot.is-active,
.c-timeline__dot.is-passed {
    background-color: #1E1E1C;
}

.c-timeline__knob {
    display: none !important;
}

.c-timeline.is-scrubbing .c-timeline__progress {
    transition: none !important;
}

.c-timeline__years {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 6px;
}

.c-timeline__yearLabel {
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: -0.5px;
    color: #9E9E9E;
    transition: color 0.2s ease, font-weight 0.2s ease;
    user-select: none;
}

.c-timeline__yearLabel.is-active,
.c-timeline__yearLabel.is-passed {
    color: #1E1E1C;
    font-weight: 600;
}

/* Mobile responsive adjustments */
@media (max-width: 1023px) {
    .c-timeline {
        margin-top: 20px;
        margin-bottom: 15px;
    }

    .c-timeline__body {
        gap: 12px;
    }

    .c-timeline__playBtn {
        width: 36px;
        height: 36px;
        margin-top: -2px;
    }

    .c-timeline__track {
        margin-top: 13px;
    }

    .c-timeline__yearLabel {
        font-size: 12px;
    }
}

/* Initially hidden (replaces inline style="display:none", which the CSP blocks).
   Scripts still show the element by setting element.style.display, which overrides this. */
html body .u-hiddenInitially:not(#csp-x) {
  display: none;
}
