/* Pichler OPC-Animationen: die Namen aus dem OPC-Tab „Animation“, abgespielt von opc-animations.js (Klasse pao-run).
   Bis zum Start unsichtbar (nur mit Skript, html.pao-on). Keyframes mit eigenem Präfix, damit nichts mit Theme oder
   anderen Plugins kollidiert. Die großen Varianten (…Big) fahren aus der Fensterbreite herein, nicht aus 2000 px,
   so entsteht kein waagrechter Scrollbalken. Eine Dauer aus dem OPC setzt das Skript am Element, sie geht vor. */
.pao-on .wow:not(.pao-run) { visibility: hidden; }
.pao-on .wow.pao-run {
  animation-duration: 1s;
  animation-fill-mode: both;
}
.pao-on .wow.pao-run.bounceIn,
.pao-on .wow.pao-run.flipInX,
.pao-on .wow.pao-run.flipInY { animation-duration: .75s; }
.pao-on .wow.pao-run.hinge { animation-duration: 2s; }

/* Attention Seekers */
.pao-on .wow.pao-run.bounce { animation-name: pao-bounce; transform-origin: center bottom; }
.pao-on .wow.pao-run.flash { animation-name: pao-flash; }
.pao-on .wow.pao-run.pulse { animation-name: pao-pulse; animation-timing-function: ease-in-out; }
.pao-on .wow.pao-run.rubberBand { animation-name: pao-rubberBand; }
.pao-on .wow.pao-run.shake { animation-name: pao-shake; }
.pao-on .wow.pao-run.swing { animation-name: pao-swing; transform-origin: top center; }
.pao-on .wow.pao-run.tada { animation-name: pao-tada; }
.pao-on .wow.pao-run.wobble { animation-name: pao-wobble; }
.pao-on .wow.pao-run.jello { animation-name: pao-jello; transform-origin: center; }

@keyframes pao-bounce {
  0%, 20%, 53%, 100% { animation-timing-function: cubic-bezier(.215, .61, .355, 1); transform: translate3d(0, 0, 0); }
  40%, 43% { animation-timing-function: cubic-bezier(.755, .05, .855, .06); transform: translate3d(0, -30px, 0) scaleY(1.1); }
  70% { animation-timing-function: cubic-bezier(.755, .05, .855, .06); transform: translate3d(0, -15px, 0) scaleY(1.05); }
  80% { transform: translate3d(0, 0, 0) scaleY(.95); }
  90% { transform: translate3d(0, -4px, 0) scaleY(1.02); }
}
@keyframes pao-flash {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}
@keyframes pao-pulse {
  0%, 100% { transform: scale3d(1, 1, 1); }
  50% { transform: scale3d(1.05, 1.05, 1.05); }
}
@keyframes pao-rubberBand {
  0%, 100% { transform: scale3d(1, 1, 1); }
  30% { transform: scale3d(1.25, .75, 1); }
  40% { transform: scale3d(.75, 1.25, 1); }
  50% { transform: scale3d(1.15, .85, 1); }
  65% { transform: scale3d(.95, 1.05, 1); }
  75% { transform: scale3d(1.05, .95, 1); }
}
@keyframes pao-shake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  10%, 30%, 50%, 70%, 90% { transform: translate3d(-10px, 0, 0); }
  20%, 40%, 60%, 80% { transform: translate3d(10px, 0, 0); }
}
@keyframes pao-swing {
  20% { transform: rotate3d(0, 0, 1, 15deg); }
  40% { transform: rotate3d(0, 0, 1, -10deg); }
  60% { transform: rotate3d(0, 0, 1, 5deg); }
  80% { transform: rotate3d(0, 0, 1, -5deg); }
  100% { transform: rotate3d(0, 0, 1, 0deg); }
}
@keyframes pao-tada {
  0%, 100% { transform: scale3d(1, 1, 1); }
  10%, 20% { transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); }
  30%, 50%, 70%, 90% { transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); }
  40%, 60%, 80% { transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); }
}
@keyframes pao-wobble {
  0%, 100% { transform: translate3d(0, 0, 0); }
  15% { transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); }
  30% { transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); }
  45% { transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); }
  60% { transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); }
  75% { transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); }
}
@keyframes pao-jello {
  0%, 11.1%, 100% { transform: translate3d(0, 0, 0); }
  22.2% { transform: skewX(-12.5deg) skewY(-12.5deg); }
  33.3% { transform: skewX(6.25deg) skewY(6.25deg); }
  44.4% { transform: skewX(-3.125deg) skewY(-3.125deg); }
  55.5% { transform: skewX(1.5625deg) skewY(1.5625deg); }
  66.6% { transform: skewX(-.78125deg) skewY(-.78125deg); }
  77.7% { transform: skewX(.390625deg) skewY(.390625deg); }
  88.8% { transform: skewX(-.1953125deg) skewY(-.1953125deg); }
}

