/* Visual guardrails for generated slide canvases and brand marks.
 * The renderers deliberately keep their own inline sizing; these rules only
 * add a contrast cushion and prevent media from obscuring editable copy. */
.deckcraft-logo-contrast-guard {
  isolation: isolate;
  /* Brand marks stay crisp and unmodified. Contrast is handled by the
   * correct supplied logo variant and, where needed, its local background. */
  filter: none;
}

/* A non-opaque photo must never sit above text. The renderer can still use
 * full-bleed imagery, but copy receives a small local contrast cushion when a
 * collision is found by deckcraft-visual-safety-v1.js. */
.s24-fit .deckcraft-media-collision {
  z-index: 0 !important;
}

.s24-fit .deckcraft-media-collision ~ *,
.s24-fit .deckcraft-text-safe {
  position: relative;
  z-index: 2;
}

.s24-fit .deckcraft-text-safe {
  text-shadow: none;
}

.s24-fit .deckcraft-text-safe.deckcraft-text-safe-light {
  background: linear-gradient(90deg, rgb(255 255 255 / 94%), rgb(255 255 255 / 78%), transparent);
  border-radius: var(--s24-radius-small, 8px);
  padding: 8px 16px 8px 8px;
  text-shadow: none;
}

.s24-fit .deckcraft-text-safe.deckcraft-text-safe-dark {
  background: linear-gradient(90deg, rgb(30 30 30 / 88%), rgb(30 30 30 / 64%), transparent);
  border-radius: var(--s24-radius-small, 8px);
  padding: 8px 16px 8px 8px;
}

.s24-fit img[data-deckcraft-media-safety="ready"] {
  display: block;
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .deckcraft-logo-contrast-guard { filter: none; }
}
