/*
 * THEME ADAPTER: any block theme (Twenty Twenty-Five, pb-band-theme, ...).
 *
 * Selected by pbbp_adapter() whenever wp_is_block_theme() is true. A block theme lays the page out in a "constrained"
 * column, which would squeeze the full-width designs into the content width, and it draws its own title, header and
 * footer spacing. This file makes the designs full width again and lets the theme's header float over the hero.
 *
 * The designs know nothing about it. It only targets standard block-theme markup (.wp-site-blocks, header template part,
 * .wp-block-post-content, the Navigation block), not any one theme's class names.
 */

/* ---- full width inside the theme's constrained content column ---- */
.is-layout-constrained > .pbbp{width:auto;max-width:none;left:0;margin-left:0!important;margin-right:0!important}
/* the column has side padding: cancel it so the design reaches the screen edges */
.has-global-padding > .pbbp{margin-left:calc(var(--wp--style--root--padding-left,0px)*-1)!important;margin-right:calc(var(--wp--style--root--padding-right,0px)*-1)!important}

/* ---- hide the theme's own page furniture, and its spacing around the content ---- */
body.pbbp-page .wp-block-post-title,body.pbbp-page .wp-block-post-featured-image,
body:has(.pbbp) .wp-block-post-title,body:has(.pbbp) .wp-block-post-featured-image{display:none!important}
body.pbbp-page .wp-site-blocks>*,body:has(.pbbp) .wp-site-blocks>*{margin-block-start:0!important}
body.pbbp-page .wp-site-blocks>main>.wp-block-group,body:has(.pbbp) .wp-site-blocks>main>.wp-block-group{padding-top:0!important;padding-bottom:0!important}
body.pbbp-page .wp-site-blocks>main,body:has(.pbbp) .wp-site-blocks>main{padding-top:0!important;padding-bottom:0!important}
body.pbbp-page .wp-site-blocks>main .wp-block-post-content,body:has(.pbbp) .wp-site-blocks>main .wp-block-post-content{margin-block-start:0!important}

/* ---- template pages (body.pbbp-page): transparent header over the hero ---- */
body.pbbp-page{--pbbp-header-offset:70px;--pbbp-vh-off:0px}
body.admin-bar.pbbp-page{--pbbp-vh-off:32px}

body.pbbp-page header.wp-block-template-part{position:absolute;left:0;right:0;width:100%;z-index:999;background:transparent;transition:background-color .3s,box-shadow .3s}
/* light text over the photo (the hero is darkened in every colour mode) */
body.pbbp-page header.wp-block-template-part,
body.pbbp-page header.wp-block-template-part a:where(:not(.wp-element-button)),
body.pbbp-page header.wp-block-template-part .wp-block-navigation__responsive-container-open{color:#fff}

/* once scrolled, the header becomes a solid bar that stays in view (dark in both modes, so the white text always reads) */
body.pbbp-page.pbbp-scrolled header.wp-block-template-part{position:fixed;top:0;background:rgba(var(--pbbp-bar-rgb),.92);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
body.admin-bar.pbbp-page.pbbp-scrolled header.wp-block-template-part{top:32px}
@media (max-width:782px){body.admin-bar.pbbp-page.pbbp-scrolled header.wp-block-template-part{top:46px}}

/* the open mobile menu is a full-screen panel of its own: give it the band's page colours so its links stay readable */
body.pbbp-page .wp-block-navigation__responsive-container.is-menu-open{background-color:var(--pbbp-bg);color:var(--pbbp-heading)}
body.pbbp-page .wp-block-navigation__responsive-container.is-menu-open a{color:inherit}
