/* Quote intake form.
   Matches the Material look of the existing Urable contact form: Roboto,
   outlined fields with floating labels, a white card on a light grey page,
   and a full-width green submit. */

:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --text: #262626;
  --muted: #6b6f76;
  --border: #b5b7bd;
  --border-hover: #8a8d94;
  --accent: #3880ff;
  --success: #2dd36f;
  --success-hover: #28ba62;
  --danger: #c5000f;
  --radius: 4px;
  --card-radius: 8px;
  --font: Roboto, "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: clamp(12px, 4vw, 40px) clamp(12px, 4vw, 24px) 56px;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font);
}

.shell { max-width: 620px; margin: 0 auto; }

.card {
  background: var(--surface);
  border-radius: var(--card-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .07), 0 1px 10px rgba(0, 0, 0, .06);
  padding: clamp(18px, 5vw, 28px);
}

.card-title { font-size: 20px; font-weight: 700; margin: 0 0 22px; color: var(--text); }
.card-intro { margin: -14px 0 22px; color: var(--muted); font-size: 14px; }

/* ------------------------------ text fields ------------------------------ */

.field { position: relative; margin-bottom: 20px; }

.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px keeps iOS Safari from zooming on focus */
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px 8px;
  height: 60px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:hover:not(:focus),
.field select:hover:not(:focus) { border-color: var(--border-hover); }

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text);
}

/* Floating label: rests centred in the field, rises once filled or focused. */
.field label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left top;
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
  transition: transform .15s ease, font-size .15s ease, color .15s ease;
  max-width: calc(100% - 30px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-24px);
  font-size: 12px;
}

.field input:focus + label { color: var(--text); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 460px) { .field-row { grid-template-columns: 1fr; } }

/* --------------------------------- select -------------------------------- */

.field select {
  appearance: none;
  padding: 8px 40px 8px 14px;
  color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='%236b6f76'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 22px;
}

/* An unchosen select shows its label text, the way the original form does. */
.field select:has(option[value=""]:checked) { color: var(--muted); }

/* -------------------------------- address -------------------------------- */

.address {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px 2px;
  margin: 0 0 20px;
}

.address legend { padding: 0 6px; font-size: 12px; color: var(--muted); }

/* The Places search box uses a placeholder rather than a floating label. */
.address-search input::placeholder { color: #9a9da3; }
.address-search input { padding: 8px 14px; }

/* Google's suggestion dropdown, kept above the fields it fills. */
.pac-container { z-index: 10000; border-radius: 4px; font-family: var(--font); }
.address .field:last-of-type { margin-bottom: 18px; }

/* -------------------------------- photos --------------------------------- */

.photos { margin: 26px 0 22px; }
.photos-title { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.photos-hint { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

.dropzone {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  transition: background .15s ease, border-color .15s ease;
}
.dropzone.dragging { border-color: var(--success); background: rgba(45, 211, 111, .07); }

.dropzone-label {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 24px 16px; cursor: pointer; color: var(--muted); text-align: left;
}
.dropzone-label .icon { width: 26px; height: 26px; flex: none; color: var(--success-hover); }
.dropzone-text { display: flex; flex-direction: column; }
.dropzone-text strong { color: var(--text); font-weight: 500; }
.dropzone-text span { font-size: 13px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.thumbs {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px;
}
.thumb {
  position: relative; aspect-ratio: 1; border-radius: var(--radius);
  overflow: hidden; border: 1px solid #e3e4e8; background: var(--bg);
}
.thumb figure { margin: 0; height: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb figcaption {
  position: absolute; inset: auto 0 0 0; font-size: 10.5px; padding: 12px 6px 4px;
  color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; cursor: pointer; padding: 0;
  background: rgba(38, 38, 38, .75); color: #fff; font-size: 14px;
  display: grid; place-items: center;
}
.thumb-remove:hover { background: rgba(38, 38, 38, .92); }

/* -------------------------------- consent -------------------------------- */

.consent {
  display: flex; align-items: flex-start; gap: 14px;
  margin: 0 0 18px; cursor: pointer; font-size: 15px; line-height: 1.35;
}
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }

.consent .box {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 2px solid var(--text); border-radius: 3px;
  background: var(--surface); transition: background .12s ease;
}
.consent input:checked + .box {
  background: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4 4L19 7' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 18px; background-position: center; background-repeat: no-repeat;
}
.consent input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(56, 128, 255, .35); }

/* Bot trap: a real person never fills this in. */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.recaptcha { margin: 0 0 18px; }

/* -------------------------------- actions -------------------------------- */

.submit {
  display: block; width: 100%;
  appearance: none; border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--success); color: #fff;
  font: 500 15px/1 var(--font); letter-spacing: .07em; text-transform: uppercase;
  padding: 16px 20px;
  transition: background .15s ease, opacity .15s ease;
}
.submit:hover:not(:disabled) { background: var(--success-hover); }
.submit:disabled { opacity: .55; cursor: progress; }
.submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.submit-quiet {
  background: transparent; color: var(--success-hover);
  border: 1px solid var(--border); margin-top: 16px;
}
.submit-quiet:hover:not(:disabled) { background: rgba(45, 211, 111, .08); }

.error { color: var(--danger); font-size: 12.5px; margin: 5px 0 0; }
.error:empty { display: none; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field.invalid input:focus, .field.invalid select:focus { box-shadow: inset 0 0 0 1px var(--danger); }

.status { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); text-align: center; }
.status.error { color: var(--danger); }

.progress { height: 4px; margin-top: 12px; border-radius: 99px; background: #e3e4e8; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--success); transition: width .2s ease; }

/* -------------------------------- success -------------------------------- */

.success { text-align: center; }
.success h2 { margin: 14px 0 8px; font-size: 20px; font-weight: 700; }
.success p { margin: 0 0 10px; color: var(--muted); }
.check {
  width: 48px; height: 48px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--success-hover); background: rgba(45, 211, 111, .15);
}
.check svg { width: 26px; height: 26px; }
.reference { font-size: 13px; }
.reference code {
  background: var(--bg); border: 1px solid #e3e4e8; border-radius: 3px;
  padding: 2px 7px; font-size: 12.5px;
}

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