/* Effect markers: area effects that fill the marker's box (objects/effectArt.js).
 *
 * The core's part: the effect box, the layers' base rules, the keyframes the plugins' effects
 * share (table-fx-breathe, table-fx-turn, table-fx-drift), the still pose of reduced effects and
 * the picker tile. The effects are the plugins': the markers plugin's (plugins/markers/effects.css)
 * and sea-pack's whirlpool and sea spray (plugins/sea-pack/sea-pack.css).
 *
 * Only transform and opacity animate, so a table full of effects stays on the compositor; no
 * filters, masks or per-frame scripts. Every layer's own style is a still pose of the whole
 * effect, which is what reduced effects show. */

.table-object[data-kind="marker"] > .table-marker[data-group="effect"] {
  position: relative;
  width: 100%;
  height: 100%;
}

.table-effect {
  --fx: var(--marker-color, var(--table-accent));
  position: absolute;
  inset: 0;
  container-type: size;
  pointer-events: none;
}

.table-effect > span {
  position: absolute;
  display: block;
  pointer-events: none;
}

.table-effect__drawing {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

@keyframes table-fx-breathe {
  from { opacity: 0.72; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.04); }
}

@keyframes table-fx-turn {
  to { transform: rotate(360deg); }
}

@keyframes table-fx-drift {
  from { opacity: 0.6; transform: translateX(-9%); }
  to { opacity: 0.95; transform: translateX(9%); }
}

/* Reduced effects (the device's switch, "reduce effects", the system setting): the still pose. */
body.table-effect-off--image-effects .table-effect *,
.is-effects-reduced .table-effect * {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .table-effect * { animation: none !important; }
}

/* Picker previews: the effect small, on a dark tile so pale effects show. */
.table-marker-picker__swatch--effect {
  position: relative;
  width: 56px;
  height: 56px;
  overflow: hidden;
  background: radial-gradient(closest-side, rgba(var(--table-black-rgb), 0.15), rgba(var(--table-black-rgb), 0.45));
  border-radius: 10px;
}
