/* KEDAICDID R351 — consistent hover pop, page transition and neon-red loading bar. */
:root {
  --kcd-r351-motion-ease: cubic-bezier(.2,.78,.22,1);
  --kcd-r351-pop-shadow: 0 16px 34px rgba(117, 39, 190, .17), 0 0 0 1px rgba(166, 77, 255, .13);
}

/* The top progress indicator is intentionally thicker and red, with a visible glow. */
#kcd-r351-loading-bar {
  position: fixed !important;
  z-index: 2147483647 !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 8px !important;
  overflow: visible !important;
  opacity: 0 !important;
  pointer-events: none !important;
  background: transparent !important;
  transform: translateZ(0) !important;
  transition: opacity 180ms ease !important;
}
#kcd-r351-loading-bar.is-active { opacity: 1 !important; }
#kcd-r351-loading-bar > span {
  display: block !important;
  width: 0;
  height: 100% !important;
  border-radius: 0 8px 8px 0 !important;
  background: linear-gradient(90deg, #ff3434 0%, #ff1010 48%, #ff7777 100%) !important;
  box-shadow: 0 0 5px #ff1717, 0 0 12px 2px rgba(255, 0, 0, .88), 0 0 26px 5px rgba(255, 0, 0, .62) !important;
  transition: width 1050ms cubic-bezier(.12,.72,.18,1) !important;
  will-change: width;
}

/* Hover lift/pop is limited to real mouse/trackpad pointers. Layout dimensions remain unchanged. */
@media (hover: hover) and (pointer: fine) {
  [data-kedaicdid-legacy-root] :is(
    .kcd-home-service-card,
    .kcd-category-card,
    .kcd-product-card,
    .ref-account-card,
    .testi-card,
    .kcd-terms-v69-tab,
    .kcd-terms-v69-detail,
    .rules-card,
    .step-card,
    .faq-contact-cta,
    .kcd-cara-v69-card,
    .kcd-cara-v69-help,
    .kcd-support-card,
    .kcd265-product,
    .price-card,
    .account-card,
    .method-card,
    .social-card,
    .faq-item,
    .ref-home-testi-card,
    .mtr-card,
    .bi-card,
    .pc-game-card,
    .game-card,
    .kcd-game-card,
    [data-game-home]
  ) {
    transition:
      translate 240ms var(--kcd-r351-motion-ease),
      scale 240ms var(--kcd-r351-motion-ease),
      box-shadow 240ms var(--kcd-r351-motion-ease),
      border-color 240ms ease,
      filter 240ms ease !important;
    transform-origin: center center;
    backface-visibility: hidden;
  }

  [data-kedaicdid-legacy-root] :is(
    .kcd-home-service-card,
    .kcd-category-card,
    .kcd-product-card,
    .ref-account-card,
    .testi-card,
    .kcd-terms-v69-tab,
    .kcd-terms-v69-detail,
    .rules-card,
    .step-card,
    .faq-contact-cta,
    .kcd-cara-v69-card,
    .kcd-cara-v69-help,
    .kcd-support-card,
    .kcd265-product,
    .price-card,
    .account-card,
    .method-card,
    .social-card,
    .faq-item,
    .ref-home-testi-card,
    .mtr-card,
    .bi-card,
    .pc-game-card,
    .game-card,
    .kcd-game-card,
    [data-game-home]
  ):hover {
    translate: 0 -5px;
    scale: 1.025;
    z-index: 6;
    border-color: rgba(166, 77, 255, .58) !important;
    box-shadow: var(--kcd-r351-pop-shadow) !important;
    filter: saturate(1.035);
  }

  [data-kedaicdid-legacy-root] :is(
    .kcd-site-header .nav-item,
    .kcd-select-package,
    .kcd-direct-order,
    .kcd-order-submit,
    .kcd265-more,
    .kcd-welcome-actions a,
    .kcd-support-card b,
    .kcd-product-cart
  ) {
    transition: transform 190ms var(--kcd-r351-motion-ease), filter 190ms ease, box-shadow 190ms ease !important;
  }
  [data-kedaicdid-legacy-root] :is(
    .kcd-site-header .nav-item,
    .kcd-select-package,
    .kcd-direct-order,
    .kcd-order-submit,
    .kcd265-more,
    .kcd-welcome-actions a,
    .kcd-product-cart
  ):hover:not(:disabled) {
    transform: translateY(-2px) scale(1.035);
    filter: brightness(1.055);
  }
  [data-kedaicdid-legacy-root] :is(button, [role="button"]):hover:not(:disabled) {
    filter: brightness(1.04);
  }
}

/* Touchscreens get a short press response instead of a sticky hover state. */
@media (hover: none), (pointer: coarse) {
  [data-kedaicdid-legacy-root] :is(
    .kcd-home-service-card,
    .kcd-category-card,
    .kcd-product-card,
    .ref-account-card,
    .testi-card,
    .kcd-terms-v69-tab,
    .kcd-terms-v69-detail,
    .kcd265-product,
    .price-card,
    .rules-card,
    .step-card,
    .faq-item
  ):active {
    scale: .985;
    transition: scale 110ms ease !important;
  }
}

/* Page content enters with a short, controlled fade/lift after a user navigation. */
[data-kedaicdid-legacy-root] .page-section.active.kcd-r351-page-enter {
  animation: kcd-r351-page-enter 390ms cubic-bezier(.2,.72,.22,1) both !important;
}
@keyframes kcd-r351-page-enter {
  from { opacity: .72; translate: 0 10px; filter: blur(1.5px); }
  to { opacity: 1; translate: 0 0; filter: none; }
}

/* Initial paint stays still; the reveal motion is only applied after navigation. */
html.kcd-r341-initial-stable [data-kedaicdid-legacy-root] .page-section.active.kcd-r351-page-enter {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #kcd-r351-loading-bar,
  #kcd-r351-loading-bar > span { transition: none !important; }
  [data-kedaicdid-legacy-root] :is(
    .kcd-home-service-card, .kcd-category-card, .kcd-product-card, .ref-account-card,
    .testi-card, .kcd-terms-v69-tab, .kcd-terms-v69-detail, .rules-card, .step-card,
    .faq-contact-cta, .kcd-cara-v69-card, .kcd-cara-v69-help, .kcd-support-card,
    .kcd265-product, .price-card, .account-card, .method-card, .social-card,
    .faq-item, .ref-home-testi-card, .mtr-card, .bi-card,
    .pc-game-card, .game-card, .kcd-game-card, [data-game-home]
  ) { transition: none !important; }
  [data-kedaicdid-legacy-root] .page-section.active.kcd-r351-page-enter { animation: none !important; }
}