/* Bouncing Entrances */
.pao-on .wow.pao-run.bounceIn { animation-name: pao-bounceIn; }
.pao-on .wow.pao-run.bounceInDown { animation-name: pao-bounceInDown; }
.pao-on .wow.pao-run.bounceInLeft { animation-name: pao-bounceInLeft; }
.pao-on .wow.pao-run.bounceInRight { animation-name: pao-bounceInRight; }
.pao-on .wow.pao-run.bounceInUp { animation-name: pao-bounceInUp; }
.pao-on .wow.pao-run[class*="bounceIn"] { animation-timing-function: cubic-bezier(.215, .61, .355, 1); }

@keyframes pao-bounceIn {
  0% { opacity: 0; transform: scale3d(.3, .3, .3); }
  20% { transform: scale3d(1.1, 1.1, 1.1); }
  40% { transform: scale3d(.9, .9, .9); }
  60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); }
  80% { transform: scale3d(.97, .97, .97); }
  100% { opacity: 1; transform: scale3d(1, 1, 1); }
}
@keyframes pao-bounceInDown {
  0% { opacity: 0; transform: translate3d(0, -100vh, 0); }
  60% { opacity: 1; transform: translate3d(0, 25px, 0); }
  75% { transform: translate3d(0, -10px, 0); }
  90% { transform: translate3d(0, 5px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes pao-bounceInLeft {
  0% { opacity: 0; transform: translate3d(-100vw, 0, 0); }
  60% { opacity: 1; transform: translate3d(25px, 0, 0); }
  75% { transform: translate3d(-10px, 0, 0); }
  90% { transform: translate3d(5px, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes pao-bounceInRight {
  0% { opacity: 0; transform: translate3d(100vw, 0, 0); }
  60% { opacity: 1; transform: translate3d(-25px, 0, 0); }
  75% { transform: translate3d(10px, 0, 0); }
  90% { transform: translate3d(-5px, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes pao-bounceInUp {
  0% { opacity: 0; transform: translate3d(0, 100vh, 0); }
  60% { opacity: 1; transform: translate3d(0, -20px, 0); }
  75% { transform: translate3d(0, 10px, 0); }
  90% { transform: translate3d(0, -5px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Fading Entrances */
.pao-on .wow.pao-run.fadeIn { animation-name: pao-fadeIn; }
.pao-on .wow.pao-run.fadeInDown { animation-name: pao-fadeInDown; }
.pao-on .wow.pao-run.fadeInDownBig { animation-name: pao-fadeInDownBig; }
.pao-on .wow.pao-run.fadeInLeft { animation-name: pao-fadeInLeft; }
.pao-on .wow.pao-run.fadeInLeftBig { animation-name: pao-fadeInLeftBig; }

@keyframes pao-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pao-fadeInDown {
  from { opacity: 0; transform: translate3d(0, -100%, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pao-fadeInDownBig {
  from { opacity: 0; transform: translate3d(0, -100vh, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pao-fadeInLeft {
  from { opacity: 0; transform: translate3d(-100%, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pao-fadeInLeftBig {
  from { opacity: 0; transform: translate3d(-100vw, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Flippers */
.pao-on .wow.pao-run.flip { animation-name: pao-flip; backface-visibility: visible; }
.pao-on .wow.pao-run.flipInX { animation-name: pao-flipInX; backface-visibility: visible; }
.pao-on .wow.pao-run.flipInY { animation-name: pao-flipInY; backface-visibility: visible; }

@keyframes pao-flip {
  0% { animation-timing-function: ease-out; transform: perspective(400px) rotate3d(0, 1, 0, -360deg); }
  40% { animation-timing-function: ease-out; transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); }
  50% { animation-timing-function: ease-in; transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); }
  80% { animation-timing-function: ease-in; transform: perspective(400px) scale3d(.95, .95, .95); }
  100% { animation-timing-function: ease-in; transform: perspective(400px); }
}
@keyframes pao-flipInX {
  0% { opacity: 0; animation-timing-function: ease-in; transform: perspective(400px) rotate3d(1, 0, 0, 90deg); }
  40% { animation-timing-function: ease-in; transform: perspective(400px) rotate3d(1, 0, 0, -20deg); }
  60% { opacity: 1; transform: perspective(400px) rotate3d(1, 0, 0, 10deg); }
  80% { transform: perspective(400px) rotate3d(1, 0, 0, -5deg); }
  100% { transform: perspective(400px); }
}
@keyframes pao-flipInY {
  0% { opacity: 0; animation-timing-function: ease-in; transform: perspective(400px) rotate3d(0, 1, 0, 90deg); }
  40% { animation-timing-function: ease-in; transform: perspective(400px) rotate3d(0, 1, 0, -20deg); }
  60% { opacity: 1; transform: perspective(400px) rotate3d(0, 1, 0, 10deg); }
  80% { transform: perspective(400px) rotate3d(0, 1, 0, -5deg); }
  100% { transform: perspective(400px); }
}

/* Lightspeed */
.pao-on .wow.pao-run.lightSpeedIn { animation-name: pao-lightSpeedIn; animation-timing-function: ease-out; }

@keyframes pao-lightSpeedIn {
  0% { opacity: 0; transform: translate3d(100%, 0, 0) skewX(-30deg); }
  60% { opacity: 1; transform: skewX(20deg); }
  80% { transform: skewX(-5deg); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Rotating Entrances */
.pao-on .wow.pao-run.rotateIn { animation-name: pao-rotateIn; transform-origin: center; }
.pao-on .wow.pao-run.rotateInDownLeft { animation-name: pao-rotateInDownLeft; transform-origin: left bottom; }
.pao-on .wow.pao-run.rotateInDownRight { animation-name: pao-rotateInDownRight; transform-origin: right bottom; }
.pao-on .wow.pao-run.rotateInUpLeft { animation-name: pao-rotateInUpLeft; transform-origin: left bottom; }
.pao-on .wow.pao-run.rotateInUpRight { animation-name: pao-rotateInUpRight; transform-origin: right bottom; }

@keyframes pao-rotateIn {
  from { opacity: 0; transform: rotate3d(0, 0, 1, -200deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pao-rotateInDownLeft {
  from { opacity: 0; transform: rotate3d(0, 0, 1, -45deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pao-rotateInDownRight {
  from { opacity: 0; transform: rotate3d(0, 0, 1, 45deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pao-rotateInUpLeft {
  from { opacity: 0; transform: rotate3d(0, 0, 1, 45deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pao-rotateInUpRight {
  from { opacity: 0; transform: rotate3d(0, 0, 1, -90deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Sliding Entrances */
.pao-on .wow.pao-run.slideInUp { animation-name: pao-slideInUp; }
.pao-on .wow.pao-run.slideInDown { animation-name: pao-slideInDown; }
.pao-on .wow.pao-run.slideInLeft { animation-name: pao-slideInLeft; }
.pao-on .wow.pao-run.slideInRight { animation-name: pao-slideInRight; }

@keyframes pao-slideInUp {
  from { transform: translate3d(0, 100%, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@keyframes pao-slideInDown {
  from { transform: translate3d(0, -100%, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@keyframes pao-slideInLeft {
  from { transform: translate3d(-100%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@keyframes pao-slideInRight {
  from { transform: translate3d(100%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

/* Zoom Entrances */
.pao-on .wow.pao-run.zoomIn { animation-name: pao-zoomIn; }
.pao-on .wow.pao-run.zoomInDown { animation-name: pao-zoomInDown; }
.pao-on .wow.pao-run.zoomInLeft { animation-name: pao-zoomInLeft; }
.pao-on .wow.pao-run.zoomInRight { animation-name: pao-zoomInRight; }
.pao-on .wow.pao-run.zoomInUp { animation-name: pao-zoomInUp; }

@keyframes pao-zoomIn {
  from { opacity: 0; transform: scale3d(.3, .3, .3); }
  50% { opacity: 1; }
}
@keyframes pao-zoomInDown {
  from { opacity: 0; animation-timing-function: cubic-bezier(.55, .055, .675, .19); transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); }
  60% { opacity: 1; animation-timing-function: cubic-bezier(.175, .885, .32, 1); transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); }
}
@keyframes pao-zoomInLeft {
  from { opacity: 0; animation-timing-function: cubic-bezier(.55, .055, .675, .19); transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); }
  60% { opacity: 1; animation-timing-function: cubic-bezier(.175, .885, .32, 1); transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); }
}
@keyframes pao-zoomInRight {
  from { opacity: 0; animation-timing-function: cubic-bezier(.55, .055, .675, .19); transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); }
  60% { opacity: 1; animation-timing-function: cubic-bezier(.175, .885, .32, 1); transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); }
}
@keyframes pao-zoomInUp {
  from { opacity: 0; animation-timing-function: cubic-bezier(.55, .055, .675, .19); transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); }
  60% { opacity: 1; animation-timing-function: cubic-bezier(.175, .885, .32, 1); transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); }
}

/* Specials */
.pao-on .wow.pao-run.hinge { animation-name: pao-hinge; }
.pao-on .wow.pao-run.rollIn { animation-name: pao-rollIn; }

@keyframes pao-hinge {
  0% { animation-timing-function: ease-in-out; transform-origin: top left; }
  20%, 60% { animation-timing-function: ease-in-out; transform: rotate3d(0, 0, 1, 80deg); transform-origin: top left; }
  40%, 80% { opacity: 1; animation-timing-function: ease-in-out; transform: rotate3d(0, 0, 1, 60deg); transform-origin: top left; }
  100% { opacity: 0; transform: translate3d(0, 700px, 0); }
}
@keyframes pao-rollIn {
  from { opacity: 0; transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Sicherheitsnetz: falls das System erst nach dem Laden auf „Bewegung reduzieren“ steht */
@media (prefers-reduced-motion: reduce) {
  .pao-on .wow:not(.pao-run) { visibility: visible; }
  .pao-on .wow.pao-run { animation: none !important; }
}
