/*
 * Box styles (tl_km_grid_box_style, GridBoxStyle): corners, shadow and glass of
 * content elements. The colors come from the color stylesheet of the theme
 * (km-bg-…, km-ink-…, km-border-…). Elements read --km-box-radius for their
 * own rounded parts, e.g. the position of badges.
 */
.km-box {
    border-radius: var(--km-box-radius, 0);
}

.km-box-radius-sm { --km-box-radius: .5rem; }
.km-box-radius-md { --km-box-radius: 1.5rem; }
.km-box-radius-lg { --km-box-radius: 3rem; }
.km-box-radius-xl { --km-box-radius: 6rem; }
.km-box-radius-round { --km-box-radius: 50%; }

/* Same values as the shadows of the navigation. As a variable, so elements can combine it with own shadows (e.g. the hover tint of the FAQ) */
.km-box-shadow-sm { --km-box-shadow: 0 .125rem .5rem rgb(0 0 0 / .1); }
.km-box-shadow-md { --km-box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .15); }
.km-box-shadow-lg { --km-box-shadow: 0 1rem 3rem rgb(0 0 0 / .2); }

[class*="km-box-shadow-"] {
    box-shadow: var(--km-box-shadow);
}

/*
 * Glass: only visible with a (semi-)transparent background color. An ancestor
 * with opacity < 1, filter, mask or clip-path would cut off the blur.
 */
.km-box-glass-4 { --km-box-glass: blur(4px); }
.km-box-glass-8 { --km-box-glass: blur(8px); }
.km-box-glass-12 { --km-box-glass: blur(12px); }
.km-box-glass-16 { --km-box-glass: blur(16px); }
.km-box-glass-24 { --km-box-glass: blur(24px); }

[class*="km-box-glass-"] {
    -webkit-backdrop-filter: var(--km-box-glass);
    backdrop-filter: var(--km-box-glass);

    @media (prefers-reduced-transparency: reduce) {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}
