/* L'An 30 semantic-search structural layout — 0.11.6.
 * Component visuals remain owned by the MU-plugin.
 */

/* --------------------------------------------------------------
   Semantic-search layout slot — v0.11.6
   The MU-plugin owns the component visuals. The theme owns only its place
   in the document flow so the absolute/fixed header never has to be measured.
   -------------------------------------------------------------- */
.lan30-semantic-slot {
	position: relative;
	z-index: 4;
	flex: 0 0 auto;
	width: 100%;
}

/* Home: the slot lives after the hero, in normal document flow.
   The MU-plugin keeps full ownership of the search component visuals. */
.lan30-semantic-slot--home {
	background: var(--paper, #fff);
}

/* Internal editorial heroes already clear the header through their own top
   padding. The semantic slot is simply their first normal-flow child. */
.theme-hero > .lan30-semantic-slot,
.fiche-single__hero > .lan30-semantic-slot {
	align-self: stretch;
}


/* A semantic query is kept in the Fiche URL for return navigation, but
   result cards themselves belong only to the result view. Hide them on a
   single Fiche even before the JS cleanup runs, avoiding any visual flash. */
body.single-lan30_fiche .fiche-single__hero .topic-fiche-card {
	display: none !important;
}

/* Page/content shells are width-limited. Keep the slot inside that normal
   flow: the MU-plugin already sizes its own inner container. Expanding the
   slot to 100vw from a clipped .site-main would cut off both ends. */
.content-shell > .lan30-semantic-slot {
	width: 100%;
	margin-left: 0;
	margin-bottom: clamp(1.75rem, 3.5vw, 3rem);
}

/* Standard WordPress pages historically used a very generous top padding
   because their content had to clear the absolute header by itself. When the
   semantic bar is present it becomes the first layout element, so clear the
   expanded header once, then let the bar and the page content follow in flow. */
body.page:not(.lan30-front-page):not(.lan30-member-area) .page-shell.page-shell--semantic {
	padding-top: calc(165px + 1rem);
}

.page-shell--semantic > .lan30-semantic-slot {
	margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}

/* Generic post/archive/error shells historically had a smaller top offset than
   the Page templates. Guarantee enough flow space for the expanded header when
   the semantic search is present. */
.content-shell--semantic {
	padding-top: max(clamp(8rem, 12vw, 12rem), 185px);
}
body.admin-bar .content-shell--semantic {
	padding-top: max(clamp(8rem, 12vw, 12rem), 217px);
}

@media (max-width: 760px) {
	.content-shell > .lan30-semantic-slot {
		margin-bottom: 1.5rem;
	}
	body.page:not(.lan30-front-page):not(.lan30-member-area) .page-shell.page-shell--semantic {
		padding-top: calc(88px + 1rem);
	}
	.content-shell--semantic {
		padding-top: 108px;
	}
	body.admin-bar .content-shell--semantic {
		padding-top: 154px;
	}
}
