/*
 * DDT Animation CSS v1.0.0
 * Comprehensive animation library with keyframes
 */

/* ========================================
   ANIMATION BASE
   ======================================== */

.ddt-animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.ddt-animated-infinite {
  animation-iteration-count: infinite;
}

/* Animation Speed */
.ddt-animated-faster {
  animation-duration: 0.5s;
}

.ddt-animated-fast {
  animation-duration: 0.8s;
}

.ddt-animated-slow {
  animation-duration: 2s;
}

.ddt-animated-slower {
  animation-duration: 3s;
}

/* Animation Delay */
.ddt-delay-1s {
  animation-delay: 1s;
}

.ddt-delay-2s {
  animation-delay: 2s;
}

.ddt-delay-3s {
  animation-delay: 3s;
}

.ddt-delay-4s {
  animation-delay: 4s;
}

.ddt-delay-5s {
  animation-delay: 5s;
}

/* ========================================
   FADE ANIMATIONS
   ======================================== */

/* Fade In */
@keyframes ddt-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ddt-fadeIn {
  animation-name: ddt-fadeIn;
}

/* Fade Out */
@keyframes ddt-fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.ddt-fadeOut {
  animation-name: ddt-fadeOut;
}

/* Fade In Up */
@keyframes ddt-fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.ddt-fadeInUp {
  animation-name: ddt-fadeInUp;
}

/* Fade In Down */
@keyframes ddt-fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.ddt-fadeInDown {
  animation-name: ddt-fadeInDown;
}

/* Fade In Left */
@keyframes ddt-fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.ddt-fadeInLeft {
  animation-name: ddt-fadeInLeft;
}

/* Fade In Right */
@keyframes ddt-fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(100%, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.ddt-fadeInRight {
  animation-name: ddt-fadeInRight;
}

/* Fade Out Up */
@keyframes ddt-fadeOutUp {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }
}

.ddt-fadeOutUp {
  animation-name: ddt-fadeOutUp;
}

/* Fade Out Down */
@keyframes ddt-fadeOutDown {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }
}

.ddt-fadeOutDown {
  animation-name: ddt-fadeOutDown;
}

/* ========================================
   SLIDE ANIMATIONS
   ======================================== */

/* Slide In Up */
@keyframes ddt-slideInUp {
  from {
    transform: translate3d(0, 100%, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

.ddt-slideInUp {
  animation-name: ddt-slideInUp;
}

/* Slide In Down */
@keyframes ddt-slideInDown {
  from {
    transform: translate3d(0, -100%, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

.ddt-slideInDown {
  animation-name: ddt-slideInDown;
}

/* Slide In Left */
@keyframes ddt-slideInLeft {
  from {
    transform: translate3d(-100%, 0, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

.ddt-slideInLeft {
  animation-name: ddt-slideInLeft;
}

/* Slide In Right */
@keyframes ddt-slideInRight {
  from {
    transform: translate3d(100%, 0, 0);
    visibility: visible;
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

.ddt-slideInRight {
  animation-name: ddt-slideInRight;
}

/* Slide Out Up */
@keyframes ddt-slideOutUp {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    visibility: hidden;
    transform: translate3d(0, -100%, 0);
  }
}

.ddt-slideOutUp {
  animation-name: ddt-slideOutUp;
}

/* Slide Out Down */
@keyframes ddt-slideOutDown {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    visibility: hidden;
    transform: translate3d(0, 100%, 0);
  }
}

.ddt-slideOutDown {
  animation-name: ddt-slideOutDown;
}

/* ========================================
   ZOOM ANIMATIONS
   ======================================== */

/* Zoom In */
@keyframes ddt-zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
  50% {
    opacity: 1;
  }
}

.ddt-zoomIn {
  animation-name: ddt-zoomIn;
}

/* Zoom Out */
@keyframes ddt-zoomOut {
  from {
    opacity: 1;
  }
  50% {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
  to {
    opacity: 0;
  }
}

.ddt-zoomOut {
  animation-name: ddt-zoomOut;
}

/* Zoom In Up */
@keyframes ddt-zoomInUp {
  from {
    opacity: 0;
    transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);
  }
  60% {
    opacity: 1;
    transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
  }
}

.ddt-zoomInUp {
  animation-name: ddt-zoomInUp;
}

/* Zoom In Down */
@keyframes ddt-zoomInDown {
  from {
    opacity: 0;
    transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);
  }
  60% {
    opacity: 1;
    transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
  }
}

.ddt-zoomInDown {
  animation-name: ddt-zoomInDown;
}

/* ========================================
   BOUNCE ANIMATIONS
   ======================================== */

/* Bounce */
@keyframes ddt-bounce {
  from,
  20%,
  53%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0);
  }
  40%,
  43% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -30px, 0) scaleY(1.1);
  }
  70% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -15px, 0) scaleY(1.05);
  }
  80% {
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0) scaleY(0.95);
  }
  90% {
    transform: translate3d(0, -4px, 0) scaleY(1.02);
  }
}

