/* =============================================================
   Sneak Peek – embed card, [sneak_peek_embed]
   Self-contained. Every rule is scoped under .spe, so nothing here
   restyles the page around it, and template_main.min.css is not needed.
   v1 (2.3.1): SPEC-v1-implementation.md section 1 and the WORKING signup
   frames (5287:52249), read 12 November 2026: one row 5287:52250, its error
   state 5287:52338, stacked 5287:53025, phone 5287:53787.

   The card's own width decides its arrangement, not the window's: one row
   only when every control fits with its spacing, stacked otherwise. It is a
   size container for that; fixed dropdowns and tooltips still place against
   the window (checked in Chrome).
   ============================================================= */

.spe,
.spe *,
.spe *::before,
.spe *::after {
  box-sizing: border-box;
}

.spe {
  width: 100%;
  max-width: 880px;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #344054;
  container: spe / inline-size;
}
.spe.spe--stacked {
  max-width: 560px;
}

/* ---- Wrapper: a sensible width in any parent, and the align attribute (2.4.4) ----
   Being a size container, the card counts its own content as zero wide. A parent that
   sizes itself to its content (an Elementor widget on Width "Default" in a container
   that centres its items) therefore shrank to nothing, leaving the card its 50px of
   padding. The wrapper's single column asks for 880px (560 stacked) and gives way to
   whatever space there is, so any parent sizes the card as if it had real content. It
   also places the card when the space is wider: left by default, or centred. */
.spe-wrap {
  display: grid;
  grid-template-columns: minmax(0, 880px);
  justify-content: start;
}
.spe-wrap.spe-wrap--stacked {
  grid-template-columns: minmax(0, 560px);
}
.spe-wrap.spe-wrap--center {
  justify-content: center;
}
.spe-wrap.spe-wrap--center .spe .spe-checks {
  justify-content: center;
}

/* ---- Card ---- */
.spe .spe-card {
  background: #F9FAFB;
  border: 1px solid #EAECF0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
  /* Read by sneak-peek-embed.js, so events report the arrangement actually shown */
  --spe-arrangement: stacked;
}

.spe .spe-form {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
}

/* ---- Field groups and labels ---- */
.spe .spe-group {
  min-width: 0;
}

.spe .spe-label-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spe .spe-label {
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.43;
  letter-spacing: -0.28px;
  color: #344054;
}

/* ---- Tooltip icon and bubble ---- */
.spe .spe-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  color: #344054;
  cursor: help;
  min-height: 0;
}
.spe .spe-tip:hover,
.spe .spe-tip:focus {
  background: none;
  color: #101828;
}
.spe .spe-tip:focus-visible {
  outline: 2px solid #475467;
  outline-offset: 2px;
}

/* Fixed, and placed by JS against the icon, so Elementor's overflow:hidden cannot clip it */
.spe .spe-tip__bubble {
  position: fixed;
  z-index: 100000;
  max-width: 260px;
  padding: 10px;
  border-radius: 8px;
  background: #344054;
  color: #FCFCFC;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0;
  box-shadow: none;
  pointer-events: none;
}
.spe .spe-tip__bubble[hidden] {
  display: none;
}

/* ---- Type toggle ---- */
.spe .spe-group--type .spe-toggle {
  margin-top: 8px;
}

.spe .spe-toggle {
  display: flex;
  width: 100%;
  height: 46px;
  padding: 3px;
  border-radius: 8px;
  background: #EAECF0;
}

