/*
 * Contact block. Loaded only on pages that use it. Mobile first; two columns from 900px.
 * Left: the details card, one row per item with its icon and a hairline between rows.
 * Right: the contact form or, with no form, the clinic's map (its CSS is in components/map).
 * With neither, the details take the full width. Gravity Forms draws the form's own
 * fields with its own stylesheet.
 */

.contact { padding: 56px 0; }

.contact__title { font-size: 1.9rem; line-height: 1.1; }
.contact__intro { max-width: var(--intro-w, 90ch); margin: 10px 0 0; color: var(--muted); }

.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 26px; }

.contact__card { position: relative; min-width: 0; padding: 22px; border-radius: var(--card-r); background: var(--surface); }

/* ---------- Details ---------- */

.contact__details { display: grid; align-content: start; }

.contact__row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; padding: 18px 0; }
.contact__row:first-child { padding-top: 0; }
.contact__row:last-child { padding-bottom: 0; }
.contact__row + .contact__row { border-top: 1px solid var(--line); }

/* The icon marks what the row is; it is not decoration. */
.contact__row .ico { width: 20px; height: 20px; margin-top: 2px; color: var(--brand-text, var(--brand)); }

/* Never wider than the screen: long emails, addresses and words break onto a new line. */
.contact__row > div { min-width: 0; overflow-wrap: anywhere; }
.contact__row b { display: block; margin-bottom: 2px; }
.contact__row address { margin: 0; color: var(--muted); font-style: normal; line-height: 1.5; }

.contact__link { display: inline-block; margin-top: 4px; font-weight: 600; }

.contact__hours { display: grid; grid-template-columns: auto 1fr; gap: 3px 18px; margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.contact__hours dt { color: var(--ink); font-weight: 600; }
.contact__hours dd { margin: 0; }
.contact__note { display: block; margin-top: 8px; color: var(--muted); }

/* ---------- Form ---------- */

.contact__form-title { margin-bottom: 16px; font-size: 1.25rem; }

/* ---------- Map (in place of the form) ----------
   The map fills its card. The card has no padding, so the map's corners follow the card's. */

.contact__map { min-height: 300px; padding: 0; overflow: hidden; }
.contact__map .map { position: absolute; inset: 0; min-height: 0; border-radius: 0; }
.contact__map .map iframe { height: 100%; }
.contact__map .map__placeholder { min-height: 0; height: 100%; }

/* ---------- Look C: outlined cards ---------- */

.look-c .contact__card { border: 1px solid var(--line); }

/* ---------- Look F: soft cards ---------- */

.look-f .contact__card { box-shadow: 0 14px 30px -22px rgb(0 0 0 / 0.35); }

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
	.contact { padding: 96px 0; }
	.contact__title { font-size: 2.9rem; }

	/* Stretch, so the details card and the form or map card end at the same height. */
	.contact__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; margin-top: 40px; align-items: stretch; }
	.contact__grid--single { grid-template-columns: minmax(0, 40rem); }
	.contact__card { padding: 32px; }
	.contact__row { grid-template-columns: 22px minmax(0, 1fr); gap: 16px; padding: 22px 0; }
	.contact__row .ico { width: 22px; height: 22px; }
	.contact__map { min-height: 420px; }
}

/* ---------- The form's Send button: Gravity Forms paints its buttons from its own CSS
   variables, so point those at the site's button tokens (the form then matches every look) ---------- */
.contact .gform_wrapper.gform-theme {
	--gf-ctrl-btn-bg-color-primary: var(--primary);
	--gf-ctrl-btn-bg-color-hover-primary: var(--primary);
	--gf-ctrl-btn-color-primary: var(--on-primary);
	--gf-ctrl-btn-color-hover-primary: var(--on-primary);
	--gf-ctrl-btn-border-color-primary: transparent;
	--gf-ctrl-btn-radius: var(--btn-r);
	--gf-ctrl-btn-font-family: var(--fb);
	--gf-ctrl-btn-font-weight: 700;
	--gf-ctrl-btn-size-md: 50px;
}
