/**
 * Animotor — Frontend Styles
 */

.amtr-wrapper {
    position: relative;
    width: 100%;
    /* Click-through on live pages: SVG is decorative, underlying elements
       stay interactive. Bricks selects the wrapper via its own overlay
       system — it does not need pointer-events on the element itself.
       Replay buttons get pointer-events:auto restored by frontend.js. */
    pointer-events: none;
}

.amtr-svg-container {
    width: 100%;
    line-height: 0;
    pointer-events: none;
}

.amtr-svg-container svg {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* ── FOUC prevention ──────────────────────────────────────
   Hide SVG until initWrapper has set initial states.
   The amtr-ready class is added by frontend.js after
   createAnimations() runs (initial states applied).
   Static mode adds amtr-ready before setAllFinalStates,
   so this rule never fires in static mode. */
.amtr-wrapper:not(.amtr-ready) .amtr-svg-container {
    visibility: hidden;
}

/* Not here: "always visible in the builder" lives in frontend-builder.css (v3.475.0). As a
   `.brxe-animotor …` rule in this file it matched PUBLISHED Bricks widgets too (Bricks puts
   that class on them), so the guard above never ran on a Bricks page and a widget showed its
   final art until the footer runtime hid it — a visible flash on a hero. */

/* Placeholder shown in Bricks editor when no SVG is uploaded */
.amtr-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    color: #999;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fafafa;
    padding: 40px 20px;
    text-align: center;
}

/* ── Lazy-load placeholder — maintains aspect ratio via padding-bottom ── */
.amtr-lazy-placeholder {
    width: 100%;
    height: 0;
    overflow: hidden;
}

/* ── Static Mode (?static / #static URL param) ─────────── */
.amtr-static-mode .amtr-wrapper {
    opacity: 1 !important;
    visibility: visible !important;
}

/* F-3c — views mode interactive cue.
   The SVG and its container are pointer-events:none on the live frontend
   (decorative click-through, see .amtr-svg-container svg above), so the
   bound click/hover view-nav listeners never fire unless the trigger node
   re-enables hit-testing on itself — same pattern as replay buttons and
   .amtr-scrub-marker. A descendant with pointer-events:auto is hittable
   even though its ancestors are :none. Builder mode force-sets the whole
   SVG to pointer-events:all, which is why this only bit the frontend. */
.amtr-view-interactive {
    cursor: pointer;
    pointer-events: auto;
}
/* Nav-linked to the CURRENT view → drop the interactive cursor (hover goes nowhere
   new). pointer-events stays auto so the click still toggles to Main; the peek +
   IA hover fx are suppressed in JS (_amtrUpdateNavInert / .amtr-nav-inert checks). */
.amtr-view-interactive.amtr-nav-inert { cursor: default !important; }

/* While a committed view transition plays, the wrapper carries .amtr-nav-locked:
   click triggers go inert (pointer-events:none blocks clicks + drops the cursor) so a
   rapid sibling click can't kill/restart the in-flight transition. Hover-peek is
   geometry-based (not element pointer-events), so it stays responsive — clicks-only. */
.amtr-nav-locked .amtr-view-interactive { pointer-events: none !important; cursor: default !important; }

/* Builder-canvas-only rules (scrub markers, pose handles, snap guides, reset popover,
   view banner, eyedrop cursors, preview badge, colour flash, playback suppression, …)
   live in css/frontend-builder.css, enqueued only with the builder (animotor.php,
   bricks_is_builder()). Anything a published page can produce stays HERE. */
