/* Each symbol keeps its outline while its working detail animates. */
.module-icon,
.control-icon {
  --icon-duration: 7.4s;
  --icon-phase: -.7s;
}

.module-icon--procurement { --icon-duration: 6.6s; --icon-phase: -.3s; }
.module-icon--counterparty_check { --icon-duration: 7.4s; --icon-phase: -1.4s; }
.module-icon--antidubli { --icon-duration: 7s; --icon-phase: -2.7s; }
.module-icon--accounting { --icon-duration: 7.6s; --icon-phase: -3.8s; }
.module-icon--sales_radar { --icon-duration: 8s; --icon-phase: -1.8s; }
.module-icon--crm_guard { --icon-duration: 6.9s; --icon-phase: -4.3s; }
.control-icon--settings { --icon-phase: -2.2s; }
.control-icon--plug { --icon-phase: -3.5s; }
.control-icon--wallet { --icon-phase: -1.6s; }
.control-icon--overview { --icon-phase: -4.5s; }
.icon-motion-scan { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) :is(.module-icon, .control-icon) [class^="icon-motion-"] {
    animation-duration: var(--icon-duration);
    animation-delay: var(--icon-phase);
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
  }

  html:not([data-motion="off"]) .icon-motion-trace {
    stroke-dasharray: 100;
    animation-name: kp-icon-trace;
  }

  html:not([data-motion="off"]) :is(.module-icon, .control-icon) .icon-motion-orbit {
    transform-box: view-box;
    transform-origin: 12px 12px;
    animation-name: kp-icon-orbit;
    animation-timing-function: linear;
  }

  html:not([data-motion="off"]) .control-icon--update .icon-motion-orbit {
    animation-name: kp-icon-orbit-inset;
  }

  html:not([data-motion="off"]) .icon-motion-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation-name: kp-icon-pulse;
  }

  html:not([data-motion="off"]) .icon-motion-lights { animation-name: kp-icon-lights; }
  html:not([data-motion="off"]) .icon-motion-scan { animation-name: kp-icon-scan; }
  html:not([data-motion="off"]) .icon-motion-copy-back { animation-name: kp-icon-copy-back; }
  html:not([data-motion="off"]) .icon-motion-copy-front { animation-name: kp-icon-copy-front; }
  html:not([data-motion="off"]) .icon-motion-ledger-first { animation-name: kp-icon-ledger; }
  html:not([data-motion="off"]) .icon-motion-ledger-second { animation-name: kp-icon-ledger-reverse; }
  html:not([data-motion="off"]) .icon-motion-slide { animation-name: kp-icon-slide; }
  html:not([data-motion="off"]) .icon-motion-slide-reverse { animation-name: kp-icon-slide-reverse; }
  html:not([data-motion="off"]) .icon-motion-bob { animation-name: kp-icon-bob; }
  html:not([data-motion="off"]) .icon-motion-search { animation-name: kp-icon-search; }
  html:not([data-motion="off"]) .icon-motion-grid-first { animation-name: kp-icon-lights; }
  html:not([data-motion="off"]) .icon-motion-grid-second { animation-name: kp-icon-lights-reverse; }
}

@keyframes kp-icon-trace {
  0%, 100% { stroke-dashoffset: 65; opacity: .55; }
  38%, 72% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes kp-icon-orbit {
  to { transform: rotate(360deg); }
}

@keyframes kp-icon-orbit-inset {
  from { transform: rotate(0deg) scale(.85); }
  to { transform: rotate(360deg) scale(.85); }
}

@keyframes kp-icon-pulse {
  0%, 100% { transform: scale(.85); opacity: .55; }
  45%, 65% { transform: scale(1.12); opacity: 1; }
}

@keyframes kp-icon-lights {
  0%, 100% { opacity: .4; }
  35%, 65% { opacity: 1; }
}

@keyframes kp-icon-lights-reverse {
  0%, 100% { opacity: 1; }
  35%, 65% { opacity: .4; }
}

@keyframes kp-icon-scan {
  0%, 8% { transform: translateY(0); opacity: 0; }
  15% { opacity: .85; }
  52% { transform: translateY(11px); opacity: .85; }
  62%, 100% { transform: translateY(11px); opacity: 0; }
}

@keyframes kp-icon-copy-back {
  0%, 100% { transform: translate(0, 0); }
  40%, 65% { transform: translate(1.4px, 1px); }
}

@keyframes kp-icon-copy-front {
  0%, 100% { transform: translate(0, 0); }
  40%, 65% { transform: translate(-1.4px, -1px); }
}

@keyframes kp-icon-ledger {
  0%, 100% { transform: translateX(-.8px); opacity: .55; }
  40%, 65% { transform: translateX(.8px); opacity: 1; }
}

@keyframes kp-icon-ledger-reverse {
  0%, 100% { transform: translateX(.8px); opacity: 1; }
  40%, 65% { transform: translateX(-.8px); opacity: .55; }
}

@keyframes kp-icon-slide {
  0%, 100% { transform: translateX(-1px); }
  45%, 65% { transform: translateX(1px); }
}

@keyframes kp-icon-slide-reverse {
  0%, 100% { transform: translateX(1px); }
  45%, 65% { transform: translateX(-1px); }
}

@keyframes kp-icon-bob {
  0%, 100% { transform: translateY(0); }
  40%, 65% { transform: translateY(-.8px); }
}

@keyframes kp-icon-search {
  0%, 100% { transform: translate(0, 0); }
  40%, 65% { transform: translate(.7px, -.7px); }
}
