:root {
  --bdf-motion-fast: 160ms;
  --bdf-motion-medium: 280ms;
  --bdf-motion-slow: 520ms;
  --bdf-motion-ease: cubic-bezier(.2, .8, .2, 1);
  --bdf-motion-soft: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes bdf-fade-up {
    from {
      opacity: 0;
      transform: translate3d(0, 14px, 0);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }

  @keyframes bdf-soft-pop {
    from {
      opacity: 0;
      transform: scale(.985) translate3d(0, 8px, 0);
    }
    to {
      opacity: 1;
      transform: scale(1) translate3d(0, 0, 0);
    }
  }

  @keyframes bdf-gentle-shine {
    0% {
      transform: translateX(-120%);
    }
    100% {
      transform: translateX(120%);
    }
  }

  html.bdf-motion-ready .bdf-animate-in {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }

  html.bdf-motion-ready .bdf-animate-in.is-visible {
    animation: bdf-fade-up var(--bdf-motion-slow) var(--bdf-motion-soft) both;
    animation-delay: var(--bdf-motion-delay, 0ms);
  }

  html.bdf-motion-ready .bdf-animate-pop.is-visible {
    animation-name: bdf-soft-pop;
  }

  .bdf-motion-ready :where(.public-post-card, .premium-card, .blog-card, .user-module-card, .dashboard-card, .reviews-chart-card, .admin-card, .admin-metric-card, .admin-panel-card, .ebook-admin-card, .widget-card) {
    transition:
      transform var(--bdf-motion-medium) var(--bdf-motion-ease),
      box-shadow var(--bdf-motion-medium) var(--bdf-motion-ease),
      border-color var(--bdf-motion-medium) var(--bdf-motion-ease),
      background-color var(--bdf-motion-medium) var(--bdf-motion-ease);
  }

  .bdf-motion-ready :where(.public-post-card, .premium-card, .blog-card, .user-module-card, .dashboard-card, .reviews-chart-card, .admin-card, .admin-metric-card, .admin-panel-card, .ebook-admin-card, .widget-card):hover {
    transform: translateY(-3px);
  }

  .bdf-motion-ready :where(a, button, .button, .btn, .admin-action, .admin-btn, .user-button, .premium-button, [role="button"]) {
    transition:
      transform var(--bdf-motion-fast) var(--bdf-motion-ease),
      box-shadow var(--bdf-motion-fast) var(--bdf-motion-ease),
      background-color var(--bdf-motion-fast) var(--bdf-motion-ease),
      border-color var(--bdf-motion-fast) var(--bdf-motion-ease),
      color var(--bdf-motion-fast) var(--bdf-motion-ease);
  }

  .bdf-motion-ready :where(button, .button, .btn, .admin-action, .admin-btn, .user-button, .premium-button, [role="button"]):where(:hover, :focus-visible) {
    transform: translateY(-1px);
  }

  .bdf-motion-ready :where(button, .button, .btn, .admin-action, .admin-btn, .user-button, .premium-button, [role="button"]):active {
    transform: translateY(0) scale(.99);
  }

  .bdf-motion-ready :where(input, textarea, select) {
    transition:
      border-color var(--bdf-motion-fast) var(--bdf-motion-ease),
      box-shadow var(--bdf-motion-fast) var(--bdf-motion-ease),
      background-color var(--bdf-motion-fast) var(--bdf-motion-ease);
  }

  .bdf-motion-ready :where(input, textarea, select):focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  }

  .bdf-motion-ready :where(.status-pill, .badge, .chip, .tag, .public-post-tag, .public-category-link, .public-inline-taglink) {
    transition:
      transform var(--bdf-motion-fast) var(--bdf-motion-ease),
      background-color var(--bdf-motion-fast) var(--bdf-motion-ease),
      border-color var(--bdf-motion-fast) var(--bdf-motion-ease),
      color var(--bdf-motion-fast) var(--bdf-motion-ease);
  }

  .bdf-motion-ready :where(.status-pill, .badge, .chip, .tag, .public-post-tag, .public-category-link, .public-inline-taglink):hover {
    transform: translateY(-1px);
  }

  .bdf-motion-ready :where(.hero, .premium-hero, .public-article-hero, .user-dashboard-hero, .admin-main-header) {
    animation: bdf-fade-up 700ms var(--bdf-motion-soft) both;
  }

  .bdf-motion-ready :where(.loading, .skeleton, .user-boot-loader__bar, .admin-skeleton)::after {
    animation: bdf-gentle-shine 1.6s var(--bdf-motion-ease) infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
