/* FC-045 — launch polish for footer/contact e-mail fit and contact surface. */

/* Footer is present site-wide. Give the contact column a little more room on
   desktop and keep the business e-mail on one line without risking mobile
   overflow. */
@media (min-width: 1101px) {
	.site-footer__primary--cols-4 {
		grid-template-columns:
			minmax(14rem, 1.25fr)
			minmax(9rem, 0.85fr)
			minmax(9rem, 0.85fr)
			minmax(18rem, 1.15fr);
	}

	.site-footer__contact .site-footer__link-list a[href^="mailto:"] {
		white-space: nowrap;
		font-size: 0.9rem;
		letter-spacing: -0.01em;
	}

	.fcsu-contact__action-link[href^="mailto:"] .fcsu-contact__action-value {
		white-space: nowrap;
		font-size: 0.96rem;
		letter-spacing: -0.015em;
	}
}

/* Narrow screens: every ancestor in the flex/grid shrink chain must be able to
   contract. */
@media (max-width: 1100px) {
	.site-footer__contact,
	.site-footer__contact .site-footer__link-list,
	.site-footer__contact .site-footer__link-list li,
	.site-footer__contact .site-footer__link-list a[href^="mailto:"],
	.fcsu-contact__action,
	.fcsu-contact__action-link[href^="mailto:"],
	.fcsu-contact__action-link[href^="mailto:"] .fcsu-contact__action-body,
	.fcsu-contact__action-link[href^="mailto:"] .fcsu-contact__action-value {
		min-width: 0;
		max-width: 100%;
	}

	.site-footer__contact .site-footer__link-list a[href^="mailto:"],
	.fcsu-contact__action-link[href^="mailto:"] .fcsu-contact__action-value {
		white-space: normal;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.fcsu-contact__action-link[href^="mailto:"] .fcsu-contact__action-body {
		flex: 1 1 auto;
	}
}

@media (max-width: 480px) {
	.fcsu-contact__action-link[href^="mailto:"] .fcsu-contact__action-arrow {
		display: none;
	}

	.fcsu-contact__action-link[href^="mailto:"] .fcsu-contact__action-icon {
		width: 2.6rem;
		height: 2.6rem;
	}

	.fcsu-contact__action-link[href^="mailto:"] .fcsu-contact__action-value,
	.site-footer__contact .site-footer__link-list a[href^="mailto:"] {
		font-size: 0.94rem;
		line-height: 1.45;
	}
}

/* -------------------------------------------------------------------------
 * FC-047 — contact page final editorial layout.
 * Desktop: form + FAQ / channels / map / closing CTA.
 * Mobile: channels / form / FAQ / map / closing CTA.
 * ---------------------------------------------------------------------- */

@media (min-width: 901px) {
	.fcsu-contact__article {
		display: grid;
		grid-template-columns: minmax(0, 1.12fr) minmax(22rem, 0.88fr);
		grid-auto-flow: row dense;
		gap: var(--fc-space-5) var(--fc-space-4);
		align-items: stretch;
	}

	.fcsu-contact__head,
	.fcsu-contact__setup-note,
	.fcsu-contact__layout,
	.fcsu-contact__location,
	.fcsu-contact__cta {
		grid-column: 1 / -1;
	}

	.fcsu-contact__head {
		order: 0;
	}

	.fcsu-contact__setup-note {
		order: 1;
	}

	/* The shared height includes the heading and the white surface. Keeping the
	   two wrappers identical guarantees a clean baseline even when FAQ content
	   is longer than the form. */
	.fcsu-contact__form,
	.fcsu-contact__faq {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		min-width: 0;
		height: 44rem;
		order: 2;
	}

	.fcsu-contact__form {
		grid-column: 1;
	}

	.fcsu-contact__faq {
		grid-column: 2;
	}

	.fcsu-contact__form .fcsu-contact__section-title,
	.fcsu-contact__faq .fcsu-contact__section-title {
		width: 100%;
		max-width: none;
		margin: 0 0 1.25rem;
		font-size: 1.28rem;
		line-height: 1.25;
	}

	.fcsu-contact__form-surface,
	.fcsu-contact__faq-list {
		box-sizing: border-box;
		width: 100%;
		max-width: none;
		margin: 0;
		min-height: 0;
		flex: 1 1 auto;
		border-radius: 1.35rem;
	}

	/* ------------------------------ Form ------------------------------ */
	.fcsu-contact__form-surface {
		display: flex;
		padding: 1.65rem 2rem 1.8rem;
	}

	.fcsu-contact__form-inner,
	.fcsu-contact__form-inner .wpcf7,
	.fcsu-contact__form-inner .wpcf7-form {
		width: 100%;
		min-width: 0;
		min-height: 0;
	}

	.fcsu-contact__form-inner .wpcf7-form {
		display: flex;
		flex-direction: column;
		height: 100%;
		gap: 0;
	}

	.fcsu-contact__form-inner .wpcf7-form > p,
	.fcsu-contact__form-inner .wpcf7-form > label {
		margin: 0 0 0.95rem;
	}

	.fcsu-contact__form-inner .wpcf7-form label {
		font-size: 0.92rem;
		line-height: 1.35;
	}

	/* CF7 auto paragraphing may insert a line break between label text and the
	   control. The control is already block-level; the break only wastes space. */
	.fcsu-contact__form-inner .wpcf7-form label > br {
		display: none;
	}

	.fcsu-contact__form-inner input[type="text"],
	.fcsu-contact__form-inner input[type="email"],
	.fcsu-contact__form-inner input[type="tel"],
	.fcsu-contact__form-inner input[type="url"],
	.fcsu-contact__form-inner input[type="number"],
	.fcsu-contact__form-inner input[type="search"],
	.fcsu-contact__form-inner input[type="date"],
	.fcsu-contact__form-inner select {
		min-height: 3rem;
		padding-block: 0.65rem;
	}

	/* Accepted visual proportion. Resize is allowed only inside a safe band so
	   the submit button can never be dragged outside the card. */
	.fcsu-contact__form-inner textarea {
		height: 13.75rem;
		min-height: 11rem;
		max-height: 13.75rem;
		padding-block: 0.8rem;
		resize: vertical;
	}

	.fcsu-contact__form-inner input[type="submit"],
	.fcsu-contact__form-inner button[type="submit"] {
		align-self: flex-start;
		min-width: 14rem;
		margin-top: auto;
	}

	/* CF7 spinner/status helpers must not steal a new visual row from the
	   balanced form. Validation messages still remain readable when present. */
	.fcsu-contact__form-inner .wpcf7-spinner {
		align-self: flex-start;
		margin-top: 0.35rem;
	}

	/* ------------------------------- FAQ ------------------------------ */
	.fcsu-contact__faq-list {
		position: relative;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-gutter: stable;
		scrollbar-width: thin;
		padding: 0.45rem 1.6rem 0.75rem;
		scroll-padding-block: 0.75rem;
	}

	.fcsu-contact__faq-item {
		margin: 0;
	}

	.fcsu-contact__faq-question {
		gap: 1rem;
		min-height: 3.7rem;
		padding-block: 0.95rem;
		font-size: 1rem;
		line-height: 1.38;
	}

	.fcsu-contact__faq-question-text {
		padding-right: 0.35rem;
	}

	.fcsu-contact__faq-marker {
		width: 1.15rem;
		height: 1.15rem;
	}

	.fcsu-contact__faq-answer {
		padding: 0 2.15rem 1rem 0;
		font-size: 0.94rem;
		line-height: 1.6;
	}

	.fcsu-contact__faq-item:last-child {
		padding-bottom: 0.25rem;
	}

	.fcsu-contact__faq-list:focus-within {
		scroll-behavior: smooth;
	}

	.fcsu-contact__layout {
		order: 3;
	}

	.fcsu-contact__location {
		order: 4;
	}

	.fcsu-contact__cta {
		order: 5;
	}
}

@media (max-width: 900px) {
	.fcsu-contact__article {
		display: flex;
		flex-direction: column;
	}

	.fcsu-contact__head {
		order: 0;
	}

	.fcsu-contact__setup-note {
		order: 1;
	}

	.fcsu-contact__layout {
		order: 2;
	}

	.fcsu-contact__form {
		order: 3;
	}

	.fcsu-contact__faq {
		order: 4;
	}

	.fcsu-contact__location {
		order: 5;
	}

	.fcsu-contact__cta {
		order: 6;
	}

	.fcsu-contact__form,
	.fcsu-contact__faq {
		height: auto;
	}

	.fcsu-contact__faq-list {
		overflow: visible;
	}

	/* Keep the mobile form comfortable, but do not let the textarea become a
	   giant resizable block on narrow screens. */
	.fcsu-contact__form-inner textarea {
		height: 11rem;
		min-height: 9rem;
		max-height: 13rem;
		resize: vertical;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fcsu-contact__faq-list:focus-within {
		scroll-behavior: auto;
	}
}
