/* ============================================================
   NexGen Comfort Services — Quote Wizard CSS
   
   HOW TO USE:
   Add to WordPress → Appearance → Customize → Additional CSS
   OR paste below the global CSS in the same location.
   ============================================================ */

/* ----------------------------------------------------------
   QUOTE WIZARD CONTAINER
   ---------------------------------------------------------- */
.nexgen-quote-wizard {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
}

.nexgen-quote-wizard h1 {
  text-align: center;
  margin-bottom: 8px;
}

.nexgen-quote-wizard .wizard-subtitle {
  text-align: center;
  color: var(--nexgen-medium-gray);
  font-size: 17px;
  margin-bottom: 40px;
}


/* ----------------------------------------------------------
   PROGRESS BAR
   ---------------------------------------------------------- */
.quote-progress {
  margin-bottom: 40px;
}

.quote-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--nexgen-light-gray);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.quote-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--nexgen-secondary) 0%, var(--nexgen-secondary-light) 100%);
  border-radius: 10px;
  transition: width 0.4s ease;
  width: 14%;
}

.quote-progress-text {
  font-size: 13px;
  color: var(--nexgen-medium-gray);
  text-align: right;
}


/* ----------------------------------------------------------
   STEP CONTAINERS
   ---------------------------------------------------------- */
.quote-step {
  display: none;
  animation: fadeInStep 0.3s ease;
}

.quote-step:first-of-type {
  display: block;
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.quote-step .step-header {
  margin-bottom: 28px;
}

.quote-step .step-header h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.quote-step .step-header p {
  color: var(--nexgen-medium-gray);
  font-size: 15px;
}


/* ----------------------------------------------------------
   FORM ELEMENTS WITHIN WIZARD
   ---------------------------------------------------------- */
.quote-step input[type="text"],
.quote-step input[type="email"],
.quote-step input[type="tel"],
.quote-step select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--nexgen-light-gray);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--nexgen-dark-gray);
  transition: var(--transition);
  margin-bottom: 16px;
  background: var(--nexgen-white);
}

.quote-step input:focus,
.quote-step select:focus {
  border-color: var(--nexgen-secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(232,121,43,0.15);
}

.quote-step label {
  font-weight: 600;
  font-size: 14px;
  color: var(--nexgen-dark-gray);
  margin-bottom: 6px;
  display: block;
}

.conditional-fields {
  margin-top: 10px;
  padding-top: 10px;
}

/* Two-column form row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}


/* ----------------------------------------------------------
   RADIO BUTTON OPTIONS (Card-Style)
   ---------------------------------------------------------- */
.radio-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

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

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

@media (max-width: 600px) {
  .radio-options,
  .radio-options.three-col {
    grid-template-columns: 1fr;
  }
}

.radio-option {
  position: relative;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option .option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 2px solid var(--nexgen-light-gray);
  border-radius: var(--border-radius);
  transition: var(--transition);
  background: var(--nexgen-white);
}

.radio-option .option-label i {
  font-size: 20px;
  color: var(--nexgen-medium-gray);
  width: 28px;
  text-align: center;
  transition: var(--transition);
}

.radio-option .option-label .option-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.radio-option .option-label .option-text {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--nexgen-dark-gray);
  line-height: 1.3;
}

.radio-option .option-label .option-desc {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--nexgen-medium-gray);
  margin-top: 2px;
  line-height: 1.4;
}

.radio-option input:checked + .option-label {
  border-color: var(--nexgen-secondary);
  background: rgba(232,121,43,0.04);
  box-shadow: 0 0 0 1px var(--nexgen-secondary);
}

.radio-option input:checked + .option-label i {
  color: var(--nexgen-secondary);
}

.radio-option:hover .option-label {
  border-color: var(--nexgen-secondary);
}

/* Error state */
.radio-option.field-error .option-label {
  border-color: var(--nexgen-danger) !important;
}

input.field-error {
  border-color: var(--nexgen-danger) !important;
}


/* ----------------------------------------------------------
   CHECKBOX OPTIONS
   ---------------------------------------------------------- */
.checkbox-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .checkbox-options {
    grid-template-columns: 1fr;
  }
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid var(--nexgen-light-gray);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-option:hover {
  border-color: var(--nexgen-secondary);
}

.checkbox-option input[type="checkbox"] {
  accent-color: var(--nexgen-secondary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-right: 4px;
}

.checkbox-option label {
  cursor: pointer;
  margin: 0;
  font-weight: 500;
  font-size: 14px;
}


/* ----------------------------------------------------------
   NAVIGATION BUTTONS (Prev / Next)
   ---------------------------------------------------------- */
.step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--nexgen-light-gray);
}

.step-nav-prev {
  background: none;
  border: none;
  color: var(--nexgen-medium-gray);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  transition: var(--transition);
}

.step-nav-prev:hover {
  color: var(--nexgen-primary);
}

.step-nav-prev i {
  transition: var(--transition);
}

