/**
 * Site shell, containers, sections and page layouts.
 */

.emt-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

/* The header is fixed; reserve its full (unscrolled) height so shrinking never shifts content. */
.emt-site--has-header {
	padding-top: var(--emt-header-height);
}

/* Front page: the header overlays the first section. */
.emt-has-transparent-header .emt-site--has-header {
	padding-top: 0;
}

.emt-site-content {
	flex: 1 0 auto;
}

/* Containers */
.emt-container {
	width: 100%;
	max-width: calc(var(--emt-container) + (var(--emt-gutter) * 2));
	margin-inline: auto;
	padding-inline: var(--emt-gutter);
}

.emt-container--narrow {
	max-width: calc(var(--emt-container-narrow) + (var(--emt-gutter) * 2));
}

.emt-container--wide {
	max-width: calc(var(--emt-container-wide) + (var(--emt-gutter) * 2));
}

/* Sections (for theme-built public pages; never applied to plugin markup automatically) */
.emt-section {
	padding-block: var(--emt-section-spacing);
}

.emt-section--compact {
	padding-block: calc(var(--emt-section-spacing) * 0.6);
}

.emt-section--cream {
	background-color: var(--emt-cream);
}

.emt-section--soft {
	background-color: var(--emt-soft-bg);
}

.emt-section--light {
	background-color: var(--emt-light-bg);
}

.emt-section--cream,
.emt-section--soft,
.emt-section--light {
	--emt-text: var(--emt-text-strong);
	color: var(--emt-text);
}

/* Default (non-builder) pages */
.emt-main--default {
	padding-block: var(--emt-section-spacing);
}

/* Builder, full-width, marketing and app pages: no theme spacing around content */
.emt-main--builder,
.emt-main--full,
.emt-main--marketing,
.emt-main--app {
	padding: 0;
}

.emt-entry__header {
	margin-bottom: 1.75rem;
}

.emt-entry__title {
	font-size: var(--emt-fs-2xl);
}

/* Readable defaults for plain content; zero specificity so shortcodes keep their own styles */
.emt-prose :where(p, ul, ol) {
	margin-bottom: 1em;
}

.emt-prose :where(h2, h3, h4) {
	margin-top: 1.5em;
}

.emt-prose :where(.alignwide) {
	max-width: var(--emt-container-wide);
}

.emt-prose :where(.alignfull) {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
}

.emt-page-links {
	margin-top: 2rem;
}

/* Archive listings */
.emt-archive-header {
	margin-bottom: 2rem;
}

.emt-posts {
	display: grid;
	gap: 2.5rem;
}

.emt-entry__thumbnail img {
	display: block;
	border-radius: var(--emt-radius-md);
}

/* Auth shell */
.emt-auth-shell {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - var(--emt-header-height) - var(--wp-admin--admin-bar--height, 0px));
	padding: var(--emt-section-spacing) var(--emt-gutter);
	background-color: var(--emt-cream);
}

.emt-auth-shell__inner {
	width: 100%;
	max-width: 560px;
}

/* App shell */
.emt-site--app {
	background-color: var(--emt-light-bg);
}

.emt-app-header {
	background: var(--emt-white);
	border-bottom: 1px solid var(--emt-border-cool);
}

.emt-app-header__inner {
	display: flex;
	align-items: center;
	min-height: var(--emt-header-height-scrolled);
	padding-inline: var(--emt-gutter);
}

.emt-app-header .custom-logo {
	width: var(--emt-logo-width-scrolled);
	max-height: var(--emt-logo-max-height);
	height: auto;
	object-fit: contain;
}

/* 404 */
.emt-404 {
	text-align: center;
}

.emt-404__code {
	margin-bottom: 0.25rem;
	font-family: var(--emt-font-heading);
	font-size: var(--emt-fs-3xl);
	font-weight: var(--emt-fw-bold);
	line-height: var(--emt-lh-tight);
	color: var(--emt-primary);
}

.emt-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	margin-top: 1.5rem;
}