.ddt-bounce {
  animation-name: ddt-bounce;
  transform-origin: center bottom;
}

/* Bounce In */
@keyframes ddt-bounceIn {
  from,
  20%,
  40%,
  60%,
  80%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  0% {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
  20% {
    transform: scale3d(1.1, 1.1, 1.1);
  }
  40% {
    transform: scale3d(0.9, 0.9, 0.9);
  }
  60% {
    opacity: 1;
    transform: scale3d(1.03, 1.03, 1.03);
  }
  80% {
    transform: scale3d(0.97, 0.97, 0.97);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

.ddt-bounceIn {
  animation-duration: 0.75s;
  animation-name: ddt-bounceIn;
}

/* Bounce Out */
@keyframes ddt-bounceOut {
  20% {
    transform: scale3d(0.9, 0.9, 0.9);
  }
  50%,
  55% {
    opacity: 1;
    transform: scale3d(1.1, 1.1, 1.1);
  }
  to {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
}

.ddt-bounceOut {
  animation-duration: 0.75s;
  animation-name: ddt-bounceOut;
}

/* ========================================
   ROTATE ANIMATIONS
   ======================================== */

/* Rotate In */
@keyframes ddt-rotateIn {
  from {
    transform: rotate3d(0, 0, 1, -200deg);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

.ddt-rotateIn {
  animation-name: ddt-rotateIn;
  transform-origin: center;
}

/* Rotate Out */
@keyframes ddt-rotateOut {
  from {
    opacity: 1;
  }
  to {
    transform: rotate3d(0, 0, 1, 200deg);
    opacity: 0;
  }
}

.ddt-rotateOut {
  animation-name: ddt-rotateOut;
  transform-origin: center;
}

/* ========================================
   FLIP ANIMATIONS
   ======================================== */

/* Flip */
@keyframes ddt-flip {
  from {
    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);
    animation-timing-function: ease-out;
  }
  40% {
    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
    animation-timing-function: ease-out;
  }
  50% {
    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
    animation-timing-function: ease-in;
  }
  80% {
    transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);
    animation-timing-function: ease-in;
  }
  to {
    transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);
    animation-timing-function: ease-in;
  }
}

.ddt-flip {
  backface-visibility: visible;
  animation-name: ddt-flip;
}

/* Flip In X */
@keyframes ddt-flipInX {
  from {
    transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
    animation-timing-function: ease-in;
    opacity: 0;
  }
  40% {
    transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
    animation-timing-function: ease-in;
  }
  60% {
    transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
    opacity: 1;
  }
  80% {
    transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
  }
  to {
    transform: perspective(400px);
  }
}

.ddt-flipInX {
  backface-visibility: visible !important;
  animation-name: ddt-flipInX;
}

/* Flip In Y */
@keyframes ddt-flipInY {
  from {
    transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
    animation-timing-function: ease-in;
    opacity: 0;
  }
  40% {
    transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
    animation-timing-function: ease-in;
  }
  60% {
    transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
    opacity: 1;
  }
  80% {
    transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
  }
  to {
    transform: perspective(400px);
  }
}

.ddt-flipInY {
  backface-visibility: visible !important;
  animation-name: ddt-flipInY;
}

/* ========================================
   ATTENTION SEEKERS
   ======================================== */

/* Pulse */
@keyframes ddt-pulse {
  from {
    transform: scale3d(1, 1, 1);
  }
  50% {
    transform: scale3d(1.05, 1.05, 1.05);
  }
  to {
    transform: scale3d(1, 1, 1);
  }
}

.ddt-pulse {
  animation-name: ddt-pulse;
  animation-timing-function: ease-in-out;
}

/* Heartbeat */
@keyframes ddt-heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.3);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.3);
  }
  70% {
    transform: scale(1);
  }
}

.ddt-heartbeat {
  animation-name: ddt-heartbeat;
  animation-duration: 1.3s;
  animation-timing-function: ease-in-out;
}

