/* Stable presentation for Canvas components and core block styles. */

:where(.smartcloud-canvas-component) {
	box-sizing: border-box;
	width: 100%;
}

:where(.smartcloud-canvas-section) {
	container-type: inline-size;
	padding-block: var(--wp--custom--section-padding, var(--wp--preset--spacing--70));
}

:where(.smartcloud-canvas-section--compact) {
	padding-block: var(--wp--preset--spacing--50);
}

:where(.smartcloud-canvas-component) :where(h1, h2, h3) {
	max-width: 100%;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
	text-wrap: balance;
}

:where(.smartcloud-canvas-component) :where(p, li) {
	text-wrap: pretty;
}

/* Gatey writes these variables on the document root after auth resolution. */
.gatey-account-authenticated,
.smartcloud-gatey-authenticated {
	display: var(--gatey-account-authenticated, var(--wpsuite-in-editor, none)) !important;
}

.gatey-account-not-authenticated,
.smartcloud-gatey-not-authenticated {
	display: var(--gatey-account-not-authenticated, var(--wpsuite-in-editor, none)) !important;
}

.smartcloud-starter-gatey-profile,
.smartcloud-starter-gatey-profile-sign-in {
	box-sizing: border-box;
	width: 100%;
	flex-direction: column;
}

.smartcloud-starter-gatey-header-auth,
.smartcloud-starter-gatey-header-signed-in,
.smartcloud-starter-gatey-header-signed-out {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20, 0.75rem);
	margin-block-start: 0;
}

.smartcloud-starter-gatey-header-auth {
	flex: 0 0 auto;
}

.smartcloud-starter-gatey-header-auth [smartcloud-gatey-account-attribute] {
	display: inline-block;
	width: auto;
}

.smartcloud-starter-gatey-header-auth :where(.wp-block-buttons, .wp-block-button, p) {
	margin-block: 0;
}

.smartcloud-starter-gatey-header-auth :where(a, .wp-block-button__link) {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--wp--preset--color--contrast);
	font-weight: 650;
	text-decoration: none;
	transition: color var(--smartcloud-canvas-transition);
}

.smartcloud-starter-gatey-header-auth :where(a, .wp-block-button__link):hover {
	background: transparent;
	box-shadow: none;
	color: var(--wp--preset--color--accent-1);
}

.smartcloud-starter-gatey-profile-header {
	width: 100%;
	margin-bottom: var(--wp--preset--spacing--40, 1.5rem);
}

.smartcloud-starter-gatey-profile-grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40, 1.5rem);
	align-items: stretch;
	width: 100%;
}

.smartcloud-starter-gatey-profile-grid > * {
	align-self: stretch;
	margin-block-start: 0 !important;
}

.smartcloud-starter-gatey-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: var(--wp--custom--card-padding, clamp(1.1rem, 1.5vw, 1.5rem));
	border: 1px solid var(--wp--preset--color--border, #cbd5e1);
	border-radius: var(--wp--custom--radius--md, 16px);
	background: var(--wp--preset--color--surface, #fff);
}

.smartcloud-starter-gatey-card > .wp-block-heading,
.smartcloud-starter-gatey-card > .wp-block-separator {
	width: 100%;
}

.smartcloud-starter-gatey-card > .wp-block-separator {
	margin-block: 0 var(--wp--preset--spacing--30, 1rem);
	border-color: var(--wp--preset--color--border, #cbd5e1);
}

.smartcloud-starter-gatey-card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
}

.smartcloud-starter-gatey-attribute-row {
	display: grid !important;
	grid-template-columns: minmax(8rem, 0.45fr) minmax(0, 1fr);
	gap: var(--wp--preset--spacing--20, 0.75rem);
	align-items: baseline;
	width: 100%;
}

.smartcloud-starter-gatey-attribute-label {
	font-weight: 650;
}

.smartcloud-starter-gatey-attribute-value,
.smartcloud-starter-gatey-attribute-value > *,
.smartcloud-starter-gatey-attribute-value [smartcloud-gatey-account-attribute] {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
}

.smartcloud-starter-gatey-mfa-enabled {
	display: var(--gatey-account-mfa-enabled, var(--wpsuite-in-editor, none)) !important;
}

.smartcloud-starter-gatey-mfa-not-enabled {
	display: var(--gatey-account-mfa-not-enabled, var(--wpsuite-in-editor, none)) !important;
}

.smartcloud-starter-gatey-mfa-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20, 0.75rem);
	width: 100%;
}

/* Content-owned H1 patterns suppress a surrounding template-owned duplicate. */
:where(main):has(.wp-block-post-content h1.smartcloud-canvas-slot--heading) > .wp-block-post-title {
	display: none;
}