.spe .spe-toggle__opt {
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #667085;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.32px;
  text-transform: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  min-height: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.spe .spe-toggle__opt:hover,
.spe .spe-toggle__opt:focus {
  background: transparent;
  color: #101828;
  box-shadow: none;
}
.spe .spe-toggle__opt.is-active,
.spe .spe-toggle__opt.is-active:hover,
.spe .spe-toggle__opt.is-active:focus {
  background: #FFFFFF;
  color: #101828;
}
.spe .spe-toggle__opt:focus-visible {
  outline: 2px solid #475467;
  outline-offset: 1px;
}

/* ---- Website row: [input][region] then the submit button ---- */
.spe .spe-group--site .spe-site-row {
  margin-top: 8px;
}

.spe .spe-site-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.spe .spe-fields {
  display: flex;
  flex: 1 1 280px;
  min-width: 0;
  gap: 8px;
}

.spe .spe-field {
  position: relative;
  min-width: 0;
}
.spe .spe-field--input {
  flex: 1 1 auto;
}
.spe .spe-field--region {
  flex: 0 0 auto;
}

/* ---- Website input ---- */
.spe .spe-input {
  display: block;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid #EAECF0;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: none;
  color: #101828;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0;
  text-overflow: ellipsis;
  outline: none;
  min-height: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.spe .spe-input::placeholder {
  color: #98A2B3;
  font-size: 12px;
  opacity: 1;
}
/* Active: Grey 400 border and a Grey 600 focus ring. Red only ever means a validation
   error, never focus or typing (v1 spec, section 1). */
.spe .spe-input:focus {
  border-color: #98A2B3;
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #475467;
}
.spe .spe-input.is-invalid {
  border-color: #E94F38;
}

/* ---- Region control: globe + chevron, a button beside the input ---- */
.spe .spe-region__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.spe .spe-region__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  /* Room for the region code from the start, so choosing one shifts nothing */
  width: 86px;
  height: 46px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #EAECF0;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: none;
  color: #667085;
  font-family: inherit;
  cursor: pointer;
  min-height: 0;
  transition: border-color 0.15s ease;
}
.spe .spe-region__btn:hover,
.spe .spe-region__btn:focus {
  background: #FFFFFF;
  color: #667085;
  box-shadow: none;
}
.spe .spe-region__btn:focus-visible {
  border-color: #98A2B3;
  outline: 2px solid #475467;
  outline-offset: 2px;
}
.spe .spe-region__btn.is-invalid {
  border-color: #E94F38;
  color: #E94F38;
}
.spe .spe-region__btn .spe-icon--globe {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
}
.spe .spe-region__btn .spe-icon--chevron {
  flex: 0 0 auto;
  width: 15px;
  height: 9px;
}
.spe .spe-region__value {
  display: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #101828;
}
.spe .spe-field--region.has-value .spe-region__value {
  display: inline;
}

/* ---- Submit ---- */
.spe .spe-cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 46px;
  margin: 0;
  padding: 0 14px 0 20px;
  border: 0;
  border-radius: 8px;
  background: #E94F38;
  box-shadow: none;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  min-height: 0;
  transition: background-color 0.15s ease;
}
.spe .spe-cta:hover,
.spe .spe-cta:focus {
  background: #D94030;
  color: #FFFFFF;
  box-shadow: none;
}
.spe .spe-cta:focus-visible {
  outline: 2px solid #475467;
  outline-offset: 2px;
}
.spe .spe-cta .spe-icon--chevron-right {
  flex: 0 0 auto;
  width: 10px;
  height: 17px;
  transform: scale(0.94);
}

/* ---- Inline error under the website row ---- */
.spe .spe-error {
  margin: 8px 0 0;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #C23A26;
}
.spe .spe-error[hidden] {
  display: none;
}

/* ---- Help line ---- */
.spe .spe-help {
  margin: 24px 0 0;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: #98A2B3;
}
.spe .spe-help a {
  font-weight: 600;
  color: #101828;
  text-decoration: underline;
}
.spe .spe-help a:hover,
.spe .spe-help a:focus {
  color: #E94F38;
}

/* ---- Autocomplete and region dropdowns ----
   Fixed, and placed by JS against the control on open, scroll and resize, so
   Elementor's overflow:hidden containers cannot clip them. */
