/*
Theme Name: HASMaster
Text Domain: hasmaster
Version: 0.1.1
Requires at least: 6.6
Requires PHP: 8.1
Author: HASMaster
*/

:root {
	--hasmaster-interactive-radius: 12px;
	--hasmaster-interactive-radius-tight: 8px;
	--hasmaster-interactive-hover-border: var(--wp--preset--color--accent);
	--hasmaster-interactive-hover-text: var(--wp--preset--color--accent);
	--hasmaster-interactive-hover-background: var(--wp--preset--color--base);
	--hasmaster-interactive-active-border: color-mix(in srgb, var(--wp--preset--color--accent) 28%, var(--wp--preset--color--border));
	--hasmaster-interactive-active-background: var(--wp--preset--color--accent-soft);
	--hasmaster-interactive-active-text: var(--wp--preset--color--accent);
}

/* Device single page - left align all content within constrained layout */
.single-device .wp-block-group.is-layout-constrained > *:not(.alignwide):not(.alignfull) {
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* Ensure post-content inner blocks also left-align */
.single-device .wp-block-post-content.is-layout-constrained > *:not(.alignwide):not(.alignfull) {
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* Breadcrumbs and footer meta alignment */
.hasmaster-device-breadcrumbs,
.hasmaster-device-footer-meta {
	width: 100%;
	max-width: var(--wp--style--global--content-size, 650px);
}

.hasmaster-guide-breadcrumbs,
.hasmaster-guide-footer-meta {
	width: 100%;
	max-width: var(--wp--style--global--content-size, 650px);
}

/* Guide single: prevent featured thumbnail from centering */
.single-guides .hasmaster-guide-thumb,
.single-guides .hasmaster-guide-thumb img {
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* Ensure use-case post-content inner blocks left-align within the wide shell */
.single-use_case .hasmaster-use-case-single-shell .wp-block-post-content.is-layout-constrained > *:not(.alignwide):not(.alignfull) {
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* Keep use-case metadata row aligned to content width */
.single-use_case .hasmaster-use-case-single-shell .hasmaster-use-case-updated {
	width: 100%;
	max-width: var(--wp--style--global--content-size, 650px);
}

/* Post single page alignment: match header/logo left edge via alignwide shell */
.single-post .hasmaster-post-single-main.is-layout-constrained > .hasmaster-post-single-shell.alignwide {
	margin-left: auto !important;
	margin-right: auto !important;
}

.single-post .hasmaster-post-single-shell > *:not(.alignwide):not(.alignfull) {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.single-post .hasmaster-post-single-shell .wp-block-post-content.is-layout-constrained > *:not(.alignwide):not(.alignfull) {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.single-post .hasmaster-post-single-shell .wp-block-post-title {
	margin-left: 0 !important;
}

.single-post .hasmaster-post-single-shell .wp-block-post-content.is-layout-constrained > .hasmaster-labs-overview {
	max-width: var(--wp--style--global--wide-size, 1340px);
}

/* Theme default page shell: align fallback template content with header/logo left edge */
.hasmaster-page-shell.alignwide {
	margin-left: auto !important;
	margin-right: auto !important;
}

.hasmaster-page-shell > *:not(.alignwide):not(.alignfull) {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.hasmaster-page-shell .wp-block-post-content.is-layout-constrained > *:not(.alignwide):not(.alignfull) {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.hasmaster-household-panel {
	margin: 0 0 1.5rem;
	padding: 1rem 1.125rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--surface);
}

.hasmaster-household-panel__label,
.hasmaster-household-panel__meta,
.hasmaster-household-panel__notice {
	margin: 0 0 0.65rem;
}

.hasmaster-household-panel__meta:last-child,
.hasmaster-household-panel__notice:last-child {
	margin-bottom: 0;
}

.hasmaster-household-panel__form {
	margin: 0;
}

.hasmaster-household-inline-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 0.9rem 0 0;
	font-size: 0.92rem;
}

.hasmaster-household-inline-actions__status {
	font-weight: 600;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-household-inline-actions__form {
	margin: 0;
}

.hasmaster-household-inline-actions__button {
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--hasmaster-interactive-radius);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font: inherit;
	cursor: pointer;
}

.hasmaster-household-inline-actions__button:hover {
	border-color: var(--hasmaster-interactive-hover-border);
	background: var(--hasmaster-interactive-hover-background);
	color: var(--hasmaster-interactive-hover-text);
}

.hasmaster-household-panel__button.wp-element-button,
.hasmaster-household-panel__button {
	padding: 0.5rem 1.1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--hasmaster-interactive-radius);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font: inherit;
	cursor: pointer;
}

.hasmaster-household-panel__button.wp-element-button:hover,
.hasmaster-household-panel__button:hover {
	border-color: var(--hasmaster-interactive-hover-border);
	background: var(--hasmaster-interactive-hover-background);
	color: var(--hasmaster-interactive-hover-text);
}

.hasmaster-search-scope {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.7rem;
	margin: 0.8rem 0 1.25rem;
}

.hasmaster-search-scope__label {
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-search-scope__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	padding: 0.35rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--hasmaster-interactive-radius);
	text-decoration: none;
	color: var(--wp--preset--color--text);
}

.hasmaster-search-scope__link:hover {
	border-color: var(--hasmaster-interactive-hover-border);
	background: var(--hasmaster-interactive-hover-background);
	color: var(--hasmaster-interactive-hover-text);
}

.hasmaster-search-scope__link.is-active {
	border-color: var(--hasmaster-interactive-active-border);
	background: var(--hasmaster-interactive-active-background);
	color: var(--hasmaster-interactive-active-text);
}

.search .wp-block-search,
.error404 .wp-block-search {
	margin: 1.5rem 0 2rem;
}

.search .wp-block-search__inside-wrapper,
.error404 .wp-block-search__inside-wrapper {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
}

.search .wp-block-search__input,
.error404 .wp-block-search__input {
	min-height: 3.35rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	font-size: 1.05rem;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--text);
}

.search .wp-block-search__input:focus,
.error404 .wp-block-search__input:focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--accent);
}

.search .wp-block-search__button,
.error404 .wp-block-search__button {
	position: relative;
	width: 64px;
	min-width: 64px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--text);
	border-radius: 8px;
	background: var(--wp--preset--color--text);
	color: transparent;
	cursor: pointer;
	transition: all 0.15s ease;
}

