/* bizmaxPRO internal tools.
 * Tokens and rhythm copied from services/lead-api/templates/*.html so this reads as the
 * same company that sends the client emails: navy bands top and bottom, red eyebrows,
 * #f6f8fb cards with a #dde3ec hairline, Montserrat throughout. */

:root{
  --navy:      #1b2335;
  --navy-soft: #6f7a92;   /* footer address line in the emails */
  --navy-mute: #c3cad8;   /* footer body line in the emails */
  --red:       #e63c36;
  --red-deep:  #c92f29;
  --green:     #12b76a;
  --blue:      #1a73e8;
  --card:      #f6f8fb;
  --line:      #dde3ec;
  --text:      #4a5568;
  --muted:     #98a2b3;
  --font: Montserrat, 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --wrap:      720px;   /* reading column, same as the emails */
  --wrap-wide: 1040px;  /* the generator needs two comfortable columns */
  --radius:    12px;
  --radius-btn:11px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  background: #ffffff;
  font-family: var(--font);
  font-size: 16px;
  line-height: 26px;
  color: var(--text);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
img{ display: block; max-width: 100%; height: auto; border: 0; }
a{ color: var(--blue); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* ── Navy bands, exactly the email header and footer ── */
.band{ background-color: var(--navy); text-align: center; }
.band-top{ padding: 26px 24px 24px; }
.band-top img{ width: 160px; max-width: 60%; margin: 0 auto; }
.band-bottom{ padding: 30px 24px 28px; margin-top: auto; }
.band-bottom img{ width: 132px; max-width: 50%; margin: 0 auto 16px; }
.band-bottom p{
  margin: 0 auto;
  max-width: 400px;
  font-size: 15px;
  line-height: 24px;
  color: var(--navy-mute);
}
.band-bottom .addr{
  margin-top: 18px;
  font-size: 12px;
  line-height: 18px;
  color: var(--navy-soft);
}

/* ── Shell ── */
main{
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px 24px 40px;
}
main.wide{ max-width: var(--wrap-wide); }

.eyebrow{
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 12px;
}
h1{
  margin: 0;
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--navy);
}
h2{
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  color: var(--navy);
}
.sub{ margin: 16px 0 0; font-size: 16px; line-height: 26px; color: var(--text); }

/* ── Cards ── */
.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card + .card{ margin-top: 18px; }

/* ── Fields ── */
.field{ margin-bottom: 18px; }
.field:last-child{ margin-bottom: 0; }
label,
.field-label{
  display: block;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
.req{ color: var(--red); }

input[type="text"],
input[type="password"],
select,
textarea{
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  color: var(--navy);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-height: 44px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card input[type="text"],
.card input[type="password"],
.card select,
.card textarea{ background: #ffffff; }
textarea{ resize: vertical; min-height: 96px; }
select{
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 8l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
input::placeholder, textarea::placeholder{ color: var(--muted); }

/* ── Custom listbox, ARIA select-only combobox pattern ── */
.sel{ position: relative; }
.sel-btn{
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sel-btn:hover{ border-color: #c6cfdd; }
.sel-btn:focus-visible,
.sel-btn[aria-expanded="true"]{
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230,60,54,.12);
}
.sel-btn[disabled]{ background: var(--card); color: var(--muted); cursor: default; }
.sel-btn.is-invalid{ border-color: var(--red); background: #fff7f6; }
.sel-value{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-value.is-placeholder{ color: var(--muted); font-weight: 400; }
.sel-caret{ width: 20px; height: 20px; color: var(--muted); flex: none; }

.sel-list{
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(27,35,53,.14), 0 2px 6px rgba(27,35,53,.06);
  max-height: 302px;
  overflow-y: auto;
}
.sel-group{
  padding: 10px 10px 6px;
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.sel-opt{
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.sel-opt .sel-sub{ font-size: 13px; font-weight: 400; color: var(--muted); }
.sel-opt.is-active{ background: var(--card); }
.sel-opt[aria-selected="true"]{ background: var(--navy); color: #ffffff; }
.sel-opt[aria-selected="true"] .sel-sub{ color: rgba(255,255,255,.72); }
.sel-opt[aria-selected="true"].is-active{ background: #141a29; }

.money-input{ position: relative; }
.money-input span{
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
}
.money-input input{ padding-left: 30px; }
input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230,60,54,.12);
}
input.is-invalid, select.is-invalid, textarea.is-invalid{ border-color: var(--red); background: #fff7f6; }
.hint{ margin: 7px 0 0; font-size: 13px; line-height: 19px; color: var(--muted); }
.err{ margin: 7px 0 0; font-size: 13px; line-height: 19px; font-weight: 600; color: var(--red); }

/* ── Buttons ── */
.btn{
  font-family: var(--font);
  font-size: 17px;
  line-height: 23px;
  font-weight: 700;
  color: #ffffff;
  background: var(--red);
  border: 0;
  border-radius: var(--radius-btn);
  width: 100%;
  min-height: 50px;
  padding: 13px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.btn:hover:not(:disabled){ transform: translateY(-1px); background: var(--red-deep); }
.btn:active:not(:disabled){ transform: translateY(0); }
.btn:disabled{ opacity: .75; cursor: default; }
.btn:focus-visible{ outline: none; box-shadow: 0 0 0 3px rgba(230,60,54,.35); }

.btn-quiet{
  font-size: 13px;
  line-height: 19px;
  font-weight: 600;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: auto;
  min-height: 34px;
  padding: 6px 14px;
}
.btn-quiet:hover:not(:disabled){ transform: none; background: var(--card); color: var(--navy); }
.btn-quiet.is-copied{ background: var(--green); border-color: var(--green); color: #ffffff; }

/* spinner shown while Stripe is working */
.spin{
  width: 17px; height: 17px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ── Gate ── */
.gate-wrap{ max-width: 440px; margin: 0 auto; text-align: center; }
.gate-wrap h1{ font-size: 27px; line-height: 34px; }
.gate-wrap .sub{ margin-bottom: 24px; }
.gate-wrap .card{ text-align: left; }

/* ── Generator layout ── */
.cols{ display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 721px){
  .cols{ grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 26px; align-items: start; }
  .col-result{ position: sticky; top: 24px; }
}

.head-row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

/* ── Result panel ── */
.result-empty{
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 34px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
}
.result-empty svg{ width: 30px; height: 30px; margin: 0 auto 10px; color: #ccd3e0; }

.out-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.out-head .field-label{ margin: 0; }

.link-box{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 21px;
  word-break: break-all;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--navy);
}

/* the message stays editable but reads like the message it will become */
.msg-box{
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 15px;
  line-height: 25px;
  color: var(--navy);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 200px;
  max-height: 52vh;
  overflow-y: auto;
}
.msg-box:focus{ outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(230,60,54,.12); }

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 19px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}
.pill-info{ background: rgba(26,115,232,.08); color: var(--blue); }

/* ── Notices ── */
.notice{ border-radius: var(--radius); padding: 14px 16px; font-size: 15px; line-height: 23px; }
.notice-warn{ background: #fff7f6; border: 1px solid rgba(230,60,54,.35); }
.notice-warn strong{ display: block; color: var(--red); font-weight: 700; }
.notice-warn span{ display: block; color: var(--text); font-size: 14px; line-height: 22px; margin-top: 2px; }
.notice-err{
  background: #fff7f6;
  border: 1px solid rgba(230,60,54,.35);
  color: var(--navy);
  font-weight: 600;
  margin-top: 18px;
}

.confirm-row{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.confirm-row input{ width: 20px; height: 20px; min-height: 0; accent-color: var(--red); flex: none; }

.sr-only{
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden]{ display: none !important; }

/* ── Phone ── */
@media (max-width: 720px){
  main{ padding: 26px 18px 32px; }
  h1{ font-size: 27px; line-height: 34px; }
  .sub{ font-size: 15px; line-height: 24px; }
  .card{ padding: 18px; }
  .head-row{ margin-bottom: 20px; }
  .msg-box{ max-height: none; }
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Money input ──────────────────────────────────────────────────────────────
   input[type="number"] was missing from the base field selector list above, so the custom
   amount box fell back to browser defaults: shrunken width, square corners, mismatched
   border and height. It sits directly between two full-width selects, so it has to carry
   the same geometry or the column visibly breaks. */
input[type="number"]{
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-height: 44px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
/* Spinner arrows crowd the currency symbol and let a stray scroll silently change a price,
   so they come off. */
input[type="number"]{ appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }

/* The amount is the one number on this page that costs money if it is misread, so it gets
   weight and tabular figures rather than the default proportional ones. */
.money-input input{
  padding-left: 34px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.money-input span{
  font-size: 16px;
  line-height: 24px;
  color: var(--navy);
  opacity: .55;
}
