/* ============================================================================
   Layout reconciliation — plugin blocks vs. the Luna theme shell.
   ----------------------------------------------------------------------------
   Luna sets `useRootPaddingAwareAlignments: true` with a root left/right
   padding of `--wp--preset--spacing--medium`, and a 100% content size. Every
   nqc section is a full-bleed band that paints its own background edge to edge
   and manages its own inner gutter (--nqc-gutter), so the theme's root padding
   has to be neutralised for these blocks — otherwise each band is inset and the
   paper/navy grounds stop meeting the viewport edges.

   Kept in the plugin so it survives a theme update.
   ============================================================================ */

/* ---- full-bleed the nqc sections ------------------------------------------ */
.wp-site-blocks .nqc-block,
.entry-content .nqc-block,
.wp-block-post-content .nqc-block {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/*
   When the theme applies global padding to the content wrapper, pull the bands
   back out to the viewport edge. `has-global-padding` is core's own hook, so
   this stays correct if the padding value changes.
*/
.has-global-padding > .nqc-block,
.has-global-padding > .wp-block-post-content > .nqc-block {
	margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px));
	margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px));
}

/* Sections stack flush — the design has no gaps between bands. */
.wp-site-blocks .nqc-block + .nqc-block,
.entry-content .nqc-block + .nqc-block,
.wp-block-post-content .nqc-block + .nqc-block {
	margin-block-start: 0;
}

/* ---- Your Stay: the two overlapping bands ---------------------------------
   The comp is an absolutely positioned canvas, so its layers are free to
   overlap — and twice on this page they do. "Explore Your Stay" starts 3.02px
   before "Pick the Week" ends (your-stay.html L227 vs L267), and "What's
   Included" starts 2.98px before "Explore" ends (L267 vs L320). Both times the
   later, opaque band simply paints over the tail of the one above.

   Reproduced as a negative margin rather than by shortening the band above,
   which would leave both sections at the comp's stated height AND at the
   comp's stated top. .nqc-block is position: relative, so document order
   already decides which one paints on top.

   (0,3,0) so it outranks the flush-stacking reset above, whichever order
   WordPress prints the two stylesheets in.
   -------------------------------------------------------------------------- */
.wp-site-blocks .nqc-block.nqc-excards,
.wp-block-post-content .nqc-block.nqc-excards {
	margin-block-start: -3.02px;
}

.wp-site-blocks .nqc-block.nqc-incl,
.wp-block-post-content .nqc-block.nqc-incl {
	margin-block-start: -2.98px;
}

/* The theme's blockGap must not open seams between bands. */
.wp-block-post-content:has(> .nqc-block) {
	display: flow-root;
}

/* ---- the FAQ band ---------------------------------------------------------
   The design draws the FAQ as a paper band edge to edge (your-stay.html L477,
   `.fq` padding 60px 260px on --paper). polaris-faqs is a general-purpose
   plugin: its ranch style paints its ground only as wide as its own 920px
   measure, so between the quote photograph and the closing CTA the band would
   read as a 920px card rather than a section.

   Widened here rather than in that plugin, which has no business knowing about
   this site's bands. The measure is then re-applied to its children, which puts
   the list at the comp's 300px from the viewport edge either way:
   (1440 - 920) / 2 + 40 = 260 + 40, and 0 + (1440 - 840) / 2 = 300.
   -------------------------------------------------------------------------- */
.wp-site-blocks .polaris-faq.is-style-ranch,
.wp-block-post-content .polaris-faq.is-style-ranch,
.editor-styles-wrapper .polaris-faq.is-style-ranch {
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
	/*
	   The comp's own .fq box is 60px top and bottom (L478), but the paper does
	   not stop there: another 34.42px of page ground runs between it and the
	   closing CTA, whose top 84px is transparent over the same paper (L473,
	   L500). The visible paper run is therefore 797px, which is what this
	   bottom padding produces — and it is the single biggest thing standing
	   between the CTA and its position in the comp.
	*/
	padding-bottom: 93px;
}

.has-global-padding > .polaris-faq.is-style-ranch,
.has-global-padding > .wp-block-post-content > .polaris-faq.is-style-ranch {
	margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px));
	margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px));
}

