/*
Theme Name: Agency Base
Theme URI: https://weaverweb.co.za
Author: Weaver
Description: Starter block theme for South African small business websites. Business details come from Settings → Business details, so the phone number, address and hours stay the same everywhere on the site. Pick a style for the industry under Appearance → Editor → Styles.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
Version: 1.2.0
License: GPL-2.0-or-later
Text Domain: agency-base
*/

/* Most styling lives in theme.json. These rules cover what theme.json can't. */

.wp-site-blocks {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks > footer {
	margin-top: auto;
}

:where(figure.wp-block-image) {
	margin-inline: 0;
}

:where(.wp-block-image img, .wp-block-image svg) {
	border-radius: var(--wp--custom--radius);
}

.is-style-agency-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius);
	padding: var(--wp--preset--spacing--40);
}

.agency-placeholder-note {
	border-left: 3px solid var(--wp--preset--color--accent);
	padding-left: 0.75rem;
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 0.75rem 0.5rem;
}

.wp-block-table td:last-child {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
}

/* Contact form from the Agency Essentials plugin */
.agency-form,
.agency-form * {
	box-sizing: border-box;
}

.agency-form {
	display: grid;
	gap: var(--wp--preset--spacing--20);
	max-width: 36rem;
}

.agency-form label {
	display: grid;
	gap: 0.35rem;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}

.agency-form input[type="text"],
.agency-form input[type="email"],
.agency-form input[type="tel"],
.agency-form textarea {
	font: inherit;
	font-weight: 400;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	width: 100%;
}

.agency-form input:focus-visible,
.agency-form textarea:focus-visible,
.agency-form button:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.agency-form .agency-consent {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-weight: 400;
}

.agency-form .agency-consent input {
	margin-top: 0.3rem;
}

.agency-form .agency-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.agency-form-notice {
	padding: 0.8rem 1rem;
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--base-2);
	border-left: 4px solid var(--wp--preset--color--accent);
}

/* Smaller call button in the header */
header .wp-block-button__link {
	font-size: var(--wp--preset--font-size--small);
	padding: 0.6rem 1.1rem;
}

/* On phones the floating WhatsApp button does this job, so keep the header on one line */
@media (max-width: 480px) {
	header .wp-block-buttons {
		display: none;
	}
}

/* Layouts: the AI builder's section layouts (control-centre/app/builder/design.py), one class per section, so a
   WordPress site built from a blueprint looks like its AI page. The patterns "section-<part>-<layout>" use them. */

.agency-l-hero-centred,
.agency-l-hero-centred .wp-block-buttons {
	text-align: center;
	justify-content: center;
}

.agency-l-hero-centred > .wp-block-group > * {
	margin-inline: auto !important;
}

.agency-l-hero-band h1 {
	font-size: clamp(2.5rem, 8vw, 4.6rem);
}

.agency-l-hero-band .wp-block-button__link,
.agency-dark .wp-block-button__link {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.agency-l-hero-band .is-style-outline .wp-block-button__link,
.agency-dark .is-style-outline .wp-block-button__link {
	background: transparent;
	color: inherit;
	border-color: currentColor;
}

.agency-l-hero-band :is(h1, h2, h3, p),
.agency-dark :is(h1, h2, h3, p),
.agency-panel :is(h1, h2, h3, p) {
	color: inherit;
}

.agency-l-hero-band a:not(.wp-block-button__link),
.agency-dark a:not(.wp-block-button__link),
.agency-panel a:not(.wp-block-button__link) {
	color: inherit;
}

.agency-l-hero-frame > .wp-block-group {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: calc(var(--wp--custom--radius) * 1.4);
	padding: var(--wp--preset--spacing--50);
}

.agency-l-services-list .wp-block-columns,
.agency-l-services-numbered .wp-block-columns {
	display: grid;
	gap: 0 var(--wp--preset--spacing--50);
}

.agency-l-services-list .wp-block-columns {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
}

.agency-l-services-list .wp-block-column {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-block: var(--wp--preset--spacing--30);
}

.agency-l-services-numbered .wp-block-columns {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
	counter-reset: agency-service;
}

.agency-l-services-numbered .wp-block-column {
	border-top: 2px solid var(--wp--preset--color--contrast);
	padding-top: var(--wp--preset--spacing--30);
}

.agency-l-services-numbered .wp-block-column::before {
	counter-increment: agency-service;
	content: counter(agency-service, decimal-leading-zero);
	display: block;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2.4rem;
	line-height: 1;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0.75rem;
}

.agency-l-services-tiles .wp-block-column:nth-child(odd) {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	border-color: var(--wp--preset--color--accent);
}

.agency-l-services-tiles .wp-block-column:nth-child(odd) * {
	color: inherit;
}

.agency-l-services-tiles .wp-block-column:nth-child(even) {
	background: var(--wp--preset--color--base-2);
}

@media (min-width: 782px) {
	.agency-l-gallery-mosaic .wp-block-columns {
		display: grid;
		grid-template-columns: 2fr 1fr;
		grid-template-rows: 1fr 1fr;
	}

	.agency-l-gallery-mosaic .wp-block-column:first-child {
		grid-row: span 2;
	}

	.agency-l-gallery-mosaic .wp-block-image,
	.agency-l-gallery-mosaic img {
		height: 100%;
		object-fit: cover;
	}
}

.agency-l-prices-menu td:first-child {
	font-family: var(--wp--preset--font-family--heading);
}

.agency-panel {
	border-radius: var(--wp--custom--radius);
	padding: var(--wp--preset--spacing--50);
}