.step-nav-prev:hover i {
  transform: translateX(-3px);
}

.step-nav-next {
  background: var(--nexgen-secondary);
  color: var(--nexgen-white);
  border: none;
  padding: 14px 36px;
  border-radius: var(--border-radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-nav-next:hover {
  background: var(--nexgen-secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}


/* ----------------------------------------------------------
   REVIEW TABLE (Step 6)
   ---------------------------------------------------------- */
.review-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.review-table tr {
  border-bottom: 1px solid var(--nexgen-light-gray);
}

.review-table td {
  padding: 10px 12px;
  font-size: 14px;
}

.review-table .review-label {
  font-weight: 700;
  color: var(--nexgen-primary);
  width: 40%;
}

.review-table .review-value {
  color: var(--nexgen-dark-gray);
}


/* ----------------------------------------------------------
   RESULTS DISPLAY (Step 7)
   ---------------------------------------------------------- */
.quote-results {
  text-align: center;
  padding: 48px 24px;
  background: var(--nexgen-off-white);
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--nexgen-light-gray);
}

.quote-results .results-icon {
  font-size: 48px;
  color: var(--nexgen-success);
  margin-bottom: 16px;
}

.quote-results h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.quote-results .price-range {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.quote-results .price-amount {
  font-size: 2.75rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--nexgen-secondary);
}

.quote-results .price-divider {
  font-size: 1.5rem;
  color: var(--nexgen-medium-gray);
  font-weight: 300;
}

.quote-results .price-note {
  font-size: 14px;
  color: var(--nexgen-medium-gray);
  margin-bottom: 8px;
}

.quote-results .email-sent {
  font-size: 14px;
  color: var(--nexgen-success);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.quote-results .email-sent i {
  font-size: 16px;
}

.quote-results .results-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.quote-estimate-summary {
  margin: 16px 0 20px;
}

.estimate-summary-card {
  background: var(--nexgen-off-white);
  border: 2px solid var(--nexgen-light-gray);
  border-radius: var(--border-radius-lg);
  padding: 20px;
}

.estimate-summary-card h3 {
  color: var(--nexgen-primary);
  margin-bottom: 14px;
  text-align: center;
}

.estimate-systems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.estimate-system-card {
  background: var(--nexgen-white);
  border: 1px solid var(--nexgen-light-gray);
  border-radius: var(--border-radius);
  padding: 14px;
}

.estimate-system-card h4 {
  margin: 0 0 4px;
  color: var(--nexgen-primary);
  font-size: 16px;
}

.estimate-system-card .coverage,
.estimate-system-card .bucket {
  margin: 0;
  font-size: 13px;
  color: var(--nexgen-medium-gray);
}

.estimate-system-card .bucket {
  margin-top: 2px;
}

.estimate-system-card .price-row {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.estimate-system-card .price-row span {
  color: var(--nexgen-secondary);
  font-weight: 800;
  font-size: 20px;
  font-family: var(--font-heading);
}

.estimate-system-card .price-row small {
  color: var(--nexgen-medium-gray);
  font-size: 12px;
}

.estimate-total-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--nexgen-light-gray);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.estimate-total-row .total-label {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--nexgen-medium-gray);
}

.estimate-total-row .total-amount {
  margin: 2px 0 0;
  font-size: 30px;
  font-weight: 800;
  color: var(--nexgen-primary);
  font-family: var(--font-heading);
}

.estimate-total-row .total-monthly {
  color: var(--nexgen-secondary);
  font-weight: 700;
  font-size: 15px;
}


/* ----------------------------------------------------------
   DISCLAIMER
   ---------------------------------------------------------- */
.quote-disclaimer {
  background: #FFF8F0;
  border: 1px solid #F0D0A8;
  border-left: 4px solid var(--nexgen-secondary);
  padding: 20px 24px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin-top: 24px;
  text-align: left;
}

.quote-disclaimer h4 {
  color: var(--nexgen-secondary-dark);
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quote-disclaimer h4 i {
  font-size: 16px;
}

.quote-disclaimer p {
  font-size: 13px;
  color: var(--nexgen-dark-gray);
  line-height: 1.6;
  margin: 0;
}


/* ----------------------------------------------------------
   ERROR MESSAGE
   ---------------------------------------------------------- */
.step-error-msg {
  background: #FDECEA;
  color: var(--nexgen-danger);
  padding: 10px 16px;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  display: none;
}

.quote-error {
  text-align: center;
  padding: 32px;
  background: #FDECEA;
  border-radius: var(--border-radius-lg);
  display: none;
}

.quote-error h3 {
  color: var(--nexgen-danger);
  margin-bottom: 8px;
}

.quote-error p {
  color: var(--nexgen-dark-gray);
  font-size: 15px;
}


/* ----------------------------------------------------------
   CONDITIONAL FIELDS (shown/hidden by JS)
   ---------------------------------------------------------- */
.conditional-fields {
  display: none;
  animation: fadeInStep 0.3s ease;
}

.conditional-fields.active {
  display: block;
}


/* ----------------------------------------------------------
   VISUAL IDENTIFICATION CARDS (Step 4)
   ---------------------------------------------------------- */

/* Grid layout for the visual ID cards */
.visual-id-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.visual-id-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

.visual-id-grid.three-col {
  grid-template-columns: 1fr 1fr 1fr;
}

/* The card itself — hidden radio, styled label */
.visual-id-card {
  cursor: pointer;
  position: relative;
}

.visual-id-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visual-id-inner {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
  height: 100%;
  position: relative;
}

.visual-id-card:hover .visual-id-inner {
  border-color: var(--nexgen-primary);
  box-shadow: 0 4px 16px rgba(27, 58, 107, 0.12);
  transform: translateY(-2px);
}

.visual-id-card input[type="radio"]:checked ~ .visual-id-inner {
  border-color: var(--nexgen-secondary);
  box-shadow: 0 4px 20px rgba(196, 30, 58, 0.2);
  background: linear-gradient(135deg, #fff 0%, #FFF5F6 100%);
}

/* Checkmark badge (hidden by default, shown when selected) */
.visual-id-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--nexgen-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.25s ease;
  z-index: 2;
}

.visual-id-card input[type="radio"]:checked ~ .visual-id-inner .visual-id-badge {
  opacity: 1;
  transform: scale(1);
}

/* Image at the top of the card */
.visual-id-inner > img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* Placeholder icon when no image */
.visual-id-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  background: var(--nexgen-light-gray);
  color: var(--nexgen-medium-gray);
  font-size: 48px;
}

/* Icon block (for preferred system cards) */
.visual-id-icon-block {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  background: linear-gradient(135deg, var(--nexgen-light-gray) 0%, #f0f4f8 100%);
}

/* Card body text */
.visual-id-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.visual-id-body strong {
  font-size: 15px;
  color: var(--nexgen-dark-gray);
  line-height: 1.3;
}

.visual-id-body span {
  font-size: 13px;
  color: var(--nexgen-medium-gray);
  line-height: 1.4;
}

/* Compact variant for fuel type cards */
.visual-id-card.compact .visual-id-inner {
  padding: 0;
}

.visual-id-card.compact .visual-id-icon-block {
  height: 70px;
}

.visual-id-card.compact .visual-id-body {
  padding: 10px 14px;
}

.visual-id-card.compact .visual-id-body strong {
  font-size: 14px;
}

.visual-id-card.compact .visual-id-body span {
  font-size: 12px;
}

/* Diagram-style identification (gas furnace vs electric) */
.visual-id-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  background: linear-gradient(135deg, var(--nexgen-light-gray) 0%, #f0f4f8 100%);
}

.visual-id-diagram .diagram-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.visual-id-diagram .diagram-labels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.visual-id-diagram .diagram-tag {
  font-size: 12px;
  color: var(--nexgen-dark-gray);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}

.visual-id-diagram .diagram-tag i {
  font-size: 11px;
  flex-shrink: 0;
}

/* Comparison tip box */
.visual-id-compare .compare-tip {
  background: #FFF3E0;
  border: 1px solid #FFE0B2;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  color: #E65100;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.visual-id-compare .compare-tip i {
  flex-shrink: 0;
  margin-top: 2px;
  color: #FF9800;
}

/* Error state on visual ID cards */
.visual-id-card.field-error .visual-id-inner {
  border-color: var(--nexgen-danger) !important;
  box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.15);
  animation: shakeCard 0.3s ease;
}

@keyframes shakeCard {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Step header within conditional fields */
.conditional-fields .step-header {
  margin-bottom: 20px;
}

.conditional-fields .step-header h2 {
  font-size: 22px;
  color: var(--nexgen-primary);
  margin-bottom: 6px;
}

.conditional-fields .step-header p {
  color: var(--nexgen-medium-gray);
  font-size: 14px;
}


/* ----------------------------------------------------------
   VISUAL ID — RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .visual-id-grid {
    grid-template-columns: 1fr !important;
  }
  
  .visual-id-grid.three-col {
    grid-template-columns: 1fr 1fr !important;
  }
  
  .visual-id-inner > img {
    height: 140px;
  }
  
  .visual-id-icon-block {
    height: 80px;
  }
  
  .visual-id-diagram {
    padding: 16px 12px;
  }
  
  .conditional-fields .step-header h2 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .visual-id-grid.three-col {
    grid-template-columns: 1fr !important;
  }
  
  .visual-id-inner > img {
    height: 120px;
  }
  
  .visual-id-diagram .diagram-item {
    width: 64px;
    height: 64px;
  }
  
  .visual-id-body {
    padding: 12px;
  }
  
  .visual-id-body strong {
    font-size: 14px;
  }
  
  .visual-id-compare .compare-tip {
    font-size: 13px;
    padding: 12px;
  }
}