.spe .field-group__results {
  display: none;
  position: fixed;
  z-index: 99999;
  max-height: 300px;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #EAECF0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
  font-size: 14px;
  line-height: 1.4;
  color: #344054;
}
.spe .field-group__results.active {
  display: block;
}
/* spData.js empties the list after a pick but leaves it marked active */
.spe .field-group__results:empty {
  display: none;
}
/* A long name is cut with an ellipsis rather than pushing the list wider */
.spe .field-group__results-item {
  margin: 0;
  padding: 8px 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spe .field-group__results-item.status {
  white-space: normal;
}
.spe .field-group__results-item:not(.status) {
  cursor: pointer;
}
.spe .field-group__results-item:not(.status).active,
.spe .field-group__results-item:not(.status):hover,
.spe .field-group__results-item:not(.status):focus {
  background: #F2F4F7;
}
.spe .field-group__results:focus,
.spe .field-group__results-item:focus {
  outline: none;
}
.spe .field-group__results-item:focus-visible {
  box-shadow: inset 3px 0 0 #475467;
}
.spe .field-group__results-item.status {
  color: #667085;
}
.spe .field-group__results-item.status.error,
.spe .field-group__results-item.status.no-results {
  color: #344054;
}

/* ---- Checkmarks under the card: a green tick, 12px Grey 400 ---- */
.spe .spe-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.spe .spe-checks li {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: normal;
  color: #98A2B3;
  list-style: none;
}
.spe .spe-checks li::before,
.spe .spe-checks li::marker {
  content: none;
}

/* =============================================================
   Stacked, the default arrangement (5287:53025): the toggle, then the
   field with the region beside it and the button beside them, then the
   help line. In a narrow card (5287:53787) the button takes its own full
   row under the fields.
   ============================================================= */
.spe .spe-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.spe .spe-group--type .spe-toggle {
  width: 220px;
  max-width: 100%;
  margin-top: 10px;
}
.spe .spe-group--site .spe-site-row {
  margin-top: 10px;
}
.spe .spe-site-row {
  flex-wrap: nowrap;
  column-gap: 18px;
}
.spe .spe-fields {
  flex: 1 1 184px;
}

/* Too narrow for the button beside the fields: card padding 50 + field 184 +
   8 + region 86 + 18 + button 176 = 522 */
@container spe (max-width: 521px) {
  .spe .spe-site-row {
    flex-wrap: wrap;
    row-gap: 12px;
  }
  .spe .spe-fields,
  .spe .spe-cta {
    flex: 1 1 100%;
  }
  .spe .spe-group--type .spe-toggle {
    width: 100%;
  }
}

/* =============================================================
   One row (5287:52250), for layout="auto" (and "inline" from before
   2.3.1) when every control fits: card padding 50 + toggle 221 + 42 +
   field at least 200 + 8 + region 86 + 14 + button 176 = 797. Without
   the toggle (mode="retailer" or "brand"), 534. The help line is not
   shown in one row.
   ============================================================= */
@container spe (min-width: 800px) {
  .spe.spe--auto .spe-card {
    --spe-arrangement: inline;
  }
  .spe.spe--auto .spe-form {
    flex-direction: row;
    align-items: flex-start;
    column-gap: 42px;
  }
  .spe.spe--auto .spe-group--type {
    flex: 0 0 221px;
  }
  .spe.spe--auto .spe-group--type .spe-toggle {
    width: 100%;
    margin-top: 8px;
  }
  .spe.spe--auto .spe-group--site {
    flex: 1 1 auto;
  }
  .spe.spe--auto .spe-group--site .spe-site-row {
    margin-top: 8px;
  }
  .spe.spe--auto .spe-site-row {
    column-gap: 14px;
  }
  .spe.spe--auto .spe-fields {
    flex: 1 1 auto;
  }
  .spe.spe--auto .spe-field--input {
    min-width: 200px;
  }
  .spe.spe--auto .spe-help {
    display: none;
  }
}
@container spe (min-width: 534px) {
  .spe.spe--auto.spe--single .spe-card {
    --spe-arrangement: inline;
  }
  .spe.spe--auto.spe--single .spe-site-row {
    column-gap: 14px;
  }
  .spe.spe--auto.spe--single .spe-fields {
    flex: 1 1 auto;
  }
  .spe.spe--auto.spe--single .spe-field--input {
    min-width: 200px;
  }
  .spe.spe--auto.spe--single .spe-help {
    display: none;
  }
}

/* =============================================================
   Phone. 767px matches Elementor's mobile breakpoint; these follow the
   screen, not the card, because they are about touch and iOS zoom.
   ============================================================= */
@media (max-width: 767px) {
  .spe .spe-card {
    padding: 20px;
  }
  /* 16px stops iOS zooming the page when the field is focused */
  .spe .spe-input {
    font-size: 16px;
  }
  .spe .spe-input::placeholder {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spe * {
    transition: none !important;
  }
}
