@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&display=swap");

:root {
  --rona-blue: #0046ad;
  --rona-blue-2: #0b5cd6;
  --ink: #15181d;
  --muted: #5a6472;
  --line: #e4e8ee;
  --field: #f6f8fb;
  --accent: #0a8a3f;
  --bg: #eef1f6;
  --r: 14px;
}

* { box-sizing: border-box; }

/* the [hidden] attribute must beat the display rules below (.picker / form are display:grid) */
#store-picker[hidden], #lead-form[hidden], #store-banner[hidden], #success[hidden] { display: none !important; }

html { height: 100%; }
body { min-height: 100%; }   /* min- (not fixed height) so the page grows + scrolls when content exceeds the viewport */

body {
  margin: 0;
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(0, 70, 173, 0.12), transparent 60%),
    var(--bg);
  display: grid;
  place-items: start center;
  padding: 28px 16px 48px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--r);
  box-shadow: 0 30px 70px -36px rgba(8, 24, 60, 0.45), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

/* ---------- header ---------- */
.header {
  background: linear-gradient(150deg, var(--rona-blue), var(--rona-blue-2));
  color: #fff;
  padding: 26px 28px 24px;
  position: relative;
}
.header::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px 200px at 88% -30%, rgba(255, 255, 255, 0.18), transparent 60%);
  pointer-events: none;
}
.brand-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.logo-rona { height: 22px; width: auto; display: block; }
.logo-qv { height: 30px; width: auto; display: block; }
.brand-sep {
  width: 1px; height: 26px; background: rgba(255, 255, 255, 0.32); flex: none;
}
.header h1 { font-size: 21px; font-weight: 700; margin: 0 0 4px; }
.installer { margin: 0; font-size: 14px; opacity: 0.92; }
.installer span { font-weight: 600; }

/* rep-mode store banner (inside the header) */
.store-banner { margin: 14px 0 0; font-size: 13px; opacity: 0.95; }
.store-banner strong { font-weight: 700; }
.link-btn {
  margin: 0 0 0 8px; padding: 0; font: inherit; font-size: 13px; font-weight: 600;
  color: #fff; background: none; border: 0; text-decoration: underline; cursor: pointer;
  box-shadow: none;
}
.link-btn:hover { transform: none; filter: none; opacity: 0.85; }

/* rep-mode store picker */
.picker { padding: 24px 28px 28px; display: grid; gap: 15px; }
.picker label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: #3b4453; }
.picker select {
  font-family: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 13px; border: 1px solid var(--line); background: var(--field);
  border-radius: 11px; width: 100%;
}
.picker select:focus {
  outline: 0; background: #fff; border-color: var(--rona-blue-2);
  box-shadow: 0 0 0 4px rgba(11, 92, 214, 0.13);
}

/* ---------- form ---------- */
form { padding: 24px 28px 28px; display: grid; gap: 15px; }
.intro { margin: -2px 0 4px; color: var(--muted); font-size: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: #3b4453; }
.opt { color: var(--muted); font-weight: 500; }

input, textarea {
  font-family: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 13px; border: 1px solid var(--line); background: var(--field);
  border-radius: 11px; transition: 0.16s; width: 100%;
}
textarea { resize: vertical; min-height: 66px; }
input::placeholder, textarea::placeholder { color: #9aa3b1; }
input:focus, textarea:focus {
  outline: 0; background: #fff;
  border-color: var(--rona-blue-2);
  box-shadow: 0 0 0 4px rgba(11, 92, 214, 0.13);
}

button {
  margin-top: 6px;
  font-family: inherit; font-size: 16px; font-weight: 700; color: #fff;
  background: var(--accent); border: 0; border-radius: 11px; padding: 15px;
  cursor: pointer; transition: 0.16s; box-shadow: 0 10px 22px -10px rgba(10, 138, 63, 0.8);
}
button:hover { filter: brightness(1.05); transform: translateY(-1px); }
button:active { transform: none; }

.ghost-btn {
  margin-top: 0;
  color: var(--muted); background: none;
  border: 1px solid var(--line); box-shadow: none;
  font-weight: 600; padding: 12px;
}
.ghost-btn:hover { filter: none; transform: none; border-color: var(--muted); color: var(--ink); }

.trust {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  color: var(--muted); font-size: 12.5px; margin-top: 2px;
}
.trust svg { width: 14px; height: 14px; flex: none; }

/* ---------- success ---------- */
.result { min-height: 0; }
.success {
  text-align: center; padding: 32px 28px 28px;
}
.success #new-lead { margin-top: 22px; width: 100%; }
.success .check {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px;
  background: rgba(10, 138, 63, 0.12); color: var(--accent);
  display: grid; place-items: center; font-size: 28px;
}
.success h2 { margin: 0 0 6px; font-size: 19px; }
.success p { margin: 0; color: var(--muted); font-size: 14px; }
.error-msg { color: #c2362f; font-size: 14px; font-weight: 600; text-align: center; margin-top: 4px; }

/* per-field validation errors */
input.invalid, textarea.invalid { border-color: #c2362f; background: #fff5f4; }
input.invalid:focus, textarea.invalid:focus { border-color: #c2362f; box-shadow: 0 0 0 4px rgba(194, 54, 47, 0.13); }
.field-error { color: #c2362f; font-size: 12px; font-weight: 600; }

@media (max-width: 460px) {
  .row { grid-template-columns: 1fr; }
  body { padding: 0; place-items: stretch; }
  .card { max-width: none; border-radius: 0; min-height: 100vh; box-shadow: none; border: 0; }
}
