/* Promo banner for /software/workflow-diagrams/ (used on /software). CSS-only animation. */

.wfdb {
    display: flex;
    gap: clamp(1.5em, 4vw, 3em);
    align-items: center;
    margin: 0 auto;
    padding: clamp(1.2em, 3vw, 2.2em) clamp(1.2em, 3vw, 2.6em);
    border-radius: 0.8em;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.015);
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.25s ease;
}

.wfdb:hover {
    border-color: rgba(51, 182, 56, 0.6);
}

.wfdb-text {
    flex: 0 1 26em;
}

.wfdb h2 {
    margin-top: 0;
    color: white;
}

.wfdb p {
    margin-bottom: 1.4em;
    color: white;
}

.wfdb .btn-pill {
    display: inline-block;
}

.wfdb-art {
    flex: 1 1 0;
    min-width: 0;
}

.wfdb-art svg {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    margin-left: auto;
    overflow: visible;
}

/* Diagram */

.wfdb-node {
    stroke-width: 1.5;
}

.wfdb-in {
    fill: rgba(255, 152, 0, 0.1);
    stroke: rgba(255, 152, 0, 0.55);
}

.wfdb-out {
    fill: #2b2e33;
    stroke: rgba(255, 255, 255, 0.14);
}

.wfdb-hub {
    fill: var(--color-primary);
}

.wfdb-hub-glow {
    fill: var(--color-primary);
    opacity: 0.4;
}

.wfdb-art text {
    font-family: "REGU", sans-serif;
    font-size: 15px;
    text-anchor: middle;
    dominant-baseline: central;
}

.wfdb-in-label {
    fill: #ffd08a;
}

.wfdb-out-label {
    fill: #f0f0f0;
}

.wfdb-hub-label {
    font-family: "BOLD", sans-serif !important;
    font-size: 19px !important;
    fill: white;
}

.wfdb-chip-label {
    font-family: "BOLD", sans-serif !important;
    font-size: 12px !important;
    fill: var(--color-primary);
}

.wfdb-chip {
    fill: rgba(51, 182, 56, 0.12);
    stroke: rgba(51, 182, 56, 0.5);
}

.wfdb-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 1.5;
}

.wfdb-pulse {
    fill: none;
    stroke: #8dff91;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 6 114;
    animation: wfdb-flow 1.6s linear infinite;
}

.wfdb-pulse:nth-child(2) {
    animation-delay: -0.5s;
}

.wfdb-pulse:nth-child(3) {
    animation-delay: -1.1s;
}

@keyframes wfdb-flow {
    to {
        stroke-dashoffset: -120;
    }
}

/* Four workflow phases, 4s each: labels crossfade in sync */

.wfdb-phase {
    opacity: 0;
    animation: wfdb-cycle 16s infinite;
}

.wfdb-phase--1 {
    animation-delay: -12s;
}

.wfdb-phase--2 {
    animation-delay: -8s;
}

.wfdb-phase--3 {
    animation-delay: -4s;
}

@keyframes wfdb-cycle {
    0% {
        opacity: 0;
    }

    3%,
    22% {
        opacity: 1;
    }

    25%,
    100% {
        opacity: 0;
    }
}

/* Fullscreen and Videowall fade out while the Playout phase (12-16s) is showing */

.wfdb-no-playout {
    animation: wfdb-no-playout 16s infinite;
}

@keyframes wfdb-no-playout {
    0%,
    72% {
        opacity: 1;
    }

    75%,
    97% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .wfdb {
        flex-direction: column;
        align-items: stretch;
    }

    .wfdb-text {
        flex: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wfdb-pulse {
        display: none;
    }

    .wfdb-phase,
    .wfdb-no-playout {
        animation: none;
    }

    .wfdb-phase--0 {
        opacity: 1;
    }
}
