/**
 * Platinum Towing — contact form and Google Reviews section.
 * Uses the theme's colour/typography tokens (with fallbacks) so both blocks
 * follow the black / orange / white identity and its contrast rules.
 */

/* ===========================================================================
 * Contact form
 * ======================================================================== */

.pt-cf-section {
	border-top: 1px solid var(--wp--custom--color--hairline, #2b2f33);
	display: grid;
	gap: var(--wp--preset--spacing--40, 40px);
	margin-top: var(--wp--preset--spacing--50, 64px);
	padding-top: var(--wp--preset--spacing--50, 64px);
}

@media (min-width: 960px) {
	.pt-cf-section {
		align-items: start;
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	}
}

.pt-cf-section__intro > * + * {
	margin-top: var(--wp--preset--spacing--20, 16px);
}

/* Label with the short orange rule used by every section head. */
.pt-cf-section__label {
	align-items: center;
	color: var(--wp--custom--color--accent-text, #f26b1d);
	display: flex;
	gap: 12px;
}

.pt-cf-section__label::before {
	background: var(--wp--custom--color--accent, #f26b1d);
	content: "";
	flex: 0 0 32px;
	height: 2px;
}

/* "Need help right now?" — the phone stays the primary action. */
.pt-cf-urgent {
	background: var(--wp--preset--color--gunmetal, #2b2f33);
	border-left: 4px solid var(--wp--custom--color--accent, #f26b1d);
	border-radius: var(--wp--custom--radius--md, 4px);
	margin-top: var(--wp--preset--spacing--30, 24px) !important;
	padding: var(--wp--preset--spacing--30, 24px);
}

.pt-cf-urgent > * + * {
	margin-top: var(--wp--preset--spacing--10, 8px);
}

.pt-cf-urgent p:not(.pt-cf-urgent__title) {
	color: var(--wp--custom--color--ink-muted, #c9ccd1);
}

.pt-cf-urgent__title {
	font-family: var(--wp--preset--font-family--display, inherit);
	font-size: 18px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.pt-cf-urgent__call {
	margin-top: var(--wp--preset--spacing--20, 16px) !important;
}

.pt-cf-urgent__call .wp-block-button__link {
	display: inline-block;
	text-decoration: none;
}

/* Keep the phone number on one line. */
.pt-nowrap {
	white-space: nowrap;
}

@media (max-width: 599px) {
	.pt-cf-urgent__call .wp-block-button__link {
		box-sizing: border-box;
		padding-inline: 12px;
		text-align: center;
		width: 100%;
	}
}

/* Form card. */
.pt-cf {
	border: 1px solid var(--wp--custom--color--hairline, #2b2f33);
	border-radius: var(--wp--custom--radius--md, 4px);
	border-top: 3px solid var(--wp--custom--color--accent, #f26b1d);
	color-scheme: dark; /* Native select/checkbox controls follow the dark surface. */
	padding: var(--wp--preset--spacing--30, 24px);
}

@media (min-width: 600px) {
	.pt-cf {
		padding: var(--wp--preset--spacing--40, 40px);
	}
}

.pt-cf__fieldset {
	border: 0;
	margin: 0;
	min-width: 0;
	padding: 0;
}

/* Even spacing between all rows (gap, so field margins cannot interfere). */
.pt-cf__fieldset {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30, 24px);
}

.pt-cf__fieldset > * {
	margin-block: 0 !important;
}

.pt-cf__required-note {
	color: var(--wp--custom--color--ink-muted, #c9ccd1);
	font-size: 15px;
	margin: 0;
}

.pt-cf__row {
	display: grid;
	gap: var(--wp--preset--spacing--30, 24px);
}

@media (min-width: 600px) {
	.pt-cf__row {
		grid-template-columns: 1fr 1fr;
	}
}

.pt-cf__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	min-width: 0;
}

.pt-cf__field label {
	font-weight: 600;
}

.pt-cf__req,
.pt-cf__opt {
	color: var(--wp--custom--color--ink-muted, #c9ccd1);
	font-size: 14px;
	font-weight: 400;
	white-space: nowrap;
}

.pt-cf__hint {
	color: var(--wp--custom--color--ink-muted, #c9ccd1);
	font-size: 15px;
	margin: 0;
}

.pt-cf input[type="text"],
.pt-cf input[type="email"],
.pt-cf input[type="tel"],
.pt-cf select,
.pt-cf textarea {
	background: var(--wp--preset--color--jet-black, #0b0b0c);
	border: 2px solid var(--wp--preset--color--platinum-silver, #c9ccd1);
	border-radius: var(--wp--custom--radius--md, 4px);
	box-sizing: border-box;
	color: var(--wp--custom--color--ink, #f5f5f2);
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming into the field. */
	min-height: 48px;
	padding: 10px 14px;
	width: 100%;
}

.pt-cf textarea {
	min-height: 160px;
	resize: vertical;
}

.pt-cf input:hover,
.pt-cf select:hover,
.pt-cf textarea:hover {
	border-color: var(--wp--custom--color--ink, #f5f5f2);
}

.pt-cf :is(input, select, textarea):focus-visible {
	border-color: var(--wp--custom--color--accent, #f26b1d);
}

/* Invalid fields: thicker orange border + the message text (not colour alone). */
.pt-cf [aria-invalid="true"] {
	border-color: var(--wp--custom--color--accent, #f26b1d) !important;
	box-shadow: inset 4px 0 0 var(--wp--custom--color--accent, #f26b1d);
}

.pt-cf__error {
	color: var(--wp--custom--color--accent-text, #f26b1d);
	font-size: 15px;
	font-weight: 600;
	margin: 0;
}

.pt-cf__error::before {
	content: "! ";
}

/* Consent: checkbox beside its label. */
.pt-cf__field--consent {
	display: grid;
	gap: 8px 12px;
	grid-template-columns: 28px 1fr;
}

.pt-cf__field--consent input[type="checkbox"] {
	accent-color: var(--wp--custom--color--accent, #f26b1d);
	height: 24px;
	margin: 2px 0 0;
	width: 24px;
}

.pt-cf__field--consent label {
	font-weight: 400;
}

.pt-cf__field--consent label a {
	color: var(--wp--custom--color--ink, #f5f5f2);
	text-decoration: underline;
}

.pt-cf__field--consent .pt-cf__error {
	grid-column: 2;
}

.pt-cf__field--consent .pt-cf__req {
	white-space: normal;
}

/* Honeypot: off-screen for people, present for bots. */
.pt-cf__hp {
	height: 1px;
	left: -10000px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

.pt-cf__actions {
	padding-top: var(--wp--preset--spacing--10, 8px);
}

.pt-cf__actions button {
	border: 0;
	cursor: pointer;
}

@media (max-width: 599px) {
	.pt-cf__actions,
	.pt-cf__actions .wp-block-button,
	.pt-cf__actions button {
		width: 100%;
	}
}

/* Status messages (error summary, notice, confirmation). */
.pt-cf-status {
	background: var(--wp--preset--color--gunmetal, #2b2f33);
	border-left: 4px solid var(--wp--custom--color--accent, #f26b1d);
	border-radius: var(--wp--custom--radius--md, 4px);
	margin-bottom: var(--wp--preset--spacing--30, 24px);
	padding: var(--wp--preset--spacing--30, 24px);
	scroll-margin-top: 120px;
}

.pt-cf-status > * + * {
	margin-top: var(--wp--preset--spacing--10, 8px);
}

.pt-cf-status ul {
	margin-bottom: 0;
	padding-left: 1.25em;
}

.pt-cf-status a {
	color: var(--wp--custom--color--ink, #f5f5f2);
	text-decoration: underline;
}

.pt-cf-status--success {
	border-left-color: var(--wp--custom--color--ink, #f5f5f2);
}

#pt-contact-form {
	scroll-margin-top: 100px;
}

/* ===========================================================================
 * Google Reviews (homepage, between FAQ and the closing call to action)
 * ======================================================================== */

.pt-reviews {
	--wp--custom--color--surface: var(--wp--preset--color--gunmetal, #2b2f33);
	--wp--custom--color--accent-text: var(--wp--preset--color--off-white, #f5f5f2);
	--wp--custom--color--hairline: var(--wp--preset--color--jet-black, #0b0b0c);
	background: var(--wp--custom--color--surface);
	color: var(--wp--custom--color--ink, #f5f5f2);
	margin-block: 0 !important;
	padding-block: var(--wp--preset--spacing--50, 64px);
	padding-inline: var(--wp--style--root--padding-left, 16px) var(--wp--style--root--padding-right, 16px);
}

.pt-reviews__inner {
	margin-inline: auto;
	max-width: var(--wp--style--global--wide-size, 1200px);
}

.pt-reviews__inner > * + * {
	margin-top: var(--wp--preset--spacing--20, 16px);
}

.pt-reviews__label {
	align-items: center;
	color: var(--wp--custom--color--accent-text);
	display: flex;
	gap: 12px;
}

.pt-reviews__label::before {
	background: var(--wp--custom--color--accent, #f26b1d);
	content: "";
	flex: 0 0 32px;
	height: 2px;
}

.pt-reviews__intro {
	color: var(--wp--preset--color--platinum-silver, #c9ccd1);
	max-width: 62ch;
}

.pt-reviews__feed {
	margin-top: var(--wp--preset--spacing--40, 40px) !important;
	min-width: 0;
}

.pt-reviews__actions {
	margin-top: var(--wp--preset--spacing--40, 40px) !important;
}

/* Editor-only notice when no genuine reviews are connected. */
.pt-reviews-notice {
	border: 2px dashed var(--wp--custom--color--accent, #f26b1d);
	border-radius: 4px;
	padding: 16px 20px;
}

.pt-reviews-notice > * + * {
	margin-top: 8px;
}

/* Contact form — match the width of the contact details section */
.pt-cf-section {
    width: calc(100% - 40px);
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .pt-cf-section {
        width: calc(100% - 32px);
    }
}
