/* ==========================================================================
   CIW 2027 — WordPress integration layer
   Loaded AFTER ciw.css. It only (a) sizes the official CIW logo for the
   header/footer slots and (b) makes Contact Form 7's wrapper markup
   layout-transparent so the ported design renders byte-for-byte the same.
   No visual rule from ciw.css is changed here.
   ========================================================================== */

/* ---------- 1. Official CIW wordmark ---------------------------------- */
/* The source mock used a 245x99 wordmark; the official logo is 2102x995,
   so size by height to keep the same optical weight inside the 105px bar. */
.ciw-page .brand img { width: auto; height: 74px; }
@media (max-width: 1100px) { .ciw-page .brand img { height: 64px; } }
@media (max-width: 680px)  { .ciw-page .brand img { height: 56px; } }
.ciw-page .site-footer img { width: auto; height: 68px; }

/* ---------- 2. Contact Form 7 structural reset ------------------------ */
/* CF7 wraps every control in extra <span>/<div> elements. `display:contents`
   removes them from the box tree, so the inner <input>/<label> lands exactly
   where the original static markup put it. */
.ciw-page .wpcf7,
.ciw-page .wpcf7-form-control-wrap,
.ciw-page .wpcf7 > form > .ciw-row,
.ciw-page .ciw-row,
.ciw-page .wpcf7-acceptance,
.ciw-page .wpcf7-checkbox,
.ciw-page .wpcf7-acceptance > .wpcf7-list-item,
.ciw-page .wpcf7-checkbox > .wpcf7-list-item { display: contents; }

.ciw-page .ciw-row[hidden],
.ciw-page .wpcf7 .ciw-row[hidden] { display: none; }

