/* ==========================================================================
   JV w/Randy — Seller Lead Form (static QA/QC clone)
   Styles derived from live computed styles of
   https://link.reicb.com/widget/form/AzLJTNJyTA6WE4IzXtUq
   ========================================================================== */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  /* Philadelphia skyline — fixed full-bleed cover */
  background-image: url("../img/philadelphia-skyline.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: top center;
  font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  -webkit-font-smoothing: antialiased;
}

.page-wrap {
  display: flex;
  justify-content: center;
  padding: 30px 15px 60px;
}

/* ---- Lavender card ---- */
.builder-form {
  width: 100%;
  max-width: 650px;
  background-color: #C4CBD9;              /* #C4CBD9FF */
  border: 2px solid rgba(6, 6, 6, 0.26);  /* #06060642 */
  border-radius: 15px;
  padding: 30px 40px;
  color: #607179;
}

.field-row { margin-bottom: 16px; }

/* ---- Slate-blue bars (title, subtext, section headers, banners) ---- */
.slate-bar {
  background-color: #495C8E;              /* #495C8EFF */
  color: #FFFFFF;
  border-radius: 10px;
  padding: 10px 20px;
  font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
.slate-bar--title {
  text-align: center;
  font-weight: 400;
}
.slate-bar--subtext {
  text-align: center;
  font-weight: 400;
}
.section-bar {
  text-align: center;
  font-weight: 400;
  letter-spacing: 0.2px;
}

/* ---- Labels ---- */
.field-label {
  display: block;
  color: #555555;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.req { color: #555555; }

/* ---- Text inputs / textarea / select ---- */
.text-input {
  display: block;
  width: 100%;
  background-color: #FFFFFF;
  color: #555555;
  border: 0;
  border-radius: 10px;
  padding: 15px 10px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 300;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.text-input::placeholder { color: #8C8C8C; opacity: 1; }
.textarea { resize: vertical; min-height: 70px; line-height: 1.5; }

/* ---- Two-column (City / State) ---- */
.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.field-row.half .text-input { width: calc(50% - 8px); }

/* ---- Phone (intl-tel-input look) ---- */
.tel-wrap { position: relative; }
.tel-flag {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  z-index: 2;
}
.flag-us {
  display: inline-block;
  width: 20px;
  height: 15px;
  border-radius: 2px;
  background:
    linear-gradient(#b22234 0 0) 0 0/100% 100%;
  background-image:
    repeating-linear-gradient(#b22234 0, #b22234 11.5%, #fff 11.5%, #fff 23%);
  position: relative;
  overflow: hidden;
}
.flag-us::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 40%;
  height: 53%;
  background: #3c3b6e;
}
.tel-caret { font-size: 9px; color: #555; }
.text-input.has-flag { padding-left: 48px; }

/* ---- Address autocomplete (magnifier) ---- */
.autocomplete-wrap { position: relative; }
.autocomplete-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.text-input.has-search { padding-left: 40px; }

/* ---- Radio group ---- */
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #555555;
  cursor: pointer;
}
.radio-opt input[type="radio"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #495C8E;
  flex: 0 0 auto;
}

/* ---- Select dropdowns ---- */
.select-wrap { position: relative; }
.select-input { cursor: pointer; padding-right: 34px; color: #555555; }
.select-input:invalid { color: #8C8C8C; }
.select-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #8C8C8C;
  pointer-events: none;
}

/* ---- Upload box ---- */
.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #FFFFFF;
  border: 3px solid #CCCCCC;
  border-radius: 10px;
  padding: 34px 10px;
  cursor: pointer;
  text-align: center;
}
.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.upload-help {
  color: #8C8C8C;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 300;
}

/* ---- Submit button ---- */
.submit-row { margin-top: 24px; margin-bottom: 0; }
.submit-btn {
  width: 100%;
  background: #495C8E;                    /* #495C8EFF */
  color: #FFFFFF;
  border: 0;
  border-radius: 30px;
  padding: 11px 10px;
  font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  white-space: normal;
}
.submit-btn:hover { filter: brightness(1.05); }

/* ---- Thank-you / success message ---- */
.thank-you {
  width: 100%;
  max-width: 650px;
  background-color: #008BFB;
  color: #FFFFFF;
  border-radius: 10px;
  padding: 48px;
  font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  text-align: center;
}

/* ---- Mobile ---- */
@media (max-width: 1024px) {
  html, body {
    background-image: url("../img/philadelphia-skyline.jpg");
    background-attachment: fixed;
  }
}
@media (max-width: 560px) {
  .builder-form { padding: 24px 20px; }
  /* Live keeps City/State side-by-side even on mobile */
  .field-grid-2 { gap: 12px; }
  .field-row.half .text-input { width: 100%; }
}

/* ==========================================================================
   Clone-subtree isolation (Mission Control clone host).
   The clone is served inside our app whose Tailwind preflight sets
   html{line-height:1.5} + the app <body> sets its own font inline. Both are
   INHERITED into the clone subtree, shifting text metrics vs the standalone
   deploy. Re-assert the clone's own body font + the browser-default line-height
   on the wrapper so descendants inherit exactly what they do live. Scoped to
   .site-root only — does not touch the real <html>/<body> or the app.
   ========================================================================== */
.site-root {
  font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: normal;
}

/* Tailwind preflight (the host app) zeroes UA margins on flow elements
   (h1–h6, p, ul, ol, blockquote, figure, hr, dl/dd). The standalone clone relies
   on those default margins. Roll them back inside the clone subtree only. Selector
   specificity is 0,0,1 (bare element; .site-root is inside :where = 0) — it ties
   Tailwind preflight's own `h1{margin:0}` reset and wins by load order, while any
   real clone rule (a class, >=0,1,0) still beats it. */
:where(.site-root) h1, :where(.site-root) h2, :where(.site-root) h3, :where(.site-root) h4, :where(.site-root) h5, :where(.site-root) h6, :where(.site-root) p, :where(.site-root) ul, :where(.site-root) ol, :where(.site-root) blockquote, :where(.site-root) figure, :where(.site-root) hr, :where(.site-root) dl, :where(.site-root) dd, :where(.site-root) pre {
  margin: revert;
}
