/* Opt-in FX: suppress legacy ::before/::after when data-tt-fx is set */
[data-tt-fx] {
  --tt-fx-a: 0.5;
  position: relative;
}
[data-tt-fx][data-tt-fx-i="soft"] { --tt-fx-a: 0.32; }
[data-tt-fx][data-tt-fx-i="mid"] { --tt-fx-a: 0.55; }
[data-tt-fx][data-tt-fx-i="strong"] { --tt-fx-a: 0.82; }

[data-tt-fx]::before,
[data-tt-fx]::after {
  content: none !important;
  animation: none !important;
  background-image: none !important;
  box-shadow: none !important;
}

[data-tt-fx="none"]::before,
[data-tt-fx="none"]::after {
  content: none !important;
}

/* Hover mode: effect layer only on hover */
[data-tt-fx][data-tt-fx-m="hover"] .tt-fx-layer {
  opacity: 0;
  transition: opacity .2s steps(2);
}
[data-tt-fx][data-tt-fx-m="hover"]:hover .tt-fx-layer,
[data-tt-fx][data-tt-fx-m="hover"]:focus-within .tt-fx-layer {
  opacity: 1;
}

.tt-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
  html:not(.tt-fx-ignore-prm) [data-tt-fx] .tt-fx-layer,
  html:not(.tt-fx-ignore-prm) [data-tt-fx]::before,
  html:not(.tt-fx-ignore-prm) [data-tt-fx]::after {
    animation: none !important;
  }
}
[data-tt-fx="shimmer"][data-tt-fx-m="always"]::before,
[data-tt-fx="shimmer"] .tt-fx-layer--shimmer {
  content: "" !important;
  display: block;
  position: absolute;
  left: -12%;
  right: -12%;
  height: 42%;
  top: -46%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 240, 246, calc(var(--tt-fx-a) * 0.45)) 38%,
    rgba(255, 61, 138, calc(var(--tt-fx-a) * 0.95)) 50%,
    rgba(255, 26, 60, calc(var(--tt-fx-a) * 0.55)) 62%,
    transparent 100%
  ) !important;
  mix-blend-mode: screen;
  filter: blur(0.4px);
  animation: tt-fx-roll 4.6s linear infinite !important;
}
[data-tt-fx="shimmer"][data-tt-fx-m="always"]::before { content: "" !important; }
[data-tt-fx="shimmer"][data-tt-fx-m="hover"]::before {
  content: "" !important;
  opacity: 0;
}
[data-tt-fx="shimmer"][data-tt-fx-m="hover"]:hover::before {
  opacity: 1;
  animation: tt-fx-roll 4.6s linear infinite !important;
}
@keyframes tt-fx-roll { to { top: 118%; } }
@media (prefers-reduced-motion: reduce) {
  html:not(.tt-fx-ignore-prm) [data-tt-fx="shimmer"]::before,
  html:not(.tt-fx-ignore-prm) .tt-fx-layer--shimmer { animation: none !important; display: none; }
}