.search .wp-block-search__button::before,
.error404 .wp-block-search__button::before {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	width: 20px;
	height: 20px;
	transform: translate(-50%, -50%);
	background: center / 20px 20px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='white' stroke-width='2'/%3E%3Cpath d='M20 20L16.65 16.65' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.search .wp-block-search__button:hover,
.search .wp-block-search__button:focus,
.error404 .wp-block-search__button:hover,
.error404 .wp-block-search__button:focus {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

.hasmaster-header-actions {
	gap: 1rem;
}

.hasmaster-account-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--hasmaster-interactive-radius);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 600;
}

.hasmaster-account-link:hover {
	border-color: var(--hasmaster-interactive-hover-border);
	background: var(--hasmaster-interactive-active-background);
	color: var(--hasmaster-interactive-hover-text);
}

.hasmaster-account-workspace {
	display: grid;
	gap: 1.4rem;
}

.hasmaster-account-workspace__hero,
.hasmaster-account-workspace__panel,
.hasmaster-account-workspace__notice {
	padding: 1.35rem 1.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1rem;
	background: var(--wp--preset--color--surface);
}

.hasmaster-account-workspace__hero {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
}

.hasmaster-account-workspace__hero h1,
.hasmaster-account-workspace__panel h2,
.hasmaster-account-workspace__panel h3 {
	margin-top: 0;
}

.hasmaster-account-workspace__hero-actions,
.hasmaster-account-workspace__quicklinks,
.hasmaster-account-workspace__stats,
.hasmaster-account-workspace__member-actions,
.hasmaster-account-workspace__journey-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.hasmaster-account-workspace__pill,
.hasmaster-account-workspace__text-link,
.hasmaster-account-workspace__quicklinks a,
.hasmaster-account-workspace__control,
.hasmaster-account-workspace__form button,
.hasmaster-account-workspace__journey-actions button,
.hasmaster-account-workspace__member-actions button,
.hasmaster-account-workspace__member-actions select {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.25rem;
	padding: 0.5rem 0.8rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--hasmaster-interactive-radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--text);
	text-decoration: none;
	font: inherit;
	appearance: none;
}

