/* =============================================
   QUALIFIER POPUP
   ============================================= */

#qa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#qa-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#qa-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 40px 32px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.22);
  transform: translateY(16px);
  transition: transform 0.3s ease;
}

#qa-overlay.open #qa-modal {
  transform: translateY(0);
}

/* Close button */
#qa-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

#qa-close:hover {
  background: #E05C00;
  color: #fff;
}

/* Progress */
.qa-progress {
  margin-bottom: 32px;
}

.qa-progress__track {
  height: 4px;
  background: #eee;
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.qa-progress__fill {
  height: 100%;
  background: #E05C00;
  border-radius: 100px;
  transition: width 0.4s ease;
}

.qa-progress__label {
  font-size: 0.75rem;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Step header */
.qa-step-head {
  margin-bottom: 28px;
}

.qa-eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #E05C00;
  margin-bottom: 8px;
}

.qa-step-head h2 {
  font-size: 1.4375rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #111;
  margin-bottom: 6px;
}

.qa-step-head p {
  font-size: 0.9rem;
  color: #777;
  line-height: 1.55;
}

/* Fields */
.qa-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.qa-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.qa-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qa-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #333;
}

.qa-label span { color: #E05C00; }

.qa-input,
.qa-select,
.qa-textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #111;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
}

.qa-input:focus,
.qa-select:focus,
.qa-textarea:focus {
  border-color: #E05C00;
  box-shadow: 0 0 0 3px rgba(224,92,0,0.1);
}

.qa-input.error {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229,57,53,0.08);
}

.qa-textarea {
  resize: vertical;
  min-height: 96px;
}

/* Option buttons */
.qa-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qa-options--col {
  grid-template-columns: 1fr;
}

.qa-option {
  padding: 11px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #333;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  line-height: 1.4;
  user-select: none;
}

.qa-option:hover {
  border-color: #E05C00;
  background: #fff8f4;
}

.qa-option.selected {
  border-color: #E05C00;
  background: #fff3ec;
  color: #111;
  font-weight: 600;
}

/* Checkboxes */
.qa-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qa-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.qa-check:hover {
  border-color: #E05C00;
  background: #fff8f4;
}

.qa-check.checked {
  border-color: #E05C00;
  background: #fff3ec;
}

.qa-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #E05C00;
  flex-shrink: 0;
  cursor: pointer;
}

.qa-check span {
  font-size: 0.875rem;
  color: #333;
  line-height: 1.3;
}

/* Summary */
.qa-summary {
  margin-bottom: 8px;
}

.qa-summary-grid {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.qa-summary-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.875rem;
}

.qa-summary-row:last-child { border-bottom: none; }

.qa-summary-key {
  font-weight: 600;
  color: #888;
  flex-shrink: 0;
  width: 90px;
  font-size: 0.8125rem;
}

.qa-summary-val {
  color: #111;
  line-height: 1.4;
  word-break: break-word;
}

/* Nav */
.qa-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  gap: 12px;
}

.qa-btn-back {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #aaa;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.qa-btn-back:hover { color: #555; }

.qa-btn-next {
  background: #E05C00;
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 30px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.qa-btn-next:hover {
  background: #c45200;
  transform: translateY(-1px);
}

.qa-btn-next:active { transform: translateY(0); }
.qa-btn-next:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Disclaimer */
.qa-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: #bbb;
  margin-top: 16px;
}

/* Mobile */
@media (max-width: 540px) {
  #qa-modal {
    padding: 28px 20px 24px;
    border-radius: 10px;
  }

  .qa-row {
    grid-template-columns: 1fr;
  }

  .qa-options {
    grid-template-columns: 1fr;
  }

  .qa-checks {
    grid-template-columns: 1fr;
  }

  .qa-step-head h2 {
    font-size: 1.25rem;
  }
}