/* WP Layout Blocks page templates. Widths/gutter come from CSS variables printed inline. */
body.wlb-tpl{overflow-x:clip}
.wlb-tpl-main{box-sizing:border-box;width:100%;margin-inline:auto;padding-inline:var(--wlb-tpl-gutter,24px);padding-block:2rem}
.wlb-tpl-main *,.wlb-tpl-main *::before,.wlb-tpl-main *::after{box-sizing:border-box}

/* Widths include the gutters. */
.wlb-tpl--full-width{max-width:none;padding-inline:0;padding-block:0}
.wlb-tpl--full-width-contained,.wlb-tpl--full-width-sidebar{max-width:var(--wlb-tpl-wide,1400px)}
.wlb-tpl--normal-width{max-width:var(--wlb-tpl-normal,1100px)}
.wlb-tpl--narrow-width{max-width:var(--wlb-tpl-narrow,720px)}

.wlb-tpl-head{margin-block-end:1.5rem}
.wlb-tpl--full-width .wlb-tpl-head{padding-inline:var(--wlb-tpl-gutter,24px);padding-block-start:2rem}
.wlb-tpl-head .wp-block-post-title,.wlb-tpl-head .entry-title{margin:0}
.wlb-tpl-content{min-width:0}

/* Let full-width blocks reach the screen edges even inside a contained column. */
.wlb-tpl-main:not(.wlb-tpl--full-width):not(.wlb-tpl--full-width-sidebar) .alignfull{width:100vw;max-width:100vw;margin-inline:calc(50% - 50vw)}
/* Beside a sidebar the column is the limit, so full-width means full column. */
.wlb-tpl--full-width-sidebar .alignfull{width:auto;max-width:none;margin-inline:0}

/* Sidebar layout. "start" puts the sidebar first in reading direction (flips in RTL). */
.wlb-tpl-grid{display:grid;grid-template-columns:minmax(0,1fr) var(--wlb-tpl-sidebar,320px);gap:var(--wlb-tpl-gutter,24px) calc(var(--wlb-tpl-gutter,24px) * 2);align-items:start}
body.wlb-tpl-side--start .wlb-tpl-grid{grid-template-columns:var(--wlb-tpl-sidebar,320px) minmax(0,1fr)}
body.wlb-tpl-side--start .wlb-tpl-side{order:-1}
.wlb-tpl-side{min-width:0}
.wlb-tpl-side > *+*,.wlb-tpl-side .widget+.widget{margin-block-start:1.5rem}
.wlb-tpl-side .widget-title,.wlb-tpl-side h2{font-size:1.125rem}