.hasmaster-account-workspace__pill:hover,
.hasmaster-account-workspace__text-link:hover,
.hasmaster-account-workspace__quicklinks a:hover,
.hasmaster-account-workspace__control:hover,
.hasmaster-account-workspace__form button:hover,
.hasmaster-account-workspace__journey-actions button:hover,
.hasmaster-account-workspace__member-actions button:hover,
.hasmaster-account-workspace__member-actions select:hover {
	border-color: var(--hasmaster-interactive-hover-border);
	background: var(--hasmaster-interactive-hover-background);
	color: var(--hasmaster-interactive-hover-text);
}

.hasmaster-account-workspace__pill.is-active {
	border-color: var(--hasmaster-interactive-active-border);
	background: var(--hasmaster-interactive-active-background);
	color: var(--hasmaster-interactive-active-text);
	font-weight: 700;
}

.hasmaster-account-workspace__notice {
	font-weight: 600;
}

.hasmaster-account-workspace__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.4rem;
}

.hasmaster-account-workspace__grid--compact {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hasmaster-account-workspace__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: 0.9rem 1rem;
	margin: 0;
}

.hasmaster-account-workspace__facts div {
	padding: 0.85rem;
	border-radius: 0.85rem;
	background: var(--wp--preset--color--base);
}

.hasmaster-account-workspace__facts dt {
	margin: 0 0 0.35rem;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-account-workspace__facts dd {
	margin: 0;
	font-weight: 600;
}

.hasmaster-account-workspace__stat {
	display: grid;
	gap: 0.2rem;
	min-width: 8.5rem;
	padding: 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.9rem;
	background: var(--wp--preset--color--base);
	text-decoration: none;
	color: inherit;
}

.hasmaster-account-workspace__stat-count {
	font-size: 1.5rem;
	font-weight: 700;
}

.hasmaster-account-workspace__section-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.hasmaster-account-workspace__invite {
	display: grid;
	gap: 0.2rem;
	padding: 0.9rem 1rem;
	border-radius: 0.9rem;
	background: var(--wp--preset--color--base);
}

.hasmaster-account-workspace__invite span,
.hasmaster-account-workspace__meta,
.hasmaster-account-workspace__member-meta {
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-account-workspace__form {
	display: grid;
	gap: 0.75rem;
	padding: 1.1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.9rem;
	background: var(--wp--preset--color--base);
}

.hasmaster-account-workspace__form input,
.hasmaster-account-workspace__form select {
	width: 100%;
	min-height: 2.5rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--surface);
	font: inherit;
}

.hasmaster-account-workspace__form button,
.hasmaster-account-workspace__member-actions button,
.hasmaster-account-workspace__journey-actions button {
	cursor: pointer;
}

.hasmaster-account-workspace__form button {
	justify-self: start;
}

.hasmaster-account-workspace__members {
	display: grid;
	gap: 0.9rem;
}

.hasmaster-account-workspace__member-card,
.hasmaster-account-workspace__journey-card {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.9rem;
	background: var(--wp--preset--color--base);
}

.hasmaster-account-workspace__journey-card h4,
.hasmaster-account-workspace__member-card h3 {
	margin: 0 0 0.35rem;
}

.hasmaster-account-workspace__journey-card p,
.hasmaster-account-workspace__member-card p {
	margin: 0.2rem 0;
}

.hasmaster-account-workspace__empty {
	margin: 0;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-account-workspace .is-danger {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/* Support section */
.hasmaster-account-workspace__panel--support {
	background: color-mix(in srgb, var(--wp--preset--color--accent-soft) 55%, var(--wp--preset--color--surface));
}

.hasmaster-account-workspace__support-body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin-top: 0.5rem;
}

.hasmaster-account-workspace__support-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.65rem 1.4rem;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: var(--hasmaster-interactive-radius);
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.hasmaster-account-workspace__support-btn:hover {
	opacity: 0.85;
	color: #fff;
}

/* Get HASMaster — product grid */
.hasmaster-account-workspace__products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 0.5rem;
}

.hasmaster-account-workspace__product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1rem;
	background: var(--wp--preset--color--base);
}

