/* GDR quote form - its own small stylesheet. Black, white and grays only (no accent color).
   Every class starts with "qf-" so nothing here touches the rest of the site. */

.qf, .qf *, .qf *::before, .qf *::after { box-sizing: border-box; }
.qf { width: 100%; max-width: 760px; margin: 0; color: #111; font: inherit; line-height: 1.5; container: qf / inline-size; }
.qf[hidden], .qf [hidden] { display: none !important; }

.qf-lead { margin: 0 0 16px; color: #444; font-size: 0.95rem; }
.qf-summary {
  margin: 0 0 16px; padding: 12px 14px; border: 2px solid #000; border-left-width: 8px;
  font-weight: 700; background: #fff;
}

.qf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.qf-field, .qf-group { min-width: 0; margin: 0; }
.qf-group { border: 0; padding: 0; }
.qf-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 18px; }

.qf-label, .qf-legend { display: block; margin: 0 0 6px; padding: 0; font-weight: 700; font-size: 1rem; color: #000; }
.qf-legend { font-size: 1.05rem; margin-bottom: 10px; }
.qf-optional { font-weight: 400; color: #555; }
.qf-help { margin: 6px 0 0; font-size: 0.9rem; color: #555; }

.qf-input {
  display: block; width: 100%; max-width: 100%; min-height: 50px; margin: 0;
  padding: 12px 14px; border: 1px solid #6b6b6b; border-radius: 6px;
  background: #fff; color: #111; font: inherit; font-size: 1.0625rem; /* 17px: no zoom-in on iPhones */
  -webkit-appearance: none; appearance: none;
}
.qf-textarea { min-height: 120px; resize: vertical; }
.qf-select {
  padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #000 50%), linear-gradient(135deg, #000 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.qf-input:focus { outline: 3px solid #000; outline-offset: 2px; border-color: #000; }
.qf-input:focus:not(:focus-visible) { outline-offset: 2px; }

/* Errors: shown with a thick black border and a filled "!" mark, never by color alone */
.qf-has-error .qf-input, .qf-has-error .qf-choice { border: 2px solid #000; }
.qf-error { margin: 6px 0 0; font-weight: 700; font-size: 0.95rem; color: #000; }
.qf-error::before {
  content: "!"; display: inline-block; width: 1.25em; height: 1.25em; margin-right: 0.45em;
  border-radius: 50%; background: #000; color: #fff; text-align: center; line-height: 1.25em;
  font-size: 0.85em; vertical-align: 0.05em;
}

/* Service area note under the address (shown when the ZIP is more than an hour from Cookeville) */
.qf-area {
  margin: 16px 0 0; padding: 12px 14px; border: 2px solid #000; border-left-width: 8px; border-radius: 6px;
  background: #f0f0f0; color: #000; font-size: 0.95rem;
}
.qf-area b { font-weight: 800; }
.qf-area a { color: #000; font-weight: 700; white-space: nowrap; }

/* "What's going on?" choices: big tap targets */
.qf-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.qf-choice {
  display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 0; padding: 10px 14px;
  border: 1px solid #6b6b6b; border-radius: 6px; background: #fff; cursor: pointer; font-weight: 600;
}
.qf-choice input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: #000; }
.qf-choice:has(input:checked) { border: 2px solid #000; background: #f0f0f0; }
.qf-choice:has(input:focus-visible) { outline: 3px solid #000; outline-offset: 2px; }

/* Address box + our own suggestion list (never wider than the box) */
.qf-combo { position: relative; }
.qf-suggest {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
  margin: 0; padding: 0; list-style: none; background: #fff;
  border: 2px solid #000; border-radius: 6px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  max-height: 60vh; overflow-y: auto;
}
.qf-suggest-item {
  display: block; min-height: 48px; padding: 10px 14px; cursor: pointer;
  border-top: 1px solid #ddd; overflow-wrap: anywhere; white-space: normal;
}
.qf-suggest-item:first-child { border-top: 0; }
.qf-suggest-item[aria-selected="true"], .qf-suggest-item:hover { background: #000; color: #fff; }
.qf-suggest-main { display: block; font-weight: 700; }
.qf-suggest-sub { display: block; font-size: 0.9rem; }
.qf-suggest-item[aria-selected="true"] .qf-suggest-sub, .qf-suggest-item:hover .qf-suggest-sub { color: #fff; }
.qf-suggest-credit { padding: 6px 14px; font-size: 0.75rem; color: #555; border-top: 1px solid #ddd; text-align: right; }

/* Spam trap stays out of sight (and out of reach of autofill) */
.qf-hp { display: none !important; }

.qf-actions { margin-top: 24px; }
.qf-button {
  display: block; width: 100%; min-height: 54px; margin: 0; padding: 14px 24px;
  border: 2px solid #000; border-radius: 6px; background: #000; color: #fff;
  font: inherit; font-weight: 800; font-size: 1.1rem; cursor: pointer;
}
.qf-button:hover { background: #222; }
.qf-button:focus-visible { outline: 3px solid #000; outline-offset: 3px; }
.qf-button:disabled { background: #555; border-color: #555; cursor: progress; }
.qf-alt { margin: 14px 0 0; font-size: 1rem; }
.qf-alt a, .qf-fail a, .qf-fine a { color: #000; font-weight: 700; }
.qf-fine { margin: 10px 0 0; font-size: 0.85rem; color: #555; }

.qf-done, .qf-fail {
  margin: 0; padding: 18px 20px; border: 2px solid #000; border-left-width: 8px; border-radius: 6px;
  font-size: 1.15rem; font-weight: 700; background: #fff;
}
.qf-fail { margin-top: 16px; background: #f0f0f0; }
.qf-done:focus, .qf-fail:focus { outline: 3px solid #000; outline-offset: 3px; }

/* Layout follows the width of the box the form sits in (not the screen), so it fits
   a half-width column on a desktop page as well as a phone. */
@container qf (min-width: 460px) {
  .qf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
  .qf-full { grid-column: 1 / -1; }
  .qf-button { display: inline-block; width: auto; min-width: 260px; }
}
@container qf (min-width: 360px) {
  .qf-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
}
@container qf (min-width: 600px) {
  .qf-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
