/* ==========================================================================
   Aidem Glitch Strapline / ACF Heading
   ========================================================================== */

.aidem-glitch .base,
.aidem-glitch-looped .base,
.aidem-glitch-widget .base {
  position: relative;
  display: inline-block;
}

.aidem-glitch .aidem-glitch-purple,
.aidem-glitch-looped .aidem-glitch-purple,
.aidem-glitch-widget .aidem-glitch-purple,
.aidem-glitch .purple,
.aidem-glitch-looped .purple,
.aidem-glitch-widget .purple,
.aidem-glitch .aidem-glitch-green,
.aidem-glitch-looped .aidem-glitch-green,
.aidem-glitch-widget .aidem-glitch-green,
.aidem-glitch .green,
.aidem-glitch-looped .green,
.aidem-glitch-widget .green {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

.aidem-glitch .aidem-glitch-purple,
.aidem-glitch-looped .aidem-glitch-purple,
.aidem-glitch-widget .aidem-glitch-purple,
.aidem-glitch .purple,
.aidem-glitch-looped .purple,
.aidem-glitch-widget .purple {
  color: oklch(60% 0.22 285);
}

.aidem-glitch .aidem-glitch-green,
.aidem-glitch-looped .aidem-glitch-green,
.aidem-glitch-widget .aidem-glitch-green,
.aidem-glitch .green,
.aidem-glitch-looped .green,
.aidem-glitch-widget .green {
  color: oklch(92% 0.19 127);
}

.aidem-glitch-strapline-widget .aidem-glitch-strapline-title {
  width: 100%;
  max-width: 100%;
  white-space: normal;
}

.elementor-widget-aidem_glitch_strapline > .elementor-widget-container {
  width: 100%;
  height: 100%;
}

.aidem-glitch-strapline-widget {
  position: relative;
  width: 100%;
  height: 100%;
}

.aidem-glitch-strapline-stage {
  position: relative;
  width: 100%;
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.aidem-glitch-strapline-positioner {
  width: 100%;
  transform: translateY(var(--ags-offset-y, 0px));
}

.aidem-glitch-strapline-widget .aidem-glitch-strapline-title .aidem-glitch-line {
  display: block;
  width: 100%;
  margin: var(--aidem-line-gap, 0.12em) 0;
  line-height: inherit;
}

.aidem-glitch-strapline-widget .aidem-glitch-strapline-title .aidem-glitch-word {
  display: inline-block;
  line-height: inherit;
  margin: 0;
}

.aidem-glitch-strapline-widget .aidem-glitch-strapline-title .aidem-glitch-line:first-child {
  margin-top: 0;
}

.aidem-glitch-strapline-widget .aidem-glitch-strapline-title .aidem-glitch-line:last-child {
  margin-bottom: 0;
}

.aidem-glitch-strapline-widget .aidem-glitch-strapline-title.aidem-lines-horizontal .aidem-glitch-line {
  display: inline;
  width: auto;
  margin: 0 0.45ch 0 0;
}

.aidem-glitch-strapline-widget .aidem-glitch-strapline-title.aidem-lines-horizontal .aidem-glitch-line:last-child {
  margin-right: 0;
}

.container-horizontal .aidem-glitch-strapline-widget .aidem-glitch-strapline-title.span-container .aidem-glitch-line {
  display: inline;
  width: auto;
  margin: 0 0.45ch 0 0;
}

.container-horizontal .aidem-glitch-strapline-widget .aidem-glitch-strapline-title.span-container .aidem-glitch-line:last-child {
  margin-right: 0;
}

.container-vertical .aidem-glitch-strapline-widget .aidem-glitch-strapline-title.span-container .aidem-glitch-line {
  display: block;
  width: 100%;
  margin: var(--aidem-line-gap, 0.12em) 0;
}

/* Compact card-safe mode for the ACF glitch heading.
   Opt-in only, so existing hero/strapline uses stay unchanged. */
.aidem-glitch-acf-heading-widget.aidem-glitch-card-compact {
  height: auto;
  min-height: 0;
}

.aidem-glitch-acf-heading-widget.aidem-glitch-card-compact .aidem-glitch-strapline-stage {
  min-height: 0;
  height: auto;
}

.aidem-glitch-acf-heading-widget.aidem-glitch-card-compact .aidem-glitch-strapline-positioner {
  width: auto;
  max-width: 100%;
}

.aidem-glitch-acf-heading-widget.aidem-glitch-card-compact .aidem-glitch-strapline-title {
  display: inline-block;
  width: auto;
  max-width: 100%;
}

.aidem-glitch-acf-heading-widget.aidem-glitch-card-compact .aidem-glitch-strapline-title .aidem-glitch-line {
  width: auto;
  max-width: 100%;
}

.aidem-glitch-acf-heading-widget.aidem-glitch-card-compact.aidem-lines-horizontal .aidem-glitch-strapline-title .aidem-glitch-line,
.aidem-glitch-acf-heading-widget.aidem-glitch-card-compact.container-horizontal .aidem-glitch-strapline-title.span-container .aidem-glitch-line {
  display: inline;
  width: auto;
  max-width: none;
}

/* Elementor editor readability: keep strapline words visible while editing. */
body.elementor-editor-active .aidem-glitch-strapline-widget .aidem-glitch-word,
.elementor-editor-active .aidem-glitch-strapline-widget .aidem-glitch-word {
  opacity: 1 !important;
}
