/*
 * Front-end details that theme.json cannot express. Colours, fonts, sizes and
 * spacing all come from theme.json presets, so admins can change them in
 * Appearance → Editor → Styles. Keep this file small.
 */

/* ---------- Buttons ---------- */

.wp-block-button__link,
.wp-block-read-more.wp-element-button {
	min-width: var(--wp--custom--button--min-width);
	max-width: 100%;
	min-height: 54px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.wp-block-read-more.wp-element-button {
	min-width: 260px;
	width: auto;
	text-decoration: none;
}

.wp-block-read-more.wp-element-button:hover {
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.dpc-share .wp-block-button {
	flex: 1 1 240px;
}

.dpc-share .wp-block-button__link {
	width: 100%;
	min-width: 0;
}

/* ---------- Header ---------- */

.dpc-announcement p:empty {
	display: none;
}

.dpc-announcement:has(p:empty) {
	min-height: 44px;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.dpc-primary-nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	border-bottom: 2px solid transparent;
}

.dpc-primary-nav .current-menu-item > .wp-block-navigation-item__content,
.dpc-primary-nav .wp-block-navigation-item__content[aria-current="page"] {
	border-bottom-color: var(--wp--preset--color--tan);
}

/* ---------- Footer ---------- */

.dpc-footer-row p {
	margin: 0;
}

.dpc-footer-spacer {
	visibility: hidden;
}

.dpc-social .wp-social-link {
	font-size: 26px;
}

@media (max-width: 781px) {
	.dpc-footer-row {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.dpc-footer-links {
		border-width: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		justify-content: center;
	}
}

/* ---------- Newsletter sign-up ---------- */

.dpc-signup {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	width: 100%;
	max-width: var(--wp--style--global--content-size);
	margin: 26px auto 0;
}

.dpc-signup input,
.dpc-comments input:not([type="checkbox"]):not([type="submit"]),
.dpc-comments textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 58px;
	padding: 0 18px;
	border: 0;
	border-radius: 8px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 16px;
	font-weight: 500;
}

.dpc-signup button {
	min-height: 58px;
	max-width: 240px;
	border: 0;
	cursor: pointer;
}

.dpc-signup ::placeholder,
.dpc-comments ::placeholder,
.dpc-shop-filters ::placeholder {
	color: var(--wp--preset--color--contrast);
	opacity: 1;
}

/* ---------- Content helpers used by patterns ---------- */

.dpc-measure {
	max-width: 400px;
	margin-left: auto !important;
	margin-right: auto !important;
}

.dpc-narrow {
	max-width: 260px;
	margin-left: auto !important;
	margin-right: auto !important;
}

.dpc-price {
	line-height: 1;
	margin-block: 18px 6px;
}

.dpc-price sup {
	font-size: 0.4em;
	vertical-align: top;
	position: relative;
	top: 0.25em;
}

/* Full-bleed photo halves fill the height of their row. */
.dpc-split > .wp-block-column > .wp-block-image,
.dpc-package-row > .wp-block-column > .wp-block-image {
	height: 100%;
	margin: 0;
}

.dpc-split > .wp-block-column > .wp-block-image img,
.dpc-package-row > .wp-block-column > .wp-block-image img {
	width: 100%;
	height: 100%;
}

/* Service cards: buttons line up along the bottom. */
.dpc-card {
	display: flex;
	flex-direction: column;
}

.dpc-card .dpc-push-bottom {
	margin-top: auto !important;
	padding-top: 14px;
}

/* Numbered "favourite things" list with tan badges. */
.dpc-numbered {
	list-style: none;
	padding: 0;
	counter-reset: dpc-item;
	display: grid;
	gap: 40px;
}

.dpc-numbered > li {
	counter-increment: dpc-item;
	position: relative;
	padding-left: 62px;
	min-height: 34px;
}

.dpc-numbered > li::before {
	content: counter(dpc-item);
	position: absolute;
	left: 0;
	top: -2px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--wp--preset--color--tan);
	color: var(--wp--preset--color--base);
	font-size: 15px;
	font-weight: 500;
	display: grid;
	place-items: center;
}

.dpc-tile-gallery.wp-block-gallery.has-nested-images figure.wp-block-image img {
	aspect-ratio: 1;
	object-fit: cover;
}

@media (max-width: 781px) {
	.dpc-tile-gallery.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
		width: calc(50% - 14px);
	}
}

.dpc-photo-placeholder p:empty {
	display: none;
}

/* ---------- Blog and portfolio cards ---------- */

.dpc-post-card {
	height: 100%;
}

.dpc-post-card > * {
	width: 100%;
	box-sizing: border-box;
}

.dpc-post-card > .wp-block-read-more {
	width: auto;
	margin-top: auto;
}

.dpc-post-card .wp-block-post-featured-image {
	margin: 0;
}

.dpc-post-card .wp-block-post-excerpt__more-text {
	display: none;
}

.dpc-logo-tile {
	background: var(--wp--preset--color--stone);
	padding: 40px;
	box-sizing: border-box;
}

.dpc-portfolio-grid .wp-block-post-title a,
.dpc-pattern-grid .wp-block-post-title a {
	text-decoration: none;
}

/* ---------- Single post ---------- */

.dpc-post-body h2,
.dpc-post-body h3 {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: var(--wp--preset--color--contrast);
	margin-top: 1.6em;
	margin-bottom: 0;
}

.dpc-post-body h2 + p,
.dpc-post-body h3 + p {
	margin-top: 0;
}

.dpc-post-body strong {
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.dpc-comments .wp-block-post-comments-form .comment-reply-title {
	text-align: center;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.dpc-comments textarea {
	min-height: 220px;
	padding: 18px;
}

.dpc-comments .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: var(--wp--preset--font-size--small);
}

.dpc-comments .comment-form-cookies-consent input {
	width: 22px;
	height: 22px;
	accent-color: var(--wp--preset--color--tan-dark);
}

.dpc-comments .comment-notes,
.dpc-comments .logged-in-as {
	font-size: var(--wp--preset--font-size--small);
}

/* ---------- Shop ---------- */

.dpc-shop-filters {
	max-width: 1060px;
	margin-left: auto !important;
	margin-right: auto !important;
}

.dpc-shop-filters .wp-block-search__input,
.dpc-shop-filters select {
	width: 100%;
	min-height: 60px;
	padding: 0 18px;
	border: 2px solid #8d8d8d;
	border-radius: 12px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--condensed);
	font-size: 16px;
	font-weight: 500;
}

.dpc-shop-filters .wp-block-search__inside-wrapper {
	border: 0;
	padding: 0;
}

.dpc-shop-filters .wp-block-categories {
	margin: 0;
}

/* ---------- Page sections ---------- */

/* Full-width sections stack edge to edge, as in the design. */
.wp-block-post-content > .alignfull,
.wp-block-post-content > .wp-block-template-part.alignfull {
	margin-block: 0;
}

/* Header, main and footer sit flush; sections provide their own spacing. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Package price panels match the height of their image. */
.dpc-package-row > .wp-block-column.is-vertically-aligned-center {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
