/*
 * «Актуелно» joined to the slider (inc/home-akt.php, assets/js/home-akt.js).
 * From 1024px, where the column stands beside the slider: the row whose story is on show carries a
 * soft wash in its section's colour that reaches the dividing line (a 2px mark in the section colour
 * sits on that line), and a second, slightly deeper wash fills it from the left while the slider
 * waits to advance. Transform and opacity only; nothing moves under prefers-reduced-motion.
 */

@media (min-width: 1024px) {
    .ed-home-akt.is-linked > .ed-home-akt__row { position: relative; isolation: isolate; }
    .ed-home-akt.is-linked > .ed-home-akt__row.is-slide { cursor: pointer; }

    .ed-home-akt.is-linked > .ed-home-akt__row::before,
    .ed-home-akt.is-linked > .ed-home-akt__row::after {
        content: "";
        position: absolute;
        z-index: -1;
        top: 0;
        bottom: 0;
        left: -10px;
        right: calc(-1 * var(--ed-col-pad, 12px));
        pointer-events: none;
    }
    /* The resting wash and the mark on the dividing line. */
    .ed-home-akt.is-linked > .ed-home-akt__row::before {
        background: var(--sd-c-wash, var(--ed-bg-2));
        box-shadow: inset -2px 0 0 var(--sd-c, var(--ed-ink));
        opacity: 0;
        transition: opacity 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
    }
    .ed-home-akt.is-linked > .ed-home-akt__row.is-current::before { opacity: 1; }

    /* The moving wash: fills from the left during the slider's wait. */
    .ed-home-akt.is-linked > .ed-home-akt__row::after {
        right: calc(-1 * var(--ed-col-pad, 12px) + 2px);
        background: var(--sd-c-wash-2, var(--ed-bg-2));
        transform: scaleX(0);
        transform-origin: 0 50%;
    }
    .ed-home-akt.is-linked.is-auto > .ed-home-akt__row.is-current::after {
        animation: ed-akt-fill 6.5s linear forwards;
        animation-play-state: paused;
    }
    .ed-home-akt.is-linked.is-auto.is-running > .ed-home-akt__row.is-current::after { animation-play-state: running; }

    /* A row that has a slide answers the pointer. */
    .ed-home-akt.is-linked > .ed-home-akt__row.is-slide:hover::before { opacity: 0.6; }
    .ed-home-akt.is-linked > .ed-home-akt__row.is-slide.is-current:hover::before { opacity: 1; }
}

/* Joined to the column, the slider's bar does not repeat the seven section names (the column beside it
   lists them): dots, and the name of the slide on show only. */
@media (min-width: 1280px) {
    .ed-hslider.is-akt .ed-hslider__tabs > li { flex: none; }
    .ed-hslider.is-akt .ed-hslider__tab:not([aria-current]) { padding: 0 9px; }
    .ed-hslider.is-akt .ed-hslider__tab:not([aria-current]) .ed-hslider__name {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .ed-hslider.is-akt .ed-hslider__tab:not([aria-current]) .ed-hslider__dot { width: 8px; height: 8px; opacity: 0.5; }
    .ed-hslider.is-akt .ed-hslider__tab:not([aria-current]):hover .ed-hslider__dot { opacity: 1; }
    .ed-hslider.is-akt .ed-hslider__tab[aria-current] .ed-hslider__name { overflow: visible; text-overflow: clip; }
}

@keyframes ed-akt-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .ed-home-akt.is-linked > .ed-home-akt__row::before { transition: none; }
    .ed-home-akt.is-linked > .ed-home-akt__row.is-current::after { animation: none; transform: scaleX(0); }
}
