/**
 * Theme Name: Just My Website
 * Theme URI: https://justmywebsite.com
 * Description: Just My Website by Jones E Designs. A Blocksy child theme: section backgrounds reach the page edge, preview pages stay out of search, and Max's site guide lives in the dashboard.
 * Author: Jones E Designs
 * Author URI: https://jonesedesigns.com
 * Template: blocksy
 * Version: 1.0.0
 * Requires at least: 6.4
 * Requires PHP: 7.4
 * Text Domain: just-my-website
 */

/* ---- Full-width section backgrounds ---------------------------------------------------------------
 * A top-level block on a page or post that has a background colour, gradient or image (Group, Cover,
 * Columns, Media & Text) stretches its background to both edges of the screen. Its content stays at the
 * normal content width, so text never runs edge to edge. Add the class "jmw-contained" to a block to keep
 * it inside the content width instead.
 */
html, body { overflow-x: clip; }

.entry-content > .has-background:not(.jmw-contained),
.entry-content > .wp-block-cover:not(.jmw-contained),
.entry-content > .alignfull:not(.jmw-contained) {
  /* Blocksy's content column: the block max width, or its edge spacing (90% of the screen) if narrower. */
  --jmw-content: min(var(--theme-block-max-width, 1290px), var(--theme-container-width-base, 90vw));
  --jmw-gutter: max(var(--theme-content-spacing, 20px), 20px);
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(var(--jmw-gutter), calc((100vw - var(--jmw-content)) / 2));
  padding-right: max(var(--jmw-gutter), calc((100vw - var(--jmw-content)) / 2));
  border-radius: 0;
}

/* Cover blocks keep their own inner layout; just let the inner container use the content width. */
.entry-content > .wp-block-cover:not(.jmw-contained) > .wp-block-cover__inner-container {
  max-width: var(--jmw-content);
  margin-left: auto;
  margin-right: auto;
}

/* Back-to-back coloured sections touch, with no white strip between them. */
.entry-content > :is(.has-background, .wp-block-cover):not(.jmw-contained):has(+ :is(.has-background, .wp-block-cover):not(.jmw-contained)) {
  margin-bottom: 0;
  margin-block-end: 0;
}
.entry-content > :is(.has-background, .wp-block-cover):not(.jmw-contained) + :is(.has-background, .wp-block-cover):not(.jmw-contained) {
  margin-top: 0;
  margin-block-start: 0;
}
