/**
 * Background Boxes Widget Styles
 */

.wml-background-boxes {
    --wml-grid-size: 80px;
    --wml-grid-color: #94a3b8;

    position: relative;
    width: 100%;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #0f172a;
}

/* CSS Grid pattern using background-image - always full coverage */
.wml-bb-grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    background-image:
        linear-gradient(to right, var(--wml-grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--wml-grid-color) 1px, transparent 1px);
    background-size: var(--wml-grid-size) var(--wml-grid-size);
    opacity: 0.4;
}

/* Interactive boxes container (JS generates hover boxes) */
.wml-bb-boxes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* Individual interactive box for hover effect */
.wml-bb-box {
    position: absolute;
    background: transparent;
    transition: background-color 0s;
}

.wml-bb-box:hover {
    z-index: 15;
}

/* Overlay with radial gradient mask - subtle fade at edges */
.wml-bb-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: inherit;
    z-index: 20;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 80% 80% at center, transparent 30%, rgba(0, 0, 0, 0.9) 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, transparent 30%, rgba(0, 0, 0, 0.9) 100%);
}

/* Content */
.wml-bb-content {
    position: relative;
    z-index: 30;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.wml-bb-heading {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.wml-bb-description {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: #d4d4d8;
    margin: 0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .wml-background-boxes {
        min-height: 300px;
    }

    .wml-bb-content {
        padding: 1.5rem;
    }
}