/*
 * Documentation, Support and Wholesale in the modern storefront language.
 *
 * The pages keep their own blocks and wording in the database; this sheet
 * sets them on the same tokens, eyebrows, section indexes, cards and buttons
 * as the homepage and catalog (modern-storefront.css, loaded first). Every
 * rule is scoped to .oe-modern-page, and the legacy .oe-content-page rules in
 * style.css no longer match these templates.
 */

/* ── Frame ─────────────────────────────────────────────────────────── */

.oe-modern-page .page-hero {
	padding-block: 72px 30px;
}

.oe-modern-page .page-title {
	max-width: 16ch;
	margin: 26px 0 0;
	color: var(--navy);
	font-size: clamp(40px, 4.5vw, 65px);
	font-weight: 600;
	letter-spacing: -2.6px;
	line-height: 1.07;
	text-wrap: balance;
}

/*
 * The body is an editorial grid: each section heading sits in the left
 * column beside its text. Whatever comes before the first heading introduces
 * the page and spans both columns.
 */
.oe-modern-page .page-content {
	display: grid;
	grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
	column-gap: 64px;
	align-items: start;
	margin-top: 0;
	padding-bottom: 96px;
	color: #3a4c61;
	font-size: 16px;
	line-height: 1.65;
	counter-reset: oe-section;
}

.oe-modern-page .page-content > * {
	grid-column: 2;
	max-width: 720px;
	margin: 18px 0 0;
}

.oe-modern-page .page-content > :not(h2):not(h2 ~ *) {
	grid-column: 1 / -1;
	max-width: none;
}

.oe-modern-page .page-content > :first-child {
	max-width: 660px;
	margin-top: 0;
	color: #4d5f73;
	font-size: 19px;
	letter-spacing: -0.1px;
	line-height: 1.55;
}

.oe-modern-page .page-content > h2,
.oe-modern-page .page-content > h2 + * {
	margin-top: 60px !important;
	padding-top: 32px;
	border-top: 1px solid var(--line);
}

.oe-modern-page .page-content > h2 {
	grid-column: 1;
	max-width: none;
	color: var(--navy);
	font-size: clamp(24px, 2vw, 30px);
	font-weight: 600;
	letter-spacing: -0.8px;
	line-height: 1.15;
	scroll-margin-top: 110px;
	counter-increment: oe-section;
}

.oe-modern-page .page-content > h2::before {
	content: counter(oe-section, decimal-leading-zero);
	display: block;
	width: max-content;
	margin-bottom: 16px;
	padding: 1px 5px;
	border: 1px solid #c8dced;
	border-radius: 4px;
	color: #278eea;
	font: 10px/1.6 var(--mono);
	letter-spacing: 0;
}

.oe-modern-page .page-content p a,
.oe-modern-page .page-note a {
	color: var(--blue);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.oe-modern-page .page-content p a:hover,
.oe-modern-page .page-note a:hover {
	color: var(--navy);
}

/* ── Documentation index ───────────────────────────────────────────── */

.oe-modern-page .page-content .oe-document-nav {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	margin-top: 40px;
	padding: 0;
	overflow: hidden;
	background: var(--line);
	border: 1px solid var(--line);
	border-radius: 13px;
	counter-reset: oe-document-nav;
}

.oe-modern-page .page-content .oe-document-nav p {
	margin: 0;
	background: #fff;
	counter-increment: oe-document-nav;
}

.oe-modern-page .page-content .oe-document-nav a {
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: 100%;
	padding: 18px 20px 20px;
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}

.oe-modern-page .page-content .oe-document-nav a::before {
	content: counter(oe-document-nav, decimal-leading-zero);
	color: #278eea;
	font: 10px var(--mono);
	letter-spacing: 1.2px;
}

.oe-modern-page .page-content .oe-document-nav a:hover {
	background: #f5f9fd;
	color: var(--blue);
}

/* ── Dispatch locations ────────────────────────────────────────────── */

.oe-modern-page .page-content .wp-block-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 26px !important;
}

.oe-modern-page .page-content .wp-block-column {
	min-width: 0;
	margin: 0;
}