:where(.smartcloud-canvas-slot--eyebrow) {
	margin-block-end: var(--wp--preset--spacing--20) !important;
	color: var(--wp--preset--color--accent-1);
	font-size: var(--wp--preset--font-size--xs) !important;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

:where(.smartcloud-canvas-slot--lead) {
	max-width: 48rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--lg) !important;
}

:where(.smartcloud-canvas-slot--media) {
	overflow: hidden;
	min-height: clamp(14rem, 34vw, 28rem);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--lg);
	background: linear-gradient(145deg, var(--wp--preset--color--surface-alt), var(--wp--preset--color--surface));
}

:where(.smartcloud-canvas-slot--media img) {
	display: block;
	width: 100%;
	height: 100%;
	min-height: inherit;
	object-fit: cover;
}

:where(.smartcloud-canvas-grid) {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--wp--custom--grid-minimum, 15rem)), 1fr));
	gap: var(--wp--preset--spacing--30);
}

:where(.smartcloud-canvas-grid > .wp-block-column) {
	min-width: 0;
}

/* Generic presentation contract for server-rendered related-record blocks. */
:where(.smartcloud-canvas-related-records) {
	container-type: inline-size;
	padding-block: var(--wp--preset--spacing--50);
}

:where(.smartcloud-canvas-related-records__heading) {
	margin-block: 0 var(--wp--preset--spacing--30);
}

:where(.smartcloud-canvas-related-records__items) {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: var(--wp--preset--spacing--30);
}

:where(.smartcloud-canvas-related-records__item) {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-width: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--subtle);
}

:where(.smartcloud-canvas-related-records__media img) {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

:where(.smartcloud-canvas-related-records__body) {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--custom--card-padding, var(--wp--preset--spacing--40));
}

:where(.smartcloud-canvas-related-records__title, .smartcloud-canvas-related-records__excerpt) {
	margin-block: 0;
}

:where(.smartcloud-canvas-related-records__title a, .smartcloud-canvas-related-records__cta) {
	color: inherit;
}

:where(.smartcloud-canvas-related-records__cta) {
	margin-block-start: auto;
	font-weight: 700;
}

:where(.smartcloud-canvas-related-records--compact-list .smartcloud-canvas-related-records__items) {
	display: grid;
	grid-template-columns: 1fr;
}

:where(.smartcloud-canvas-related-records--compact-list .smartcloud-canvas-related-records__item) {
	display: grid;
	grid-template-columns: minmax(7rem, 12rem) 1fr;
}

@container (width <= 32rem) {
	:where(.smartcloud-canvas-related-records--compact-list .smartcloud-canvas-related-records__item) {
		grid-template-columns: 1fr;
	}
}

/* Profile actions deliberately use equal columns instead of auto-fit sizing. */
.smartcloud-starter-gatey-actions {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: start;
}

.smartcloud-starter-gatey-action,
.smartcloud-starter-gatey-action > *,
.smartcloud-starter-gatey-action [smartcloud-gatey-authenticator] {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	max-width: none;
}

.smartcloud-starter-gatey-action [smartcloud-gatey-authenticator] {
	display: block;
}

.smartcloud-starter-gatey-card > .smartcloud-starter-gatey-action,
.smartcloud-starter-gatey-card-body > .smartcloud-starter-gatey-action,
.smartcloud-starter-gatey-mfa-actions > .smartcloud-starter-gatey-action {
	width: 100%;
	max-width: 16.25rem;
}

.smartcloud-starter-gatey-sign-in-rail,
.smartcloud-starter-gatey-sign-in-rail > *,
.smartcloud-starter-gatey-sign-in-rail [smartcloud-gatey-authenticator] {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wp--custom--gatey-auth-width, 36rem);
}

.smartcloud-starter-gatey-sign-in-rail {
	margin-inline: auto;
}

.smartcloud-starter-gatey-sign-in-rail [smartcloud-gatey-authenticator] {
	display: block;
}

:where(.smartcloud-canvas-split) {
	align-items: center !important;
}

:where(.smartcloud-canvas-split > .wp-block-column) {
	min-width: 0;
}

.smartcloud-canvas-surface--card,
.is-style-smartcloud-canvas-card {
	height: 100%;
	min-width: 0;
	padding: var(--wp--custom--card-padding, var(--wp--preset--spacing--40));
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--subtle);
}

:where(.is-style-smartcloud-canvas-soft-surface) {
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--surface-alt);
}

:where(body) .wp-block-button.is-style-smartcloud-canvas-primary > .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

:where(body) .wp-block-button.is-style-smartcloud-canvas-secondary > .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--contrast);
	background: transparent;
	color: var(--wp--preset--color--contrast);
}

