/* Countdown ring next to the arbitrage update-interval dropdown (IntervalDropdown.razor,
   driven by js/interval-countdown.js). Replaces css/interval-dropdown.css: the dropdown part
   of that file now lives in the shared AppDropdown styles. */

.interval-countdown {
    /* Hidden by default; shown by JS setting [data-visible] */
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    /* Slide + fade out -> in */
    opacity: 0;
    transform: scale(0.7) translateX(-4px);
    pointer-events: none;
    transition: opacity 200ms cubic-bezier(0.34, 1.56, 0.64, 1), transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

    .interval-countdown[data-visible] {
        opacity: 1;
        transform: scale(1) translateX(0);
        pointer-events: auto;
    }

/* SVG positioned to fill the badge */
.interval-countdown__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Background track ring */
.interval-countdown__ring-track {
    stroke: rgba(var(--divider));
    fill: none;
}

/* Animated progress arc */
.interval-countdown__ring-progress {
    stroke: rgba(var(--accent-primary));
    fill: none;
    /* dasharray / dashoffset set by JS frame by frame */
    transition: stroke-dashoffset 0ms linear;
    will-change: stroke-dashoffset;
}

/* Number label centered inside the ring */
.interval-countdown__number {
    position: relative; /* above the SVG */
    z-index: 1;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    color: rgba(var(--dark));
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    /* Prevent layout shift when digit width changes */
    min-width: 12px;
    text-align: center;
}

/* Two-digit numbers (10+): JS sets [data-two-digit]. (The old rule also listed an invalid
   pseudo-class in the same selector list, which made browsers drop the whole rule.) */
.interval-countdown[data-two-digit] .interval-countdown__number {
    font-size: 7.5px;
}

@media (prefers-reduced-motion: reduce) {
    .interval-countdown {
        transition: none;
    }
}
