/* QGP Estimator — styled to match NSP modal exactly */

/* ── Reset (scoped to overlay only) ── */
.qgp-overlay *, .qgp-overlay *::before, .qgp-overlay *::after {
  box-sizing: border-box;
}

/* ── Overlay ── */
.qgp-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

/* ── Modal box ── */
.qgp-modal {
  background-color: #ffffff;
  border-radius: 0;
  padding: 36px 40px 40px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  transition: max-width 0.25s ease;
}

/* The contact form (screen 3) carries more fields than the selector
   screens, so the modal widens for it. Toggled from showScreen(). */
.qgp-modal.qgp-modal-wide {
  max-width: 920px;
}

/* ── Close button ── */
.qgp-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: #111111;
  padding: 0;
}
.qgp-modal-close:hover { color: #555555; }

/* ── Logo ── */
.qgp-modal-logo {
  display: block;
  margin-bottom: 20px;
  max-width: 300px;
  width: 100%;
  height: auto;
}

/* ── Title with trailing rule ── */
.qgp-modal-title {
  color: #111111;
  font-family: inherit;
  font-weight: 400;
  font-size: 1.6rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}
.qgp-modal-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #cccccc;
}

.qgp-modal-intro {
  color: #333333;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

/* ── Screens ── */
.qgp-screen { display: none; }
.qgp-screen.qgp-active { display: block; }

/* ── Screen 1 form rows ── */
.qgp-form-row {
  display: grid;
  gap: 24px 20px;
  margin-bottom: 24px;
}
.qgp-form-row-2 { grid-template-columns: 1fr 1fr; }
.qgp-form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Quote form grid (matches NSP: 2 cols) ── */
.qgp-quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 20px;
}

/* ── Field: input on top, label below ── */
.qgp-field {
  display: flex;
  flex-direction: column;
}

.qgp-field select,
.qgp-field input {
  background-color: transparent;
  border: 1px solid #e2e2e2;
  border-radius: 0;
  color: #111111;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.qgp-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23111111' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.qgp-field select:focus,
.qgp-field input:focus {
  border-color: #aaaaaa;
}

.qgp-field input::placeholder { color: transparent; }

.qgp-field label {
  color: #555555;
  font-size: 0.8rem;
  margin-top: 6px;
}

.qgp-field select:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ── Full-width fields ── */
.qgp-field-full,
.qgp-submit-row {
  grid-column: 1 / -1;
}

/* ── Submit button (matches NSP exactly) ── */
.qgp-modal-submit {
  background-color: #111111;
  border: none;
  border-radius: 0;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 40px;
  text-transform: uppercase;
  transition: background-color 0.2s;
  width: 100%;
  margin-top: 8px;
}
.qgp-modal-submit:hover    { background-color: #333333; }
.qgp-modal-submit:disabled { background-color: #cccccc; cursor: default; }

/* ── Back link ── */
.qgp-back-link {
  background: none;
  border: none;
  color: #555555;
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0;
  margin-bottom: 20px;
  text-decoration: underline;
  display: block;
}
.qgp-back-link:hover { color: #111111; }

.qgp-form-error {
  color: #cc0000;
  font-size: 0.9rem;
  margin-top: 12px;
}

/* ── Disclaimer ── */
.qgp-disclaimer {
  font-size: 0.7rem;
  color: #888888;
  margin-top: 14px;
  margin-bottom: 0;
  line-height: 1.5;
}

/* ── Results table (screen 2) ── */
.qgp-results-summary {
  font-size: 0.8rem;
  color: #555555;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
.qgp-results-summary strong { color: #111111; font-weight: 700; }

.qgp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.qgp-table thead th {
  background-color: #111111;
  color: #ffffff;
  font-weight: 400;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  text-align: left;
  text-transform: uppercase;
}
.qgp-table tbody td {
  border-bottom: 1px solid #e2e2e2;
  color: #333333;
  padding: 9px 12px;
}
.qgp-table tbody tr:last-child td { border-bottom: none; }
.qgp-table tbody tr:nth-child(even) td { background-color: #f8f8f8; }
.qgp-table tbody tr { cursor: pointer; }
/* Dark grey, not black — keeps the selected row distinct from the
   black header row above it. */
.qgp-table tbody tr.qgp-selected td {
  background-color: #555555 !important;
  color: #ffffff;
}
.qgp-check-col { width: 28px; padding-left: 12px; padding-right: 0; }
.qgp-table tbody .qgp-check-col::after { content: ''; }
.qgp-table tbody tr.qgp-selected .qgp-check-col::after {
  content: '✓';
  font-weight: 700;
  color: #ffffff;
}

.qgp-no-results {
  font-size: 0.875rem;
  color: #555555;
  padding: 16px 0;
}

/* ── Note text inside a label ── */
.qgp-note { color: #888888; }

/* ── Request quote button row ── */
.qgp-request-row { margin-top: 18px; }

/* ── Quote selected summary ── */
.qgp-selected-info {
  font-size: 0.8rem;
  color: #555555;
  margin-bottom: 16px;
  line-height: 1.6;
}
.qgp-selected-info strong { color: #111111; }

/* ── Marketing / TCPA consent copy above the submit button ── */
.qgp-consent {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  line-height: 1.5;
  color: #888888;
  margin: 4px 0 0;
}

/* ── Confirmation ── */
.qgp-confirm-message {
  font-size: 1rem;
  color: #111111;
  line-height: 1.6;
  margin-bottom: 24px;
}
.qgp-confirm-summary {
  background-color: #f8f8f8;
  padding: 18px 20px;
  font-size: 0.875rem;
  color: #333333;
}
.qgp-confirm-summary p { margin: 0 0 8px; }
.qgp-confirm-summary p:last-child { margin-bottom: 0; }

/* ── Spinner ── */
.qgp-spinner {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.qgp-spinner-inner {
  width: 38px;
  height: 38px;
  border: 4px solid #dddddd;
  border-top-color: #111111;
  border-radius: 50%;
  animation: qgp-spin 0.7s linear infinite;
}
@keyframes qgp-spin { to { transform: rotate(360deg); } }

/* ── Mobile ── */
@media (max-width: 560px) {
  .qgp-modal { padding: 28px 20px 24px; }
  .qgp-form-row-2,
  .qgp-form-row-3,
  .qgp-quote-form { grid-template-columns: 1fr; }
  .qgp-modal-title { font-size: 1.25rem; white-space: normal; }
}
