/* Opt in per shortcode with html_class; unmarked Contact Form 7 forms are untouched. */
form.cs-cf7 {
  box-sizing: border-box;
  width: 100%;
  padding: 45px;
  background: #fff;
  color: #231f20;
  font: 400 16px/1.4 "CS Hero Poppins", Poppins, sans-serif;
  container-type: inline-size;
}

/* Give the CF7 wrapper the width of the column it was placed in.
   The form's inline size comes from its container, never from its contents: the container-type
   above makes it `contain: inline-size`, so its fit-content contribution is 0. Harmless inside
   normal block flow (block children are given their parent's width), but the offers slot on
   746632 is `is-layout-flex is-vertical`, i.e. a flex column whose `align-items: flex-start`
   lets its children shrink to fit: the wrapper's fit-content of a zero-contribution form is
   nothing, so the chain collapsed to the form's own 90px of padding and left a 0px content box.
   Fields fell to their own 15px side padding (30px) and labels wrapped one letter per line.

   WHY width AND NOT align-self: stretching the flex item fixes its width but Chrome resolves
   that item's block size from the shrink-to-fit pass, so the card kept the 3,612px height the
   letter-broken form had while the form inside was 805px — a blank white card. A percentage
   width is definite on the first pass, so the height follows the real content.

   `width: 100%` is also inert-by-equality on flow-layout pages: the wrapper there is already
   stretched by block layout, so the contact, request-a-custom-translation, blog and
   request-translation forms compute exactly the width they computed before this rule. */
div.wpcf7:has(> form.cs-cf7--interpretation) {
  width: 100%;
}

form.cs-cf7 p {
  margin: 0 0 12px;
}

form.cs-cf7 label {
  display: block;
  margin: 0 0 5.6px;
  font-weight: 400;
}

/* Keep the required indicator beside the label; CF7 retains aria-required. */
form.cs-cf7 label:has([aria-required="true"]):not(:has(.screen-reader-text)) {
  display: flex;
  flex-wrap: wrap;
}

form.cs-cf7 label:has([aria-required="true"]):not(:has(.screen-reader-text))::before {
  content: '*';
  color: #f2545b;
  order: 1;
}

form.cs-cf7 .wpcf7-form-control-wrap {
  display: block;
  flex-basis: 100%;
  order: 2;
}

/* CF7 inserts line breaks after hidden fields; they have no visible row. */
form.cs-cf7 input[type="hidden"] + br {
  display: none;
}

/* The query measures the content box, excluding the form's 90px padding. */
@container (min-width: 550px) {
  form.cs-cf7:is(.cs-cf7--interpretation, .cs-cf7--contact:not(.cs-cf7--blog)) > p:has(> label [name="firstname"]):has(> label [name="lastname"]) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 10px;
  }

  form.cs-cf7:is(.cs-cf7--interpretation, .cs-cf7--contact:not(.cs-cf7--blog)) > p:has(> label [name="firstname"]):has(> label [name="lastname"]) > * {
    grid-column: 1 / -1;
  }

  form.cs-cf7:is(.cs-cf7--interpretation, .cs-cf7--contact:not(.cs-cf7--blog)) > p:has(> label [name="firstname"]):has(> label [name="lastname"]) > br {
    display: none;
  }

  form.cs-cf7:is(.cs-cf7--interpretation, .cs-cf7--contact:not(.cs-cf7--blog)) > p:has(> label [name="firstname"]):has(> label [name="lastname"]) > label:has([name="firstname"]) {
    grid-column: 1;
  }

  form.cs-cf7:is(.cs-cf7--interpretation, .cs-cf7--contact:not(.cs-cf7--blog)) > p:has(> label [name="firstname"]):has(> label [name="lastname"]) > label:has([name="lastname"]) {
    grid-column: 2;
  }
}

form.cs-cf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
form.cs-cf7 select,
form.cs-cf7 textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 48.4px;
  margin: 0;
  padding: 15px;
  border: 0;
  border-radius: 0;
  background: #f2f2f2;
  color: #231f20;
  font: 400 16px/1.15 "CS Hero Poppins", Poppins, sans-serif;
}

form.cs-cf7 select {
  padding-right: 40px;
}

form.cs-cf7 textarea {
  height: auto;
  min-height: 66.8px;
}

form.cs-cf7--contact:not(.cs-cf7--blog) textarea {
  height: 66.8px;
}

form.cs-cf7 small {
  display: block;
  color: #231f20;
  font-size: 14px;
}

