/* Hover effect presets (T096). The renderer adds `zx-fx-<name>` from the `_hover_effect` control. */
[class*='zx-fx-'] {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    filter 0.3s ease;
  will-change: transform;
}
.zx-fx-grow:hover { transform: scale(1.05); }
.zx-fx-shrink:hover { transform: scale(0.95); }
.zx-fx-float:hover { transform: translateY(-6px); }
.zx-fx-sink:hover { transform: translateY(6px); }
.zx-fx-rotate:hover { transform: rotate(4deg); }
.zx-fx-glow:hover { box-shadow: 0 0 18px rgba(37, 99, 235, 0.55); }
.zx-fx-shadow:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); }
.zx-fx-pulse:hover { animation: zx-fx-pulse 1s ease-in-out infinite; }
.zx-fx-bounce:hover { animation: zx-fx-bounce 0.8s ease; }
.zx-fx-underline { position: relative; }
.zx-fx-underline::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.zx-fx-underline:hover::after { transform: scaleX(1); }

@keyframes zx-fx-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes zx-fx-bounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
  60% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  [class*='zx-fx-']:hover {
    transform: none;
    animation: none;
  }
}

/* Sticky (T162). Classes are added by src/frontend/motion.ts on the devices the element is sticky on:
 * `zx-sticky--css` = "Stay in column" (native position: sticky), `zx-sticky--fixed` = JS fallback pinned to the
 * viewport (a `.zx-sticky-spacer` keeps its place). `--zx-sticky-offset` comes from the generated element CSS
 * (responsive Offset control), `--zx-admin-bar` from the runtime. */
.zx-sticky--css[data-zx-sticky='top'] {
  position: sticky;
  top: calc(var(--zx-sticky-offset, 0px) + var(--zx-admin-bar, 0px));
  z-index: 99;
}
.zx-sticky--css[data-zx-sticky='bottom'] {
  position: sticky;
  bottom: var(--zx-sticky-offset, 0px);
  z-index: 99;
}
.zx-sticky--fixed {
  position: fixed !important;
  z-index: 99;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
:where(.zx-sticky--on) {
  transition:
    background-color 0.3s ease,
    padding 0.3s ease,
    box-shadow 0.3s ease;
}

/* Mouse effects (T161): 3D tilt glare layer added by the runtime. */
.zx-tilt--relative {
  position: relative;
}
.zx-tilt__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle at var(--zx-glare-x, 50%) var(--zx-glare-y, 50%), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%);
}