.hasmaster-account-workspace__product-card.is-featured {
	border-color: var(--hasmaster-interactive-active-border);
	background: var(--wp--preset--color--accent-soft);
}

.hasmaster-account-workspace__product-badge {
	display: inline-block;
	align-self: flex-start;
	padding: 0.2rem 0.65rem;
	border-radius: 2rem;
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hasmaster-account-workspace__product-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
}

.hasmaster-account-workspace__product-header h3 {
	margin: 0;
}

.hasmaster-account-workspace__product-price {
	font-size: 1.35rem;
	font-weight: 700;
	white-space: nowrap;
	color: var(--wp--preset--color--accent);
}

.hasmaster-account-workspace__product-desc {
	margin: 0;
	font-size: 0.9rem;
	color: var(--wp--preset--color--text-muted);
	flex-grow: 1;
}

.hasmaster-account-workspace__product-features {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.35rem;
	font-size: 0.875rem;
}

.hasmaster-account-workspace__product-features li::before {
	content: "\2713\00a0";
	color: var(--wp--preset--color--accent);
	font-weight: 700;
}

.hasmaster-account-workspace__product-btn {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	padding: 0.6rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--hasmaster-interactive-radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--text);
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	margin-top: auto;
}

.hasmaster-account-workspace__product-btn:hover {
	border-color: var(--hasmaster-interactive-hover-border);
	background: var(--hasmaster-interactive-hover-background);
	color: var(--hasmaster-interactive-hover-text);
}

.hasmaster-account-workspace__product-btn.is-primary {
	border-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent);
	color: #fff;
}

.hasmaster-account-workspace__product-btn.is-primary:hover {
	opacity: 0.85;
	color: #fff;
}

.hasmaster-account-workspace__product-btn.is-muted {
	border-color: var(--wp--preset--color--border);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text-muted);
	cursor: default;
}

@media (max-width: 782px) {
	.hasmaster-account-workspace__grid,
	.hasmaster-account-workspace__grid--compact,
	.hasmaster-account-workspace__facts,
	.hasmaster-account-workspace__products {
		grid-template-columns: 1fr;
	}

	.hasmaster-account-link span {
		display: none;
	}
}

/* Journeys progress component */
.hasmaster-journey-progress {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--surface);
}

.hasmaster-journey-progress__title {
	margin: 0 0 0.75rem;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-journey-progress__list {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hasmaster-journey-progress__item {
	position: relative;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--hasmaster-interactive-radius);
	background: var(--wp--preset--color--base);
	min-height: 2.4rem;
	overflow: visible;
}

.hasmaster-journey-progress__item a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 2.4rem;
	padding: 0.35rem 0.7rem;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	color: var(--wp--preset--color--text);
}

.hasmaster-journey-progress__item.is-done {
	border-color: var(--wp--preset--color--border);
	background: var(--wp--preset--color--surface);
}

.hasmaster-journey-progress__item.is-current {
	border-color: var(--hasmaster-interactive-active-border);
	background: var(--hasmaster-interactive-active-background);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent);
}

.hasmaster-journey-progress__item.is-current a {
	color: var(--hasmaster-interactive-active-text);
}

/* Arrow cues indicate the recommended sequence direction. */
.hasmaster-journey-progress__item:not(:last-child)::after {
	content: "→";
	position: absolute;
	right: -0.5rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--wp--preset--color--accent);
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1;
	pointer-events: none;
	z-index: 2;
}