form.cs-cf7 input[type="submit"] {
  box-sizing: border-box;
  width: 100%;
  margin: 20px 0 0;
  padding: 10px 20px;
  border: 0;
  border-radius: 0;
  background: #0ab0d8;
  color: #fff;
  font: 400 18px/1.15 "CS Hero Poppins", Poppins, sans-serif;
  white-space: normal;
  cursor: pointer;
}

/* Colors correspond to the measured embedded page for each local form. */
form.cs-cf7--contact:not(.cs-cf7--blog) input[type="submit"] {
  background: #d21034;
}

form.cs-cf7--blog input[type="submit"] {
  background: #f7849f;
}

.wpcf7[data-wpcf7-id="1000832"] form.cs-cf7 input[type="submit"] {
  background: #00209f;
}

form.cs-cf7 h2 {
  color: #231f20;
  font: 500 30px/1.2 "CS Hero Poppins", Poppins, sans-serif;
}

form.cs-cf7 h2 + p em {
  color: #231f20;
  font-size: 14px;
  font-style: normal;
}

form.cs-cf7 .wpcf7-not-valid-tip {
  color: #f2545b;
}

/* ==========================================================================
   /request-a-custom-translation/ (page 456247) — THE LIVE TWO-COLUMN QUOTE
   LAYOUT, rebuilt from the markup that survives the block editor.

   The live page is one HubSpot row: span8 on the left holds the h1, the lead
   and the form, span4 on the right holds the four guarantees as #FAFAFA cards
   with the 40px check on the left of the text. Measured at 1440 (viewport
   1440, page column 1220 centred at x=110): span8 x=110 w=803, span4 x=944
   w=386, cards 386 wide with 10px/25px padding, glyph cell 969..1046, title
   x=1055 w=250 at 20px/700 on a 30px line. At 390 the row stacks and the live
   card turns into glyph-above-title (card 20..370, padding 10px/25px, glyph
   box 70, 20px of air, title 300 wide, left).

   WHY THIS SHEET AND WHY `display: contents`: the owner reported the page
   "broken, not laid out like live" on the deploy, and the deployed post no
   longer carries the two `core/column` wrappers — the block editor
   re-serialized the page and flattened the row (the same class of loss the
   `html_class` re-apply in inc/cf7-page-form-classes.php exists for). A fix
   that only styles the stored columns would break again on the next edit, so
   the geometry is expressed against the elements that SURVIVE a re-save —
   `.cs-hero-band`, `.cs-form-slot`, `.cs-icon-card` — and the column wrappers
   are dissolved with `display: contents` when they are present. The layout is
   therefore identical with the columns and without them.
   assets/css/main-site-parity.css is not a home for this: functions.php
   enqueues it on four other page ids only.
   ========================================================================== */

/* The live page column: 1220px centred, so the copy starts at x=110 on a 1440 viewport (measured
   h1 x=110, form x=111, span4 right edge 1330), opening 80px under the content top (live h1
   y=169 with the content area starting at y=89; at 390 h1 y=230 with the area at y=150). Under
   1220 the live row keeps 20px of side air (measured card x=20 w=350 at 390). */
body.page-id-456247 .entry-content {
	box-sizing: border-box;
	max-width: 1220px;
	margin-left: auto;
	margin-right: auto;
	/* Live opens 80px under the content top and closes 82px under the form (measured: content
	   89..1221, form bottom 1139 at 1440; the last card's 10px margin plus the same 80 at 390). */
	padding-top: 80px;
	padding-bottom: 80px;
}

@media (max-width: 1219px) {
	body.page-id-456247 .entry-content {
		padding-left: 20px;
		padding-right: 20px;
	}
}

/* The stored hero is an empty 350px cover band whose copy is centred inside it: on live there is
   no band at all, the h1 simply opens the page. The stored block pins `min-height:350px` inline. */
body.page-id-456247 .entry-content > .cs-hero-band {
	min-height: 0 !important;
	margin: 0;
	padding: 0;
}

body.page-id-456247 .cs-hero-band .wp-block-cover__inner-container {
	display: block;
	max-width: none;
	margin: 0;
	padding: 0;
}

/* Live: h1 40px/700 on a 56px line box with 22.4px under it, lead 16px on 22.4px, 22.4px under
   that, everything flush left. Both stored blocks carry `has-text-align-center`. */
body.page-id-456247 .cs-hero-band h1 {
	margin: 0 0 22.4px;
	text-align: start;
}

body.page-id-456247 .cs-hero-band p {
	margin: 0 0 22.4px;
	text-align: start;
}