:where(.wp-block-button .wp-block-button__link) {
	transition: background-color var(--smartcloud-canvas-transition), border-color var(--smartcloud-canvas-transition), color var(--smartcloud-canvas-transition), box-shadow var(--smartcloud-canvas-transition);
}

:where(.wp-block-button .wp-block-button__link:hover) {
	box-shadow: var(--wp--preset--shadow--raised);
}

:where(body) .wp-block-button.is-style-smartcloud-canvas-primary > .wp-block-button__link:hover,
:where(body) .wp-block-button.is-style-smartcloud-canvas-secondary > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--accent-1);
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
}

:where(.is-style-smartcloud-canvas-featured-quote) {
	padding: var(--wp--preset--spacing--50);
	border: 0;
	border-inline-start: 5px solid var(--wp--preset--color--accent-1);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface-alt);
}

:where(.is-style-smartcloud-canvas-comparison) {
	overflow-x: auto;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
}

:where(.is-style-smartcloud-canvas-comparison table) {
	min-width: 40rem;
	border-collapse: collapse;
}

:where(.is-style-smartcloud-canvas-comparison th) {
	background: var(--wp--preset--color--surface-alt);
}

:where(.is-style-smartcloud-canvas-comparison th, .is-style-smartcloud-canvas-comparison td) {
	padding: var(--wp--preset--spacing--30);
	border-color: var(--wp--preset--color--border);
}

:where(.is-style-smartcloud-canvas-faq) {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface);
}

:where(.is-style-smartcloud-canvas-faq summary) {
	cursor: pointer;
	font-weight: 700;
}

:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-minimal, .smartcloud-canvas-component--header-centered) {
	padding-block: var(--wp--preset--spacing--30);
}

:where(.smartcloud-canvas-component--header-standard) > .wp-block-group.alignwide {
	flex-wrap: nowrap !important;
	gap: var(--wp--preset--spacing--30);
}

:where(.smartcloud-canvas-component--header-standard) > .wp-block-group.alignwide > .wp-block-navigation {
	margin-inline-start: auto;
}

/*
 * Starter-managed account navigation is deliberately a sibling of the
 * importer-owned header row. Keep that ownership boundary while presenting
 * both groups as one navigation row on larger screens.
 */
@media (width >= 782px) {
	:where(.smartcloud-canvas-component--header-standard) {
		box-sizing: border-box;
		display: flex !important;
		flex-wrap: nowrap;
		align-items: center;
		gap: var(--wp--preset--spacing--30, 1rem);
		padding-inline: max(
			var(--wp--preset--spacing--30, 1rem),
			calc((100% - var(--wp--style--global--wide-size, 80rem)) / 2)
		) !important;
	}

	:where(.smartcloud-canvas-component--header-standard) > .wp-block-group.alignwide {
		flex: 1 1 auto;
		width: auto !important;
		max-width: none !important;
		margin-inline: 0 !important;
	}

	:where(.smartcloud-canvas-component--header-standard) > .smartcloud-starter-gatey-header-auth {
		position: static;
		flex: 0 0 auto;
		width: auto;
		max-width: none;
		margin-inline: 0 !important;
	}
}

:where(.smartcloud-canvas-component--header-sticky) {
	position: sticky;
	top: 0;
	z-index: 100;
	border-block-end: 1px solid var(--wp--preset--color--border);
	background: color-mix(in srgb, var(--wp--preset--color--base) 94%, transparent);
	backdrop-filter: blur(16px);
}

body.admin-bar :where(.smartcloud-canvas-component--header-sticky) {
	top: 32px;
}

:where(.smartcloud-canvas-component--hero-product, .smartcloud-canvas-component--hero-service, .smartcloud-canvas-component--hero-split-media, .smartcloud-canvas-component--hero-editorial, .smartcloud-canvas-component--hero-centered-landing) {
	padding-block: var(--wp--preset--spacing--80);
}

:where(.smartcloud-canvas-component--hero-centered-landing) {
	text-align: center;
}

:where(.smartcloud-canvas-component--hero-centered-landing .smartcloud-canvas-slot--lead) {
	margin-inline: auto;
}

:where(.smartcloud-canvas-component--metrics-three-values .smartcloud-canvas-slot--item) strong {
	display: block;
	color: var(--wp--preset--color--accent-1);
	font-size: var(--wp--preset--font-size--3-xl);
}

:where(.smartcloud-canvas-component--process-numbered-steps) {
	counter-reset: smartcloud-canvas-step;
}

:where(.smartcloud-canvas-component--process-numbered-steps .smartcloud-canvas-slot--item) {
	counter-increment: smartcloud-canvas-step;
}

