/* ==========================================
   Windshield Quote (page-windshield-quote.php) and the "send this quote" page.
   Built on the Contact page's form styles and the Track page's "How it works" card.
   ========================================== */

/* A long form of option rows reads best left-aligned, also on phones (where contact cards are centred). */
.contact-card.quote-card,
.contact-card .quote-card {
  text-align: left;
}

/* Address suggestions under the mobile service address */
.quote-address-field {
  position: relative;
}

.quote-address-list {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  background: #ffffff;
  border: 1px solid #d9dfe1;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(31, 36, 38, 0.16);
  max-height: 240px;
  overflow-y: auto;
}

.quote-address-list li {
  margin: 0;
  padding: 9px 10px;
  border-radius: 5px;
  color: #1f2426;
  font-size: 0.92rem;
  line-height: 1.3;
  cursor: pointer;
}

.quote-address-list li:hover,
.quote-address-list li.is-active {
  background: #f4f5f5;
}

.quote-address-list li.quote-address-credit,
.quote-address-list li.quote-address-credit:hover {
  padding: 2px 10px 0;
  background: none;
  color: #6b7375;
  font-size: 0.7rem;
  text-align: right;
  cursor: default;
}

/* Home page: the two tabs at the top of the form card */
.form-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 14px;
  background: var(--mechanic-soft);
}

.form-tabs[hidden] {
  display: none;
}

.form-tabs button {
  min-height: 44px;
  padding: 8px 6px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--mechanic-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.form-tabs button:hover {
  color: var(--mechanic-navy);
  background: transparent;
}

.form-tabs button[aria-selected="true"] {
  background: var(--mechanic-navy);
  color: var(--mechanic-white);
}

/* Both tabs line up the same way, so switching doesn't shift the card. */
.contact-card [role="tabpanel"] {
  text-align: left;
}

.contact-card [role="tabpanel"] .form-response-time {
  text-align: left;
  font-weight: 600;
}

.form-tabs button:focus-visible {
  outline: 2px solid var(--mechanic-navy);
  outline-offset: 2px;
}

/* The home section colours its paragraphs for its dark background; keep these readable on the white card. */
.quote-card .form-message--success {
  color: #1e6b35;
}

.quote-card .form-message--error {
  color: #a12626;
}

.quote-card #quote_vin {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quote-card fieldset {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.quote-card legend {
  margin-bottom: 4px;
  padding: 0;
  color: var(--mechanic-ink);
  font-weight: 850;
}

.quote-card legend + .form-hint {
  margin: 0 0 10px;
}

/* the features and where: whole rows to tap (.form-group label would make them plain block labels) */
.quote-card .quote-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--mechanic-border);
  border-radius: 13px;
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.quote-card .quote-check:hover {
  border-color: #b9c3c6;
}

.quote-card .quote-check:has(input:checked) {
  border-color: var(--mechanic-navy);
  background: var(--mechanic-soft);
}

.quote-card .quote-check input {
  flex: none;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--mechanic-navy);
}

.quote-card .quote-check span {
  display: grid;
  gap: 2px;
  color: var(--mechanic-ink);
  line-height: 1.35;
}

.quote-card .quote-check b {
  font-weight: 800;
}

.quote-card .quote-check small {
  color: var(--mechanic-muted);
  font-size: 0.85rem;
}

/* the vehicle found for the VIN */
.quote-card .quote-vehicle {
  margin: 8px 0 0;
  color: var(--mechanic-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.quote-card .quote-vehicle.is-ok {
  color: #1e6b35;
}

.quote-card .quote-vehicle.is-warn {
  color: #8a4b00;
}

.quote-error {
  margin: 16px 0 0;
}

.quote-done {
  outline: none;
}

/* the shop's "send this quote" page */
.quote-send {
  width: min(560px, calc(100% - 32px));
  margin-inline: auto;
}

.quote-send .contact-card {
  text-align: left;
}

.quote-send__title {
  margin: 0 0 18px;
  color: var(--mechanic-navy);
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.quote-send__facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0 0 20px;
}

.quote-send__facts dt {
  color: var(--mechanic-muted);
  font-weight: 700;
}

.quote-send__facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.quote-send form {
  margin-bottom: 12px;
}
