/* Millhouses: extras that theme.json can't express. Keep this file small. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Template parts sit flush: no gaps between header, main, enquiry band and footer */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Header: the template-part wrapper is the sticky element */
.wp-site-blocks > :has(> .mh-header) {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .wp-site-blocks > :has(> .mh-header) { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > :has(> .mh-header) { top: 46px; } }
@media (max-width: 600px) { .admin-bar .wp-site-blocks > :has(> .mh-header) { top: 0; } }
.mh-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.mh-header .wp-block-site-logo img,
.mh-header .mh-logo img { height: 40px; width: auto; }
.mh-header .wp-block-navigation a { text-decoration: none; }
.mh-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); }
.mh-phone a { text-decoration: none; font-weight: 600; white-space: nowrap; }
@media (max-width: 960px) { .mh-phone { display: none; } }

/* Eyebrow text above headings */
.mh-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.5rem !important;
}

/* Card style for groups */
.wp-block-group.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--30);
	box-shadow: var(--wp--preset--shadow--soft);
	height: 100%;
}
.wp-block-group.is-style-card > :last-child { margin-top: auto; }
.wp-block-group.is-style-card { display: flex; flex-direction: column; }

/* Route cards: whole card reads as one unit; link arrow */
.mh-route h3 { margin-top: 0; }
.mh-arrow { margin-top: var(--wp--preset--spacing--20); }
.mh-arrow a { font-weight: 600; text-decoration: none; }
.mh-arrow a:hover { text-decoration: underline; }
.mh-arrow a::after { content: " \2192"; }

/* Tick list */
ul.is-style-checks { list-style: none; padding-left: 0; }
ul.is-style-checks li { position: relative; padding-left: 1.75rem; margin-bottom: 0.5rem; }
ul.is-style-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.45em;
	width: 1rem;
	height: 0.55rem;
	border-left: 3px solid var(--wp--preset--color--accent);
	border-bottom: 3px solid var(--wp--preset--color--accent);
	transform: rotate(-45deg);
}

/* Numbered steps */
.mh-steps { counter-reset: step; }
.mh-step { counter-increment: step; }
.mh-step h3::before {
	content: counter(step);
	display: inline-grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	margin-right: 0.6rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font-size: 1rem;
	vertical-align: middle;
}

/* Dark sections */
.has-ink-background-color :where(h1, h2, h3, h4, p, li) { color: var(--wp--preset--color--white); }
.has-ink-background-color a:not(.wp-block-button__link) { color: #CFE6F7; }
.has-ink-background-color a:not(.wp-block-button__link):hover { color: var(--wp--preset--color--white); }

/* Footer */
.mh-footer a { text-decoration: none; }
.mh-footer ul { list-style: none; padding-left: 0; }
.mh-footer li { margin-bottom: 0.35rem; }
.mh-footer a[href^="mailto:"] { overflow-wrap: anywhere; }
.mh-footer a:hover { text-decoration: underline; }
.mh-footer .mh-legal { font-size: var(--wp--preset--font-size--small); opacity: 0.85; }

/* Contact Form 7 */
.wpcf7 label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid #9FB3C6;
	border-radius: 8px;
	font: inherit;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
}
.wpcf7 textarea { min-height: 9rem; }
.wpcf7 input[type="submit"] {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	border: 0;
	border-radius: 8px;
	padding: 0.8rem 1.4rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--primary-dark); }
span.wpcf7-list-item { display: block; }

/* Header on small screens: smaller logo, compact button that never wraps */
.mh-header-cta .wp-block-button__link { white-space: nowrap; }
@media (max-width: 600px) {
	.mh-header .mh-logo img { height: 30px; width: auto !important; }
	.mh-header-cta .wp-block-button__link { padding: 0.55rem 0.9rem; font-size: 0.9375rem; }
}

/* Tables: clear header, readable rows, scroll sideways on small screens */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; font-size: var(--wp--preset--font-size--medium); }
.wp-block-table th,
.wp-block-table td { border: 1px solid var(--wp--preset--color--line); padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; }
.wp-block-table thead th { background: var(--wp--preset--color--tint); font-family: var(--wp--preset--font-family--heading); font-weight: 700; }
.wp-block-table tbody tr:nth-child(even) td { background: var(--wp--preset--color--mist); }

/* Package comparison: centred columns, emphasised ticks */
.mh-packages th:not(:first-child),
.mh-packages td:not(:first-child) { text-align: center; white-space: nowrap; width: 15%; }
.mh-packages td:not(:first-child) { color: var(--wp--preset--color--accent); font-weight: 700; }
.mh-packages tbody tr:last-child td { background: var(--wp--preset--color--tint); color: var(--wp--preset--color--ink); }
@media (max-width: 600px) { .mh-packages table { min-width: 520px; } }
