/* 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;
  }
}