/* Shake */
@keyframes ddt-shake {
  from,
  to {
    transform: translate3d(0, 0, 0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translate3d(-10px, 0, 0);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translate3d(10px, 0, 0);
  }
}

.ddt-shake {
  animation-name: ddt-shake;
}

/* Shake X */
@keyframes ddt-shakeX {
  from,
  to {
    transform: translate3d(0, 0, 0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translate3d(-10px, 0, 0);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translate3d(10px, 0, 0);
  }
}

.ddt-shakeX {
  animation-name: ddt-shakeX;
}

/* Shake Y */
@keyframes ddt-shakeY {
  from,
  to {
    transform: translate3d(0, 0, 0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translate3d(0, -10px, 0);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translate3d(0, 10px, 0);
  }
}

.ddt-shakeY {
  animation-name: ddt-shakeY;
}

/* Wobble */
@keyframes ddt-wobble {
  from {
    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);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

.ddt-wobble {
  animation-name: ddt-wobble;
}

/* Swing */
@keyframes ddt-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);
  }
  to {
    transform: rotate3d(0, 0, 1, 0deg);
  }
}

.ddt-swing {
  transform-origin: top center;
  animation-name: ddt-swing;
}

/* Tada */
@keyframes ddt-tada {
  from {
    transform: scale3d(1, 1, 1);
  }
  10%,
  20% {
    transform: scale3d(0.9, 0.9, 0.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);
  }
  to {
    transform: scale3d(1, 1, 1);
  }
}

.ddt-tada {
  animation-name: ddt-tada;
}

/* Jello */
@keyframes ddt-jello {
  from,
  11.1%,
  to {
    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(-0.78125deg) skewY(-0.78125deg);
  }
  77.7% {
    transform: skewX(0.390625deg) skewY(0.390625deg);
  }
  88.8% {
    transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
  }
}

.ddt-jello {
  animation-name: ddt-jello;
  transform-origin: center;
}

/* ========================================
   SPINNING ANIMATIONS
   ======================================== */

/* Spin */
@keyframes ddt-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.ddt-spin {
  animation-name: ddt-spin;
  animation-duration: 2s;
  animation-timing-function: linear;
}

/* Spin Reverse */
@keyframes ddt-spinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

.ddt-spinReverse {
  animation-name: ddt-spinReverse;
  animation-duration: 2s;
  animation-timing-function: linear;
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

/* Dots Bounce */
@keyframes ddt-dotsBounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.ddt-dots-bounce {
  display: inline-block;
}

.ddt-dots-bounce span {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 2px;
  background-color: currentColor;
  border-radius: 100%;
  animation: ddt-dotsBounce 1.4s infinite ease-in-out both;
}

.ddt-dots-bounce span:nth-child(1) {
  animation-delay: -0.32s;
}

.ddt-dots-bounce span:nth-child(2) {
  animation-delay: -0.16s;
}

/* Ripple */
@keyframes ddt-ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.ddt-ripple {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 64px;
}

.ddt-ripple div {
  position: absolute;
  border: 4px solid currentColor;
  opacity: 1;
  border-radius: 50%;
  animation: ddt-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.ddt-ripple div:nth-child(2) {
  animation-delay: -0.5s;
}

/* ========================================
   HOVER ANIMATIONS
   ======================================== */

.ddt-hover-float {
  transition: transform 0.3s ease;
}

.ddt-hover-float:hover {
  transform: translateY(-8px);
}

.ddt-hover-pulse:hover {
  animation: ddt-pulse 0.5s;
}

.ddt-hover-wobble:hover {
  animation: ddt-wobble 0.8s;
}

.ddt-hover-shake:hover {
  animation: ddt-shake 0.5s;
}

.ddt-hover-tada:hover {
  animation: ddt-tada 1s;
}

/* ========================================
   ENTRANCE UTILITIES
   ======================================== */

.ddt-entrance-delay-100 {
  animation-delay: 0.1s;
}

.ddt-entrance-delay-200 {
  animation-delay: 0.2s;
}

.ddt-entrance-delay-300 {
  animation-delay: 0.3s;
}

.ddt-entrance-delay-400 {
  animation-delay: 0.4s;
}

.ddt-entrance-delay-500 {
  animation-delay: 0.5s;
}

/* Staggered Animation Helper */
.ddt-stagger-1:nth-child(1) { animation-delay: 0.1s; }
.ddt-stagger-1:nth-child(2) { animation-delay: 0.2s; }
.ddt-stagger-1:nth-child(3) { animation-delay: 0.3s; }
.ddt-stagger-1:nth-child(4) { animation-delay: 0.4s; }
.ddt-stagger-1:nth-child(5) { animation-delay: 0.5s; }
.ddt-stagger-1:nth-child(6) { animation-delay: 0.6s; }

.ddt-stagger-2:nth-child(1) { animation-delay: 0.2s; }
.ddt-stagger-2:nth-child(2) { animation-delay: 0.4s; }
.ddt-stagger-2:nth-child(3) { animation-delay: 0.6s; }
.ddt-stagger-2:nth-child(4) { animation-delay: 0.8s; }
.ddt-stagger-2:nth-child(5) { animation-delay: 1s; }