.oe-modern-page .page-content .oe-route {
	height: 100%;
	margin: 0;
	padding: 22px 22px 24px !important;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 13px;
	text-align: left;
}

/* A location marker, in the same frame as the support guide's icons. */
.oe-modern-page .page-content .oe-route::before {
	content: "";
	display: block;
	width: 36px;
	height: 36px;
	margin-bottom: 16px;
	border: 1px solid #d7e3ef;
	border-radius: 7px;
	background: #eff6fd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233984c6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.6-6.5-11.2a6.5 6.5 0 0 1 13 0C18.5 15.4 12 21 12 21Z'/%3E%3Ccircle cx='12' cy='9.8' r='2.3'/%3E%3C/svg%3E") center / 19px no-repeat;
}

.oe-modern-page .page-content .oe-route > * {
	max-width: none !important;
	margin-inline: 0 !important;
}

.oe-modern-page .page-content .oe-route :is(h2, h3) {
	margin: 0;
	color: var(--navy);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.3px;
	line-height: 1.2;
	text-align: left;
}

.oe-modern-page .page-content .oe-route p {
	margin-top: 8px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
	text-align: left;
}

/* ── Lists of what to send ─────────────────────────────────────────── */

.oe-modern-page .oe-support-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: oe-item;
}

.oe-modern-page .oe-support-list li {
	display: grid;
	align-content: start;
	gap: 6px;
	padding: 18px 20px 20px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 13px;
	counter-increment: oe-item;
}

.oe-modern-page .page-content .oe-support-list li:last-child:nth-child(odd) {
	grid-column: 1 / -1;
}

.oe-modern-page .oe-support-list li::before {
	content: counter(oe-item, decimal-leading-zero);
	margin-bottom: 6px;
	color: #278eea;
	font: 10px var(--mono);
	letter-spacing: 1.2px;
}

.oe-modern-page .oe-support-list strong {
	color: var(--navy);
	font-size: 15px;
	font-weight: 600;
}

.oe-modern-page .oe-support-list span {
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.oe-modern-page .page-content .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 13px;
	margin-top: 32px;
}

.oe-modern-page .wp-block-button__link,
.oe-modern-page .oe-contact-email {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-height: 48px;
	margin: 0;
	padding: 13px 20px;
	border: 1px solid var(--blue);
	border-radius: 7px;
	background: var(--blue);
	box-shadow: 0 5px 15px #0073ed14;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.oe-modern-page .wp-block-button__link::after,
.oe-modern-page .oe-contact-email::after {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.oe-modern-page .wp-block-button__link:hover,
.oe-modern-page .oe-contact-email:hover {
	border-color: #0065d4;
	background: #0065d4;
	box-shadow: 0 6px 20px #0073ed35;
	color: #fff;
	transform: translateY(-2px);
}

.oe-modern-page .is-style-outline .wp-block-button__link {
	border-color: #cbd6e1;
	background: transparent;
	box-shadow: none;
	color: var(--ink);
}

.oe-modern-page .is-style-outline .wp-block-button__link:hover {
	border-color: #90a8be;
	background: #fff;
	color: var(--ink);
}

/* ── Support guide ─────────────────────────────────────────────────── */

.oe-modern-page .oe-support-guide {
	margin: 0 auto;
	padding-block: 60px 96px;
	border-top: 1px solid var(--line);
}

.oe-modern-page .oe-support-guide .section-heading {
	margin-bottom: 30px;
}

.oe-modern-page .oe-support-guide .oe-support-list {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0;
}

.oe-modern-page .oe-support-guide .oe-support-list li {
	padding: 22px 22px 24px;
}

.oe-modern-page .oe-support-guide .oe-support-list li::before {
	content: none;
}

.oe-modern-page .oe-support-guide .guide-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-bottom: 14px;
	border: 1px solid #d7e3ef;
	border-radius: 7px;
	background: #eff6fd;
	color: #3984c6;
}

.oe-modern-page .oe-support-guide .guide-icon .icon {
	width: 19px;
	height: 19px;
}

/* ── Contact band ──────────────────────────────────────────────────── */

.oe-modern-page .contact-band {
	position: relative;
	overflow: hidden;
	padding-block: 66px 72px;
	background: #061a31;
	color: #edf4ff;
}

.oe-modern-page .contact-band-inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px 56px;
}