/*
   The measure, plus a gutter — as MARGIN, not padding.

   The question list draws the rule above the first question as its own
   border-top, and a border spans the padding box. With the gutter set as
   padding that rule ran 24px past the questions on each side, so the list read
   as inset from its own line. Stating the gutter as width + auto margins keeps
   the border and the rows exactly the same width, which is what the comp draws:
   .fq-list is align-self: stretch inside .fq-in's 840px content box
   (lodging.html L325–327).

   The width has to be stated rather than left to max-width: the cap stops
   binding once the viewport is narrower than the measure, and this band's own
   padding was zeroed above so it could run full bleed.

   box-sizing must stay border-box. The theme declares `box-sizing: inherit` on
   `*`, so switching it here cascades into every descendant — and the FAQ
   question's `min-height: 75px` then stops counting its own 24px padding,
   making each row 123px and the band 322px too tall.
*/
.wp-site-blocks .polaris-faq.is-style-ranch > *,
.wp-block-post-content .polaris-faq.is-style-ranch > *,
.editor-styles-wrapper .polaris-faq.is-style-ranch > * {
	width: calc(100% - 2 * var(--nqc-gutter, 24px));
	max-width: 840px;
	margin-inline: auto;
	padding-inline: 0;
}

/* your-stay.html L802 draws the heading as a 68px box around its 56px line.
   Left at its own line height the band measured 12px short. */
.wp-site-blocks .polaris-faq.is-style-ranch .polaris-faq__heading,
.wp-block-post-content .polaris-faq.is-style-ranch .polaris-faq__heading,
.editor-styles-wrapper .polaris-faq.is-style-ranch .polaris-faq__heading {
	min-height: 68px;
}

/* The band sits flush against the sections above and below it. */
.wp-site-blocks .nqc-block + .polaris-faq,
.wp-site-blocks .polaris-faq + .nqc-block,
.wp-block-post-content .nqc-block + .polaris-faq,
.wp-block-post-content .polaris-faq + .nqc-block {
	margin-block-start: 0;
}

@media (max-width: 1000px) {
	.wp-site-blocks .polaris-faq.is-style-ranch > *,
	.wp-block-post-content .polaris-faq.is-style-ranch > *,
	.editor-styles-wrapper .polaris-faq.is-style-ranch > * {
		max-width: 100%;
	}

	/* The 93px shim above reconciles this band with the comp's 1440 canvas.
	   On a phone there is no canvas to reconcile with and it reads as a large
	   empty box under the last question. */
	.wp-site-blocks .polaris-faq.is-style-ranch,
	.wp-block-post-content .polaris-faq.is-style-ranch,
	.editor-styles-wrapper .polaris-faq.is-style-ranch {
		padding-bottom: 48px;
	}

	.wp-site-blocks .polaris-faq.is-style-ranch .polaris-faq__heading,
	.wp-block-post-content .polaris-faq.is-style-ranch .polaris-faq__heading,
	.editor-styles-wrapper .polaris-faq.is-style-ranch .polaris-faq__heading {
		min-height: 0;
	}
}

/* ---- header offset --------------------------------------------------------
   The mega menu renders a fixed header. The hero is designed to sit UNDER it
   (the comp's header overlays the hero at y=0), so no page offset is applied
   here — the menu's own transparent mode handles it.
   Inner pages, which have no hero, get their offset from the menu plugin.

   The theme does apply blockGap between .wp-site-blocks children, which pushed
   <main> — and therefore the whole page — 32px down, measured against the comp.
   The header is a fixed overlay and occupies no flow height, so that leading
   gap has nothing to separate and is removed.
   -------------------------------------------------------------------------- */
.wp-site-blocks > main:first-child,
.wp-site-blocks > main:first-of-type {
	margin-block-start: 0;
}

/* ---- editor ---------------------------------------------------------------
   Mirror the same full-bleed behaviour inside the block editor canvas so the
   editing experience matches the front end (Principle 5).
   -------------------------------------------------------------------------- */
.editor-styles-wrapper .wp-block[data-type^="nqc/"] {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

.editor-styles-wrapper .is-root-container > .wp-block[data-type^="nqc/"] {
	margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px));
	margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px));
}