/* CF7 injects these; keep them accessible but out of the layout. */
.ciw-page .screen-reader-response {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
/* The landing page renders its own status element (#form-message /
   #perk-gate-status), so CF7's duplicate output stays hidden. */
.ciw-page .wpcf7-response-output { display: none !important; }
.ciw-page .wpcf7-spinner { display: none !important; }

/* ---------- 3. Acceptance rows ---------------------------------------- */
/* Flattened CF7 acceptance markup is <label><input><span>…</span></label>,
   i.e. the same shape as the original `.consent-row` / `.perk-consent`. */
.ciw-page .ciw-interest-form .wpcf7-acceptance label,
.ciw-page .ciw-interest-form .wpcf7-checkbox label {
  display: flex; gap: 9px; margin-top: 15px; font-size: 10px;
  line-height: 1.55; color: #bccbc7; align-items: flex-start; cursor: pointer;
}
.ciw-page .ciw-interest-form .wpcf7-acceptance label input,
.ciw-page .ciw-interest-form .wpcf7-checkbox label input {
  accent-color: var(--mint); width: 15px; height: 15px;
  flex-shrink: 0; margin: 1px 0 0;
}
.ciw-page .ciw-interest-form .wpcf7-acceptance label a,
.ciw-page .ciw-interest-form .wpcf7-checkbox label a { text-decoration: underline; color: var(--cream); }
.ciw-page #promo-terms-row .wpcf7-acceptance label a { color: var(--yellow); }
.ciw-page #marketing-row .wpcf7-acceptance label { margin-top: 7px; }
.ciw-page #marketing-row .wpcf7-acceptance label em { font-style: normal; color: #829f9b; }

.ciw-page .ciw-perk-form .wpcf7-acceptance label {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 12px; line-height: 1.55; color: #cfdbd7;
}
.ciw-page .ciw-perk-form .wpcf7-acceptance label input {
  width: 17px; height: 17px; flex-shrink: 0;
  accent-color: var(--mint); margin-top: 2px;
}
.ciw-page .ciw-perk-form .wpcf7-acceptance label .text-button { color: var(--mint); text-decoration: underline; }

/* ---------- 4. Validation tips ---------------------------------------- */
.ciw-page .wpcf7-not-valid-tip {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: 0;
  color: var(--coral); margin-top: 5px; text-transform: none;
}
.ciw-page .wpcf7-not-valid { border-color: var(--coral) !important; }

/* ---------- 4b. Provider (partner offer) form ------------------------- */
/* CF7 radio/checkbox groups rendered with the landing page's chip look.
   These win over the display:contents reset above on specificity. */
.ciw-page .ciw-provider-form .ciw-chips .wpcf7-form-control {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.ciw-page .ciw-provider-form .ciw-chips .wpcf7-list-item { display: inline-block; margin: 0; }
.ciw-page .ciw-provider-form .ciw-chips label { position: relative; cursor: pointer; display: inline-block; }
.ciw-page .ciw-provider-form .ciw-chips label input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.ciw-page .ciw-provider-form .ciw-chips .wpcf7-list-item-label {
  display: inline-block; border: 1px solid rgba(252,246,234,.32);
  padding: 9px 10px; color: #d6ded9; font-size: 10px; font-weight: 700;
  transition: .15s;
}
.ciw-page .ciw-provider-form .ciw-chips label:hover .wpcf7-list-item-label {
  border-color: var(--mint); color: var(--mint);
}
.ciw-page .ciw-provider-form .ciw-chips label:has(input:checked) .wpcf7-list-item-label {
  background: var(--mint); border-color: var(--mint); color: #06343a;
}
.ciw-page .ciw-provider-form .ciw-chips label:has(input:focus-visible) {
  outline: 3px solid var(--yellow); outline-offset: 2px;
}
.ciw-page .ciw-provider-form .wpcf7-acceptance label {
  display: flex; gap: 9px; margin-top: 15px; font-size: 10px;
  line-height: 1.55; color: #bccbc7; align-items: flex-start; cursor: pointer;
}
.ciw-page .ciw-provider-form .wpcf7-acceptance label input {
  accent-color: var(--mint); width: 15px; height: 15px; flex-shrink: 0; margin: 1px 0 0;
}

/* Textarea, matching .text-input from ciw.css. */
.ciw-page .ciw-textarea {
  margin-top: 8px; border: 1px solid rgba(255,255,255,.5); background: #f8f6ef;
  color: #102d32; width: 100%; min-height: 104px; border-radius: 0;
  padding: 11px 13px; font-size: 12px; font-family: var(--sans); outline: 0;
  resize: vertical; display: block;
}
.ciw-page .ciw-textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 2px var(--mint); }
.ciw-page .ciw-textarea::placeholder { color: #849193; }

/* ---------- 4c. Simple inner page shell ------------------------------- */
.ciw-page .ciw-inner-hero { padding: clamp(46px, 7vw, 92px) 0 0; }
.ciw-page .ciw-inner-hero h1 {
  font-family: var(--display); font-size: clamp(42px, 6.6vw, 86px);
  line-height: .94; letter-spacing: -.035em; margin: 14px 0 0;
}
.ciw-page .ciw-inner-lead {
  font-size: 14px; line-height: 1.6; color: #bccbc7; max-width: 640px; margin: 18px 0 0;
}
.ciw-page .ciw-inner-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%);
  gap: clamp(28px, 4vw, 64px); align-items: start;
  padding: clamp(30px, 4vw, 58px) 0 clamp(54px, 7vw, 104px);
}
.ciw-page .ciw-inner-grid > * { min-width: 0; }
.ciw-page .ciw-inner-grid .notice-strip {
  flex-direction: column; align-items: flex-start; gap: 8px;
}
@media (max-width: 1010px) { .ciw-page .ciw-inner-grid { grid-template-columns: 1fr; } }

/* ---------- 5. reCAPTCHA badge ---------------------------------------- */
.ciw-page .grecaptcha-badge { z-index: 40; }

/* ---------- 6. WordPress admin bar ------------------------------------ */
.ciw-page.admin-bar .site-header { top: 0; }