.oe-modern-page .contact-band .eyebrow {
	color: #809fbd;
}

.oe-modern-page .contact-band h2 {
	color: #fff;
}

.oe-modern-page .contact-band-text {
	max-width: 560px;
	margin-top: 14px !important;
	color: #89a0b9;
	font-size: 15px;
	line-height: 1.6;
}

.oe-modern-page .contact-band-inner > p {
	flex: none;
	margin: 0;
}

.oe-modern-page .contact-band .oe-contact-email:hover {
	border-color: #fff;
	background: #fff;
	color: var(--navy);
}

/* ── Wholesale inquiry form ────────────────────────────────────────── */

.oe-modern-page .contact-band-form {
	flex: 0 1 640px;
	max-width: 640px;
	width: 100%;
}

.oe-modern-page .contact-band-alt {
	margin: 16px 0 0;
	color: #89a0b9;
	font-size: 13px;
	line-height: 1.6;
}

.oe-modern-page .contact-band-alt a {
	color: #a6c2dc;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.oe-modern-page .contact-band-alt a:hover {
	color: #fff;
}

.oe-modern-page .oe-inquiry-success {
	margin: 0;
	padding: 16px 18px;
	border: 1px solid #2e5f45;
	border-radius: 7px;
	background: #0d2c1e;
	color: #b9e8cc;
	font-size: 14px;
	line-height: 1.6;
}

.oe-modern-page .oe-inquiry-notice {
	margin-bottom: 20px;
	padding: 14px 18px;
	border: 1px solid #7a3038;
	border-radius: 7px;
	background: #33161b;
	color: #ffc9c9;
	font-size: 13px;
	line-height: 1.6;
}

.oe-modern-page .oe-inquiry-notice ul {
	margin: 6px 0 0;
	padding-left: 18px;
}

.oe-modern-page .oe-inquiry-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 16px;
	margin: 0;
}

.oe-modern-page .oe-inq-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
}

.oe-modern-page .oe-inq-field--full {
	grid-column: 1 / -1;
}

.oe-modern-page .oe-inquiry-form label,
.oe-modern-page .oe-inq-checks legend {
	color: #c9d9ea;
	font-size: 13px;
	font-weight: 600;
}

.oe-modern-page .oe-inq-field > label {
	margin-bottom: 7px;
}

.oe-modern-page .oe-inquiry-form .required {
	color: #7fb3e8;
}

.oe-modern-page .oe-inquiry-form .optional,
.oe-modern-page .oe-inq-hint,
.oe-modern-page .oe-inq-fineprint {
	color: #89a0b9;
}

.oe-modern-page .oe-inquiry-form .optional {
	font-weight: 400;
}

.oe-modern-page .oe-inquiry-form input[type="text"],
.oe-modern-page .oe-inquiry-form input[type="email"],
.oe-modern-page .oe-inquiry-form input[type="tel"],
.oe-modern-page .oe-inquiry-form select,
.oe-modern-page .oe-inquiry-form textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 13px;
	border: 1px solid #cbd6e1;
	border-radius: 7px;
	background: #fff;
	color: var(--ink);
	font-size: 14px;
	line-height: 1.4;
}

.oe-modern-page .oe-inquiry-form textarea {
	min-height: 0;
	resize: vertical;
}

.oe-modern-page .oe-inquiry-form ::placeholder {
	color: #8b98a6;
}

.oe-modern-page .oe-inquiry-form :is(input, select, textarea):focus-visible {
	outline: 3px solid #58aaff;
	outline-offset: 2px;
	border-color: var(--blue);
}

.oe-modern-page .oe-inquiry-form [aria-invalid="true"] {
	border-color: #ff8f8f;
}

.oe-modern-page .oe-inq-hint,
.oe-modern-page .oe-inq-error {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.5;
}

.oe-modern-page .oe-inq-error {
	color: #ff9d9d;
}

