/**
 * Dycode Magic Rings Background — Frontend Styles
 */

/* The injected canvas container: fills the parent element as an overlay */
.dycode-magic-rings-bg {
    position:       absolute;
    top:            0;
    left:           0;
    right:          0;
    bottom:         0;
    width:          100%;
    height:         100%;
    overflow:       hidden;
    pointer-events: none;  /* Pass all clicks through to the element's content */
    z-index:        0;
}

/* The WebGL canvas created by frontend.js */
.dycode-magic-rings-bg canvas {
    position:   absolute;
    top:        0;
    left:       0;
    width:      100%;
    height:     100%;
    display:    block;
}

/*
 * Ensure any Divi element that contains a Magic Rings canvas has
 * position:relative so the absolute overlay is scoped to it.
 * Divi sections, rows, and columns already have position:relative,
 * but module wrappers sometimes don't — this rule handles those cases.
 */
.et_pb_section:has( > .dycode-magic-rings-bg ),
.et_pb_row:has( > .dycode-magic-rings-bg ),
.et_pb_column:has( > .dycode-magic-rings-bg ),
[class*="et_pb_"]:has( > .dycode-magic-rings-bg ) {
    position: relative;
    overflow: hidden;
}
