/* =========================================================
   SCOPEFLOW STAGE VISIBILITY + REPLAY TIMING FIX

   Changes only:
   1. Transfer-arrow visibility
   2. Step 1 -> Step 2 arrow length
   3. RFQ stage-label visibility
   4. ScopeFlow animation cycle from 18s -> 16s
   5. Shorter blank reset between RFQs and drawing restart
   ========================================================= */


/* ---------------------------------------------------------
   STEP TRANSFER VISIBILITY
   --------------------------------------------------------- */

.sf-transfer-one[data-astro-cid-oo6dppxh] {
  opacity: 0;

  /*
   Stop the arrowhead before the Step 2 workbook.
   Production:
     left: 29%
     width: 8%

   Workbook begins at:
     left: 33%
  */
  width: 2.75%;

  animation:
    16s ease-in-out infinite
    sf-transfer-one-visibility;
}

.sf-transfer-two[data-astro-cid-oo6dppxh] {
  opacity: 0;

  animation:
    16s ease-in-out infinite
    sf-transfer-two-visibility;
}


/* ---------------------------------------------------------
   RFQ STAGE LABEL
   --------------------------------------------------------- */

.sf-rfqs[data-astro-cid-oo6dppxh]
  > .sf-stage-label[data-astro-cid-oo6dppxh] {
  opacity: 0;

  animation:
    16s ease-in-out infinite
    sf-rfq-label-visibility;
}


/* ---------------------------------------------------------
   KEEP ALL EXISTING SCOPEFLOW ANIMATIONS SYNCHRONIZED
   AT THE NEW 16 SECOND CYCLE
   --------------------------------------------------------- */

.sf-drawing[data-astro-cid-oo6dppxh],
.sf-scan[data-astro-cid-oo6dppxh],
.sf-chip-1[data-astro-cid-oo6dppxh],
.sf-chip-2[data-astro-cid-oo6dppxh],
.sf-chip-3[data-astro-cid-oo6dppxh],
.sf-workbook[data-astro-cid-oo6dppxh],
.sf-row-1[data-astro-cid-oo6dppxh],
.sf-row-2[data-astro-cid-oo6dppxh],
.sf-row-3[data-astro-cid-oo6dppxh],
.sf-row-4[data-astro-cid-oo6dppxh],
.sf-rfq-1[data-astro-cid-oo6dppxh],
.sf-rfq-2[data-astro-cid-oo6dppxh],
.sf-rfq-3[data-astro-cid-oo6dppxh],
.sf-rfq-4[data-astro-cid-oo6dppxh],
.sf-transfer[data-astro-cid-oo6dppxh]
  span[data-astro-cid-oo6dppxh],
.sf-process-extract[data-astro-cid-oo6dppxh],
.sf-process-rfq[data-astro-cid-oo6dppxh] {
  animation-duration: 16s;
}


/* ---------------------------------------------------------
   ARROW 1
   Drawing -> Bid Analysis
   --------------------------------------------------------- */

@keyframes sf-transfer-one-visibility {
  0%,
  18% {
    opacity: 0;
  }

  23%,
  41% {
    opacity: 1;
  }

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


/* ---------------------------------------------------------
   ARROW 2
   Bid Analysis -> RFQ
   --------------------------------------------------------- */

@keyframes sf-transfer-two-visibility {
  0%,
  51% {
    opacity: 0;
  }

  59%,
  81% {
    opacity: 1;
  }

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


/* ---------------------------------------------------------
   DRAWING RESTART

   Production waited until roughly 13% before the drawing
   was fully visible again.

   It now returns by 4%, eliminating most of the blank
   white reset period.
   --------------------------------------------------------- */

@keyframes sf-drawing-cycle {
  0% {
    opacity: 0;
    transform: translate(-18px) scale(.97);
  }

  4%,
  37% {
    opacity: 1;
    transform: translate(0) scale(1);
  }

  48%,
  87% {
    opacity: .24;
    transform: translate(-4px) scale(.98);
  }

  96%,
  100% {
    opacity: 0;
    transform: translate(-18px) scale(.97);
  }
}


/* ---------------------------------------------------------
   RFQs REMAIN VISIBLE CLOSER TO THE LOOP RESTART

   This closes the dead visual gap without changing the
   order in which the four RFQs arrive.
   --------------------------------------------------------- */

@keyframes sf-rfq-1 {
  0%,
  51% {
    opacity: 0;
    transform:
      translate(-105px, 10px)
      scale(.72);
  }

  59%,
  97% {
    opacity: 1;
    transform:
      translate(-17px, 23px)
      rotate(-5deg)
      scale(.93);
  }

  100% {
    opacity: 0;
    transform:
      translate(17px, 13px)
      rotate(-5deg)
      scale(.91);
  }
}

@keyframes sf-rfq-2 {
  0%,
  54% {
    opacity: 0;
    transform:
      translate(-105px, 10px)
      scale(.72);
  }

  62%,
  97% {
    opacity: 1;
    transform:
      translate(-8px, 15px)
      rotate(-2deg)
      scale(.95);
  }

  100% {
    opacity: 0;
    transform:
      translate(15px, 10px)
      rotate(-2deg)
      scale(.92);
  }
}

@keyframes sf-rfq-3 {
  0%,
  57% {
    opacity: 0;
    transform:
      translate(-105px, 10px)
      scale(.72);
  }

  65%,
  97% {
    opacity: 1;
    transform:
      translate(3px, 8px)
      rotate(1deg)
      scale(.97);
  }

  100% {
    opacity: 0;
    transform:
      translate(17px, 7px)
      rotate(1deg)
      scale(.94);
  }
}

@keyframes sf-rfq-4 {
  0%,
  60% {
    opacity: 0;
    transform:
      translate(-105px, 10px)
      scale(.72);
  }

  68%,
  97% {
    opacity: 1;
    transform:
      translate(11px)
      rotate(4deg)
      scale(1);
  }

  100% {
    opacity: 0;
    transform:
      translate(22px, 3px)
      rotate(4deg)
      scale(.96);
  }
}


/* ---------------------------------------------------------
   RFQ LABEL FOLLOWS THE EXTENDED RFQ DISPLAY
   --------------------------------------------------------- */

@keyframes sf-rfq-label-visibility {
  0%,
  51% {
    opacity: 0;
  }

  59%,
  97% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}