/* AI nudge cards for taxonomy landing pages */
.hasmaster-journey-nudges {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.hasmaster-journey-nudges__title {
	margin: 0 0 0.5rem;
}

.hasmaster-journey-nudges__intro {
	margin: 0 0 1rem;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-journey-nudges__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.hasmaster-journey-nudges__card {
	padding: 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--surface);
}

.hasmaster-journey-nudges__card h3 {
	margin-top: 0;
	margin-bottom: 0.6rem;
	font-size: 1rem;
}

.hasmaster-journey-nudges__card pre {
	white-space: pre-wrap;
	word-break: break-word;
	margin: 0 0 0.75rem;
	padding: 0.6rem 0.7rem;
	border-radius: 0.5rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	font-size: 0.85rem;
	line-height: 1.45;
}

.hasmaster-journey-nudges__card p {
	margin: 0;
}

@media (max-width: 960px) {
	.hasmaster-journey-progress__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hasmaster-journey-progress__item::after {
		display: none;
	}

	.hasmaster-journey-nudges__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.hasmaster-journey-progress__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Header/Footer global spacing + typography tweaks */

/* Footer: move spacing outside the footer (between content and border), remove top padding above footer text. */
.wp-site-blocks > footer.wp-block-template-part > .wp-block-group.alignfull {
	margin-top: var(--wp--preset--spacing--30) !important;
	padding-top: 0 !important;
}

/* Header: align nav text to bottom edge of the logo and remove bold styling in the top navigation. */
.wp-site-blocks > header.wp-block-template-part .wp-block-group.alignwide.is-layout-flex {
	align-items: flex-end !important;
}

.wp-site-blocks > header.wp-block-template-part .hasmaster-header-row.wp-block-group.is-layout-flex {
	align-items: flex-end !important;
}

/* Keep the logo's box tight (avoid inline-image baseline gaps). */
.wp-site-blocks > header.wp-block-template-part .header-site-logo img {
	display: block;
	height: auto;
}

/* Desktop: use grid so the nav sits on the bottom edge of the logo reliably. */
@media (min-width: 1025px) {
	.wp-site-blocks > header.wp-block-template-part .wp-block-group.alignwide.is-layout-flex.wp-block-group-is-layout-flex {
		display: grid !important;
		grid-template-columns: max-content minmax(0, 1fr);
		align-items: end !important;
		column-gap: var(--wp--style--block-gap, 1.25rem);
	}

	.wp-site-blocks > header.wp-block-template-part .wp-block-group.alignwide.is-layout-flex.wp-block-group-is-layout-flex > .wp-block-group {
		align-self: end;
	}

	.wp-site-blocks > header.wp-block-template-part .hasmaster-header-actions {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: flex-end !important;
		justify-content: flex-end;
		gap: 0.75rem;
		min-width: 0;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav {
		justify-self: end;
		align-self: end !important;
		min-width: 0;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__container {
		flex-wrap: nowrap !important;
		white-space: nowrap;
		gap: 0.85rem !important;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation-item__content {
		font-size: 1rem;
	}

	.wp-site-blocks > header.wp-block-template-part .hasmaster-account-link {
		flex: 0 0 auto;
		white-space: nowrap;
	}
}

.wp-site-blocks > header.wp-block-template-part nav.header-main-nav,
.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__container {
	align-items: flex-end !important;
}

.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation-item:first-child {
	display: none;
}

.wp-site-blocks > header.wp-block-template-part nav.header-main-nav {
	align-self: flex-end !important;
	margin-top: auto;
}

.wp-site-blocks > header.wp-block-template-part nav.header-main-nav,
.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation-item__content,
.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation-item__label {
	font-weight: 400;
}

/* Desktop: align the visual baselines (logo vs nav text). */
@media (min-width: 1025px) {
	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation-item__label {
		line-height: 1.1;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav {
		padding-bottom: 3px;
	}
}

@media (min-width: 1025px) and (max-width: 1220px) {
	.wp-site-blocks > header.wp-block-template-part .hasmaster-account-link {
		width: 2.35rem;
		height: 2.35rem;
	}
}

/* Mobile/tablet: force overlay menu at a larger breakpoint (avoid horizontal scrolling nav items). */
@media (max-width: 1024px) {
	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__responsive-container-open {
		display: flex !important;
		align-items: center;
		gap: 0.5rem;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__responsive-container-open::after {
		content: "Menu";
		font-size: 0.95rem;
	}

	/* Always collapse into hamburger on mobile/tablet, even if the Navigation block is configured to stay expanded. */
	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}

	/* Safety: some WP versions can output a direct UL (outside the overlay container). */
	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav > ul.wp-block-navigation__container {
		display: none !important;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__responsive-container.is-menu-open {
		display: flex !important;
		position: fixed !important;
		inset: 0 !important;
		background: var(--wp--preset--color--base);
		color: var(--wp--preset--color--text);
	}

	/* Make the overlay fill the screen and use an obvious, touch-friendly vertical list. */
	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__responsive-dialog {
		height: 100%;
		width: 100%;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__responsive-container-content {
		width: 100%;
		padding: 1rem;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__container {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: stretch !important;
		justify-content: stretch !important;
		gap: 0.25rem 0.75rem !important;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation-item__content {
		display: block;
		padding: 0.65rem 0.25rem;
		font-size: 1rem;
	}

	.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation-item {
		border-bottom: 0;
	}

	@media (max-width: 520px) {
		.wp-site-blocks > header.wp-block-template-part nav.header-main-nav .wp-block-navigation__container {
			grid-template-columns: 1fr;
			gap: 0.25rem !important;
		}
	}
}

/* Video Source thumbnail card */
.hasmaster-video-source-card {
	margin-top: 0.75rem;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
	border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--surface);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.hasmaster-video-source-card:hover {
	transform: translateY(-1px);
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.10);
}

.hasmaster-video-source-thumb {
	margin: 0;
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
	border: 0;
	background: transparent;
}

.hasmaster-video-source-thumb a {
	display: block;
	position: relative;
	color: inherit;
	text-decoration: none;
}

.hasmaster-video-source-thumb a::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05) 45%, rgba(0, 0, 0, 0.0) 70%);
	opacity: 0.85;
	pointer-events: none;
	transition: opacity 160ms ease, transform 160ms ease;
}

.hasmaster-video-source-thumb a::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 58px;
	height: 58px;
	border-radius: 999px;
	background: rgba(139, 0, 0, 0.92);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23ffffff' d='M8 5v14l11-7z'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 22px 22px;
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

.hasmaster-video-source-thumb a::before,
.hasmaster-video-source-thumb a::after {
	will-change: opacity, transform;
}

.hasmaster-video-source-thumb a:hover::after {
	opacity: 1;
}

.hasmaster-video-source-thumb img {
	display: block;
	width: 100%;
	height: auto;
	transform: scale(1);
	transition: transform 220ms ease;
}

.hasmaster-video-source-thumb a:hover img {
	transform: scale(1.02);
}

.hasmaster-video-source-thumb figcaption {
	padding: 0.85rem 1rem 1rem;
	color: var(--wp--preset--color--text-muted);
	font-size: 0.95rem;
	line-height: 1.45;
}

/* Template caption (when using a paragraph instead of figcaption). */
.hasmaster-video-source-card > p {
	margin: 0;
	padding: 0.85rem 1rem 1rem;
	color: var(--wp--preset--color--text-muted);
	font-size: 0.95rem;
	line-height: 1.45;
}

/* ======================================================
   DARK MODE — OS preference (prefers-color-scheme: dark)
   Overrides --wp--preset--color--* variables so every
   component that references them flips automatically.
   ====================================================== */
@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;

		/* Backgrounds */
		--wp--preset--color--base:        #0f0f0f;
		--wp--preset--color--surface:     #1a1a1a;
		--wp--preset--color--surface-alt: #242424;

		/* Borders */
		--wp--preset--color--border:      #2d2d2d;

		/* Text */
		--wp--preset--color--text:        #e8e8e8;
		--wp--preset--color--text-muted:  #9a9a9a;
		--wp--preset--color--text-subtle: #6b6b6b;

		/* Accent — brightened for readable contrast on dark backgrounds */
		--wp--preset--color--accent:       #cc3333;
		--wp--preset--color--accent-soft:  #2a0f0f;
		--wp--preset--color--accent-hover: #e05555;

		/* Success */
		--wp--preset--color--success:      #34d373;
		--wp--preset--color--success-soft: #0a1f0f;
	}

	/* Native form inputs — pull background from surface so they don't stay white */
	input,
	select,
	textarea {
		background-color: var(--wp--preset--color--surface);
		color: var(--wp--preset--color--text);
		border-color: var(--wp--preset--color--border);
	}

	/* Navigation — override any hardcoded colors stored in the block editor DB */
	.wp-block-navigation,
	.wp-block-navigation .wp-block-navigation-item__content,
	.wp-block-navigation a.wp-block-navigation-item__content,
	.wp-block-navigation .wp-block-navigation-item__label {
		color: var(--wp--preset--color--text) !important;
	}

	.wp-block-navigation .wp-block-navigation-item__content:hover,
	.wp-block-navigation a.wp-block-navigation-item__content:hover {
		color: var(--wp--preset--color--accent) !important;
	}
}

/* ==========================================================================
   Pricing Page — [hasmaster_pricing]
   ========================================================================== */

.hasmaster-pricing {
	display: grid;
	gap: 1.75rem;
}

/* Hero */
.hasmaster-pricing__hero {
	padding: 2.5rem 2rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1rem;
	background: var(--wp--preset--color--surface);
	text-align: center;
}

.hasmaster-pricing__hero h1 {
	margin: 0 0 0.75rem;
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	line-height: 1.2;
}

.hasmaster-pricing__hero > p {
	max-width: 52rem;
	margin: 0 auto 1.25rem;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-pricing__trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.85rem;
	color: var(--wp--preset--color--text-muted);
}

/* Tier cards */
.hasmaster-pricing__tiers {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	align-items: start;
}

.hasmaster-pricing__tier {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1rem;
	background: var(--wp--preset--color--surface);
}

.hasmaster-pricing__tier.is-featured {
	border-color: var(--hasmaster-interactive-active-border);
	background: var(--wp--preset--color--accent-soft);
	box-shadow: 0 4px 20px color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent);
}

.hasmaster-pricing__tier-badge {
	display: inline-block;
	align-self: flex-start;
	padding: 0.2rem 0.7rem;
	border-radius: 2rem;
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.hasmaster-pricing__tier-header h2 {
	margin: 0 0 0.4rem;
	font-size: 1.2rem;
}

.hasmaster-pricing__tier-price {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
}

.hasmaster-pricing__tier-amount {
	font-size: 2rem;
	font-weight: 700;
	color: var(--wp--preset--color--accent);
	line-height: 1;
}

.hasmaster-pricing__tier-period {
	font-size: 0.85rem;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-pricing__tier-desc {
	margin: 0;
	font-size: 0.9rem;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-pricing__tier-features {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.4rem;
	font-size: 0.875rem;
	flex-grow: 1;
}

.hasmaster-pricing__tier-features li::before {
	content: "\2713\00a0";
	color: var(--wp--preset--color--accent);
	font-weight: 700;
}

.hasmaster-pricing__tier-btn {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0.7rem 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--hasmaster-interactive-radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--text);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	margin-top: auto;
}

.hasmaster-pricing__tier-btn:hover {
	border-color: var(--hasmaster-interactive-hover-border);
	background: var(--hasmaster-interactive-hover-background);
	color: var(--hasmaster-interactive-hover-text);
}

.hasmaster-pricing__tier-btn.is-primary {
	border-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent);
	color: #fff;
}

.hasmaster-pricing__tier-btn.is-primary:hover {
	opacity: 0.87;
	color: #fff;
}

.hasmaster-pricing__tier-btn.is-muted {
	border-color: var(--wp--preset--color--border);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text-muted);
	cursor: default;
}

.hasmaster-pricing__tier-footnote {
	margin: 0;
	font-size: 0.8rem;
	text-align: center;
	color: var(--wp--preset--color--text-muted);
}

/* Shared panel */
.hasmaster-pricing__panel {
	padding: 1.75rem 2rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1rem;
	background: var(--wp--preset--color--surface);
}

.hasmaster-pricing__panel h2 {
	margin-top: 0;
}

.hasmaster-pricing__panel--ai {
	background: color-mix(in srgb, var(--wp--preset--color--accent-soft) 45%, var(--wp--preset--color--surface));
}

.hasmaster-pricing__panel--support-note {
	border-color: var(--wp--preset--color--border);
	background: var(--wp--preset--color--base);
}

/* Upgrade path */
.hasmaster-pricing__upgrades {
	display: grid;
	grid-template-columns: 1fr auto 1fr auto 1fr;
	gap: 1rem;
	align-items: center;
}

.hasmaster-pricing__upgrade-step {
	padding: 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.85rem;
	background: var(--wp--preset--color--base);
}

.hasmaster-pricing__upgrade-step h3 {
	margin: 0 0 0.5rem;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
}

.hasmaster-pricing__upgrade-step p {
	margin: 0;
	font-size: 0.9rem;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-pricing__upgrade-price {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--wp--preset--color--accent);
}

.hasmaster-pricing__upgrade-arrow {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--wp--preset--color--text-muted);
	text-align: center;
	white-space: nowrap;
}

/* AI panel split */
.hasmaster-pricing__panel-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

.hasmaster-pricing__ai-stages {
	display: grid;
	gap: 0.75rem;
}

.hasmaster-pricing__ai-stages h3 {
	margin: 0 0 0.5rem;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-pricing__stage {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.hasmaster-pricing__stage-num {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
}

.hasmaster-pricing__stage strong {
	display: block;
	font-size: 0.875rem;
}

.hasmaster-pricing__stage p {
	margin: 0.1rem 0 0;
	font-size: 0.8rem;
	color: var(--wp--preset--color--text-muted);
}

/* Comparison table */
.hasmaster-pricing__table-wrap {
	overflow-x: auto;
}

.hasmaster-pricing__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.hasmaster-pricing__table thead th {
	padding: 0.75rem 1rem;
	border-bottom: 2px solid var(--wp--preset--color--border);
	text-align: center;
	font-weight: 700;
}

.hasmaster-pricing__table thead th:first-child {
	text-align: left;
}

.hasmaster-pricing__table thead th span {
	display: block;
	font-size: 0.95rem;
	color: var(--wp--preset--color--accent);
	font-weight: 700;
}

.hasmaster-pricing__table td {
	padding: 0.55rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.hasmaster-pricing__table-group td {
	padding: 0.9rem 1rem 0.4rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--text-muted);
	border-bottom: none;
}

.hasmaster-pricing__table-cell {
	text-align: center;
}

.hasmaster-pricing__table .is-yes {
	color: var(--wp--preset--color--accent);
	font-weight: 700;
	font-size: 1rem;
}

.hasmaster-pricing__table .is-no {
	color: var(--wp--preset--color--text-subtle);
}

/* FAQ */
.hasmaster-pricing__faq {
	display: grid;
	gap: 0.5rem;
}

.hasmaster-pricing__faq-item {
	padding: 1rem 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--base);
}

.hasmaster-pricing__faq-item summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
}

.hasmaster-pricing__faq-item summary::-webkit-details-marker {
	display: none;
}

.hasmaster-pricing__faq-item summary::after {
	content: " +";
	color: var(--wp--preset--color--accent);
}

.hasmaster-pricing__faq-item[open] summary::after {
	content: " \2212";
}

.hasmaster-pricing__faq-item p {
	margin: 0.75rem 0 0;
	color: var(--wp--preset--color--text-muted);
	font-size: 0.9rem;
}

/* Bottom CTA */
.hasmaster-pricing__cta {
	padding: 2.5rem 2rem;
	border: 1px solid var(--hasmaster-interactive-active-border);
	border-radius: 1rem;
	background: var(--wp--preset--color--accent-soft);
	text-align: center;
}

.hasmaster-pricing__cta h2 {
	margin: 0 0 0.5rem;
}

.hasmaster-pricing__cta > p {
	margin: 0 0 1.5rem;
	color: var(--wp--preset--color--text-muted);
}

.hasmaster-pricing__cta-btns {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

.hasmaster-pricing__cta-footnote {
	margin: 1.25rem 0 0;
	font-size: 0.85rem;
	color: var(--wp--preset--color--text-muted);
}

/* Pricing page responsive */
@media (max-width: 960px) {
	.hasmaster-pricing__tiers {
		grid-template-columns: 1fr;
	}

	.hasmaster-pricing__upgrades {
		grid-template-columns: 1fr;
	}

	.hasmaster-pricing__upgrade-arrow {
		text-align: left;
		padding-left: 1.25rem;
	}

	.hasmaster-pricing__panel-split {
		grid-template-columns: 1fr;
	}
}