/* Live's air between the form and the first card is the card's own 10px margin (measured 11px
   between the form's bottom edge and the first card at 390); the stored blocks also carry an 18px
   bottom margin each, which the editor's flatten leaves behind and which would double that air. */
body.page-id-456247 .cs-form-slot,
body.page-id-456247 .cs-icon-card {
	margin-top: 0;
	margin-bottom: 0;
}

/* Stacked, the stored row adds its own flex gap under the form (measured 24px) before the cards,
   where live's air is the card's 10px margin plus the form's own edge. */
body.page-id-456247 .entry-content > .wp-block-columns {
	gap: 0;
	margin-bottom: 0;
}

/* The row itself. 803/386 with a 31px gutter is the measured live split of the 1220px column
   (span8 110..913, span4 944..1330), and keeping it in fr units makes it hold at any width
   instead of only at 1440. */
@media (min-width: 768px) {
	body.page-id-456247 .entry-content {
		display: grid;
		grid-template-columns: 803fr 386fr;
		column-gap: 31px;
		align-items: start;
	}

	/* Dissolve the stored column wrappers so the same three elements are the grid's children
	   whether the page kept its columns or the editor flattened them. */
	body.page-id-456247 .entry-content > .wp-block-columns,
	body.page-id-456247 .entry-content > .wp-block-columns > .wp-block-column {
		display: contents;
	}

	body.page-id-456247 .cs-hero-band {
		grid-column: 1;
		grid-row: 1;
	}

	body.page-id-456247 .cs-form-slot {
		grid-column: 1;
		grid-row: 2;
		min-width: 0;
	}

	/* The guarantees are a column that starts at the h1's line, not under the form: live's first
	   card is at y=179 (169 + its own 10px margin) while the form opens at y=293. */
	body.page-id-456247 .cs-icon-card {
		grid-column: 2;
		grid-row: 1 / span 2;
	}

	/* --- the guarantee card: live is a #FAFAFA row with 10px/25px of padding and 10px of margin. */
	body.page-id-456247 .cs-icon-card__row {
		gap: 0;
	}

	body.page-id-456247 .cs-icon-card__item {
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		width: 100%;
		gap: 9px;
		margin: 10px 0;
		padding: 10px 25px;
		background: #fafafa;
		text-align: left;
	}

	/* Live's glyph cell is 77px wide and 70px tall inside the 386px card, which centres the 40px
	   check at x=1008; the stored badge is a 50px white circle (rgb(255,255,255) from the block's
	   own colour attribute) and live paints no circle at all on this page. */
	body.page-id-456247 .cs-icon-card__badge {
		width: 77px;
		height: 70px;
		margin: 0 !important;
		padding: 0;
		border-radius: 0;
		background: transparent !important;
	}

	/* Live's title cell: 250px (386 - 2*25 - 77 - 9), 22px of air above and below the 20px/30
	   heading, and 90px tall at its shortest — the measured heights of live's four cards
	   (124/110/124/124) fall out of `10 + max(70, max(74, 90) or 104) + 10`. */
	body.page-id-456247 .cs-icon-card__textcell {
		box-sizing: border-box;
		flex: 1 1 auto;
		min-width: 0;
		min-height: 90px;
		margin: 0 !important;
		padding: 22px 0;
	}

	body.page-id-456247 .cs-icon-card__title {
		margin-block: 0;
	}
}

/* Below 768px live stacks the row and turns each card into glyph-above-title: card 350 wide with
   10px/25px of padding, glyph box 70x70 centred, 20px of air, then the title on a 300px line box
   (x=45) that stays flush LEFT while the glyph is centred. Measured card heights 184 (one line)
   and 214 (two lines) come out of 10 + 70 + 20 + (22 + 30 or 60 + 22) + 10. */
@media (max-width: 767px) {
	body.page-id-456247 .cs-icon-card__item {
		flex-direction: column;
		align-items: center;
		width: 100%;
		gap: 20px;
		margin: 10px 0;
		padding: 10px 25px;
		background: #fafafa;
	}

	body.page-id-456247 .cs-icon-card__badge {
		width: 70px;
		height: 70px;
		margin: 0 !important;
		padding: 0;
		border-radius: 0;
		background: transparent !important;
	}

	body.page-id-456247 .cs-icon-card__textcell {
		box-sizing: border-box;
		width: 100%;
		margin: 0 !important;
		padding: 22px 0;
	}

	body.page-id-456247 .cs-icon-card__title {
		margin-block: 0;
		text-align: start;
	}
}