:where(.smartcloud-canvas-component--process-numbered-steps .smartcloud-canvas-slot--item)::before {
	content: counter(smartcloud-canvas-step, decimal-leading-zero);
	display: inline-grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	margin-block-end: var(--wp--preset--spacing--20);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
	font-weight: 700;
}

:where(.smartcloud-canvas-component--cta-primary-band) {
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--gradient--brand-wash);
}

:where(.smartcloud-canvas-component--footer-standard-columns, .smartcloud-canvas-component--footer-minimal) {
	border-block-start: 1px solid var(--wp--preset--color--border);
}

@container (width <= 52rem) {
	:where(.smartcloud-canvas-split) {
		display: grid !important;
		grid-template-columns: 1fr;
	}
}

@container (width <= 34rem) {
	:where(.smartcloud-canvas-grid) {
		grid-template-columns: 1fr;
	}

	.smartcloud-canvas-surface--card,
	.is-style-smartcloud-canvas-card {
		padding: var(--wp--preset--spacing--30);
	}
}

@media (width <= 781px) {
	body.admin-bar :where(.smartcloud-canvas-component--header-sticky) {
		top: 46px;
	}

	:where(.smartcloud-canvas-section) {
		padding-block: clamp(1.75rem, 6vw, 2.75rem);
	}

	:where(.smartcloud-canvas-component--hero-product, .smartcloud-canvas-component--hero-service, .smartcloud-canvas-component--hero-split-media, .smartcloud-canvas-component--hero-editorial, .smartcloud-canvas-component--hero-centered-landing) {
		padding-block: var(--wp--preset--spacing--60);
	}

	.smartcloud-starter-gatey-profile-grid {
		grid-template-columns: 1fr;
	}

	.smartcloud-starter-gatey-attribute-row {
		grid-template-columns: 1fr;
	}

	.smartcloud-starter-gatey-actions {
		grid-template-columns: 1fr;
	}

	.smartcloud-starter-gatey-card > .smartcloud-starter-gatey-action,
	.smartcloud-starter-gatey-card-body > .smartcloud-starter-gatey-action,
	.smartcloud-starter-gatey-mfa-actions > .smartcloud-starter-gatey-action {
		max-width: none;
	}
}

@media (width <= 781px) {
	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal) > .wp-block-group.alignwide {
		gap: var(--wp--preset--spacing--20, 0.75rem);
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal) .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal) .wp-block-navigation__responsive-container-open {
		display: flex !important;
	}

	/* backdrop-filter otherwise makes Core's fixed menu header-sized. */
	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal):has(.wp-block-navigation__responsive-container.is-menu-open) {
		backdrop-filter: none;
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal) .wp-block-navigation__responsive-container.is-menu-open {
		position: fixed;
		inset: 0;
		box-sizing: border-box;
		width: 100vw;
		max-width: none;
		height: 100vh;
		height: 100dvh;
		max-height: none;
		padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
		background: var(--wp--preset--color--base);
		color: var(--wp--preset--color--contrast);
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal) .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		box-sizing: border-box;
		align-items: stretch;
		width: 100%;
		padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
		padding-top: 2.75rem;
		padding-bottom: 7rem;
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal) .wp-block-navigation__responsive-container.is-menu-open :where(.wp-block-navigation__container, .wp-block-navigation-item) {
		align-items: stretch;
		width: 100%;
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal) .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		gap: 0;
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal) .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		display: block;
		box-sizing: border-box;
		width: 100%;
		padding-block: 0.7rem;
		color: var(--wp--preset--color--contrast);
		text-align: start;
		text-decoration: none;
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal) .smartcloud-starter-gatey-header-auth {
		position: absolute;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal):has(.wp-block-navigation__responsive-container.is-menu-open) .smartcloud-starter-gatey-header-auth {
		position: fixed;
		right: max(1rem, env(safe-area-inset-right));
		bottom: max(1rem, env(safe-area-inset-bottom));
		left: max(1rem, env(safe-area-inset-left));
		z-index: 100001;
		box-sizing: border-box;
		width: auto;
		padding-block-start: 1rem;
		border-block-start: 1px solid var(--wp--preset--color--border);
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	:where(.smartcloud-canvas-component--header-standard, .smartcloud-canvas-component--header-centered, .smartcloud-canvas-component--header-minimal):has(.wp-block-navigation__responsive-container.is-menu-open) .smartcloud-starter-gatey-header-auth :where(.smartcloud-starter-gatey-header-signed-in, .smartcloud-starter-gatey-header-signed-out) {
		width: 100%;
		justify-content: flex-start;
	}
}
