/* =========================
   ROOT WRAPPER
========================= */

.imw-svg-splash {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;

    /* default alignment baseline */
    justify-content: center;
    align-items: center;

    opacity: 1;
}

/* =========================
   ALIGNMENT (FIXED - WORKS RELIABLY)
   Elementor adds class to SAME element
========================= */

.imw-svg-splash.imw-align-left {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.imw-svg-splash.imw-align-center {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.imw-svg-splash.imw-align-right {
    justify-content: flex-end;
    align-items: flex-end;
    text-align: right;
}

/* =========================
   SVG
========================= */

.imw-svg-splash svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: visible;
    will-change: transform, filter;
}

/* =========================
   PATH STYLING
========================= */

.imw-svg-splash svg path {
    stroke: var(--stroke-color);
    stroke-width: var(--stroke-width);
    fill: none;

    stroke-linecap: round;
    stroke-linejoin: round;

    vector-effect: non-scaling-stroke;
}

/* =========================
   READY STATE (JS CONTROLLED)
========================= */

.imw-svg-splash {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.imw-svg-splash.imw-ready {
    opacity: 1;
}

/* =========================
   SHADOW (ROBUST)
========================= */

.imw-svg-splash.has-shadow {
    filter: drop-shadow(
        var(--shadow-x, 0px)
        var(--shadow-y, 10px)
        var(--shadow-blur, 20px)
        var(--shadow-color, rgba(0,0,0,0.4))
    );

    transition: filter var(--shadow-duration, 1200ms) ease;
}

/* =========================
   OPTIONAL: SVG initial safety (prevents flash)
========================= */

.imw-svg-splash:not(.imw-ready) svg path {
    fill: none;
}