.oe-modern-page .oe-inq-checks {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.oe-modern-page .oe-inq-checks legend {
	margin-bottom: 2px;
	padding: 0;
}

.oe-modern-page .oe-inq-check {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 11px;
	min-height: 44px;
	padding-block: 10px;
	color: #c9d9ea;
	font-size: 14px;
	line-height: 1.5;
}

.oe-modern-page .oe-inq-check label {
	font-weight: 400;
}

.oe-modern-page .oe-inq-check input[type="checkbox"] {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--blue);
}

.oe-modern-page .oe-inq-check--error {
	color: #ff9d9d;
}

.oe-modern-page .oe-inq-check .oe-inq-error {
	flex: 0 0 100%;
	margin-top: 0;
}

.oe-modern-page .oe-inquiry-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: start;
	min-height: 48px;
	margin: 0;
	padding: 13px 20px;
	border: 1px solid var(--blue);
	border-radius: 7px;
	background: var(--blue);
	box-shadow: 0 5px 15px #0073ed14;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.oe-modern-page .oe-inquiry-submit:hover {
	border-color: #0065d4;
	background: #0065d4;
	box-shadow: 0 6px 20px #0073ed35;
	transform: translateY(-2px);
}

.oe-modern-page .oe-inq-fineprint {
	font-size: 12px;
	line-height: 1.6;
}

/* Hidden from people, reachable by nothing: the spam trap. */
.oe-modern-page .oe-inq-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.oe-modern-page .page-note {
	padding-block: 30px 56px;
	color: var(--muted);
	font-size: 13px;
	text-align: center;
}

/* ── Smaller screens ───────────────────────────────────────────────── */

@media (max-width: 980px) {
	.oe-modern-page .page-content {
		grid-template-columns: minmax(0, 1fr);
	}

	.oe-modern-page .page-content > *,
	.oe-modern-page .page-content > h2 {
		grid-column: 1;
		max-width: 720px;
	}

	.oe-modern-page .page-content > h2 + * {
		margin-top: 14px !important;
		padding-top: 0;
		border-top: 0;
	}

	.oe-modern-page .page-content .oe-document-nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.oe-modern-page .contact-band-inner {
		display: block;
	}

	.oe-modern-page .contact-band-inner > p {
		margin-top: 28px;
	}

	.oe-modern-page .contact-band-form {
		margin-top: 32px;
	}
}

@media (max-width: 781px) {
	.oe-modern-page .oe-inquiry-form {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 700px) {
	.oe-modern-page .page-hero {
		padding-block: 44px 26px;
	}

	.oe-modern-page .page-hero .eyebrow {
		font-size: 9px;
	}

	.oe-modern-page .page-title {
		margin-top: 20px;
		font-size: 40px;
		letter-spacing: -1.4px;
	}

	.oe-modern-page .page-content {
		padding-bottom: 64px;
	}

	.oe-modern-page .page-content > :first-child {
		font-size: 17px;
	}

	.oe-modern-page .page-content > h2 {
		margin-top: 44px !important;
		padding-top: 26px;
	}

	.oe-modern-page .page-content .wp-block-columns,
	.oe-modern-page .oe-support-list,
	.oe-modern-page .oe-support-guide .oe-support-list {
		grid-template-columns: minmax(0, 1fr);
	}

	.oe-modern-page .oe-support-guide {
		padding-block: 44px 64px;
	}

	.oe-modern-page .contact-band {
		padding-block: 48px 52px;
	}

	.oe-modern-page .wp-block-button__link,
	.oe-modern-page .contact-band .oe-contact-email,
	.oe-modern-page .contact-band .oe-inquiry-submit {
		width: 100%;
	}

	.oe-modern-page .page-content .wp-block-button {
		width: 100%;
	}
}

@media (max-width: 359px) {
	.oe-modern-page .page-content .oe-document-nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.oe-modern-page .page-title {
		font-size: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.oe-modern-page .wp-block-button__link:hover,
	.oe-modern-page .oe-contact-email:hover,
	.oe-modern-page .oe-inquiry-submit:hover {
		transform: none;
	}
}
