/* GC HVAC Instant Quote System - Styles */

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand-primary: #C62828;
  --brand-primary-dark: #B71C1C;
  --brand-secondary: #1565C0;
  --cta-primary: #2E7D32;
  --cta-primary-hover: #1B5E20;
  --charcoal: #1A1A1A;
  --cream: #F8F9FA;
  --white: #FFFFFF;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--charcoal);
  background-color: var(--gray-100);
  min-height: 100vh;
}

/* ========== Header ========== */
header {
  background: var(--charcoal);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  color: var(--white);
  font-weight: 700;
  font-size: 1.3rem;
}

.logo-text span {
  color: var(--brand-primary);
}

.header-phone {
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-phone:hover {
  color: var(--brand-primary);
}

/* ========== Main Container ========== */
.quote-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

/* ========== Progress Bar ========== */
.form-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
  padding: 0 10px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.progress-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.progress-step.active .progress-number {
  background: var(--brand-primary);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.2);
}

.progress-step.completed .progress-number {
  background: var(--cta-primary);
  color: var(--white);
}

.progress-step.completed .progress-number::after {
  content: '\2713';
}

.progress-step span {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.progress-step.active span {
  color: var(--brand-primary);
  font-weight: 600;
}

.progress-step.completed span {
  color: var(--cta-primary);
}

.progress-line {
  width: 60px;
  height: 3px;
  background: var(--gray-200);
  margin: 0 10px;
  margin-bottom: 24px;
  transition: background 0.3s ease;
}

.progress-line.completed {
  background: var(--cta-primary);
}

/* ========== Form Card ========== */
.quote-form-container {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
}

/* ========== Form Steps ========== */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.form-step h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.step-subtitle {
  color: var(--gray-600);
  margin-bottom: 30px;
  font-size: 1rem;
}

/* ========== Service Type Options (Step 1) ========== */
.service-type-options {
  display: grid;
  gap: 15px;
}

.service-type-option {
  position: relative;
}

.service-type-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.service-type-option label {
  display: flex;
  align-items: center;
  padding: 20px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
  gap: 16px;
}

.service-type-option label:hover {
  border-color: var(--brand-secondary);
  background: #f0f7ff;
}

.service-type-option input:checked + label {
  border-color: var(--cta-primary);
  background: #e8f5e9;
}

.service-type-icon {
  width: 50px;
  height: 50px;
  background: var(--gray-100);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray-600);
  transition: all 0.2s ease;
}

.service-type-option input:checked + label .service-type-icon {
  background: var(--cta-primary);
  color: var(--white);
}

.service-type-text {
  flex: 1;
}

.service-type-label {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--charcoal);
}

.service-type-desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-top: 3px;
}

/* ========== Form Sections (Step 2) ========== */
.form-section {
  margin-bottom: 30px;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.option-item {
  position: relative;
}

.option-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-item label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
  text-align: center;
  min-height: 60px;
}

.option-item label:hover {
  border-color: var(--brand-secondary);
  background: #f0f7ff;
}

.option-item input:checked + label {
  border-color: var(--cta-primary);
  background: #e8f5e9;
}

.option-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.option-note {
  font-size: 0.75rem;
  color: var(--brand-primary);
  font-weight: 600;
  margin-top: 4px;
}

/* Units Select */
.units-select select {
  width: 100%;
  max-width: 200px;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.units-select select:focus {
  outline: none;
  border-color: var(--brand-secondary);
}

/* ========== Quote Breakdown ========== */
.quote-breakdown {
  background: var(--cream);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  max-width: 350px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-label {
  color: var(--gray-600);
  font-size: 0.9rem;
}

.breakdown-value {
  font-weight: 500;
  color: var(--charcoal);
  font-size: 0.9rem;
}

/* ========== Timeline Options (Step 2) ========== */
.timeline-options {
  display: grid;
  gap: 12px;
}

.timeline-option {
  position: relative;
}

.timeline-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.timeline-option label {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
}

.timeline-option label:hover {
  border-color: var(--brand-secondary);
  background: #f0f7ff;
}

.timeline-option input:checked + label {
  border-color: var(--cta-primary);
  background: #e8f5e9;
}

.timeline-emoji {
  font-size: 1.5rem;
  margin-right: 15px;
}

.timeline-label {
  font-weight: 500;
  color: var(--charcoal);
}

/* ========== Quote Reveal (Step 3) ========== */
.quote-reveal {
  text-align: center;
  padding: 20px 0;
}

.quote-reveal h2 {
  margin-bottom: 25px;
}

.quote-amount {
  background: linear-gradient(135deg, var(--cta-primary) 0%, var(--cta-primary-hover) 100%);
  color: var(--white);
  padding: 35px 30px;
  border-radius: 16px;
  margin: 0 auto 25px;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  animation: quoteReveal 0.5s ease-out;
}

@keyframes quoteReveal {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.quote-range {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
}

.quote-range.quote-updated {
  animation: pulse 0.3s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.quote-services {
  display: block;
  font-size: 1rem;
  opacity: 0.9;
  margin-top: 10px;
}

.quote-financing {
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 30px;
}

.quote-financing strong {
  color: var(--cta-primary);
}

.quote-includes {
  list-style: none;
  text-align: left;
  max-width: 350px;
  margin: 0 auto 30px;
}

.quote-includes li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.quote-includes li::before {
  content: '\2713';
  color: var(--cta-primary);
  font-weight: bold;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.quote-disclaimer {
  font-size: 0.85rem;
  color: var(--gray-500);
  max-width: 400px;
  margin: 0 auto;
  font-style: italic;
  line-height: 1.5;
}

/* ========== Contact Form (Step 4) ========== */
.quote-sidebar {
  background: var(--cream);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
}

.sidebar-label {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 5px;
}

.sidebar-amount {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cta-primary);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ========== Navigation Buttons ========== */
.form-nav {
  display: flex;
  gap: 15px;
  margin-top: 35px;
}

.btn {
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-back {
  background: var(--gray-100);
  color: var(--gray-600);
  flex: 0 0 auto;
}

.btn-back:hover {
  background: var(--gray-200);
}

.btn-next,
.btn-submit {
  background: var(--cta-primary);
  color: var(--white);
  flex: 1;
}

.btn-next:hover,
.btn-submit:hover {
  background: var(--cta-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-next:disabled,
.btn-submit:disabled {
  background: var(--gray-300);
  color: var(--gray-500);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 15px;
}

/* ========== Success Message ========== */
.success-message {
  text-align: center;
  padding: 30px 20px;
}

.success-icon {
  color: var(--cta-primary);
  margin-bottom: 20px;
}

.success-message h2 {
  font-size: 1.8rem;
  color: var(--charcoal);
  margin-bottom: 25px;
}

.success-quote {
  background: var(--cream);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
}

.success-quote .label {
  display: block;
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.success-quote .amount {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--cta-primary);
  margin-bottom: 8px;
}

.success-quote .financing {
  display: block;
  font-size: 0.95rem;
  color: var(--gray-600);
}

.success-text {
  font-size: 1.05rem;
  color: var(--gray-700);
  margin-bottom: 30px;
  line-height: 1.6;
}

.success-contact {
  padding-top: 25px;
  border-top: 1px solid var(--gray-200);
}

.success-contact p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.phone-link {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
}

.phone-link:hover {
  text-decoration: underline;
}

/* ========== Footer ========== */
footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--gray-500);
  font-size: 0.85rem;
}

footer a {
  color: var(--gray-600);
  text-decoration: none;
}

footer a:hover {
  color: var(--brand-primary);
}

/* ========== Responsive ========== */

/* Tablet breakpoint */
@media (max-width: 768px) {
  .quote-form-container {
    padding: 30px 25px;
  }

  .progress-line {
    width: 40px;
  }

  .option-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile breakpoint */
@media (max-width: 640px) {
  .quote-container {
    padding: 20px 15px 50px;
  }

  .quote-form-container {
    padding: 25px 20px;
    border-radius: 12px;
  }

  .form-progress {
    margin-bottom: 25px;
    padding: 0 5px;
  }

  .progress-number {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .progress-line {
    width: 25px;
    margin: 0 4px;
    margin-bottom: 20px;
  }

  .progress-step span {
    font-size: 0.6rem;
    max-width: 50px;
    white-space: normal;
    line-height: 1.2;
  }

  .form-step h2 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .step-subtitle {
    font-size: 0.9rem;
    margin-bottom: 25px;
  }

  /* Service type cards - stack on mobile */
  .service-type-option label {
    padding: 16px;
    gap: 14px;
  }

  .service-type-icon {
    width: 44px;
    height: 44px;
  }

  .service-type-icon svg {
    width: 24px;
    height: 24px;
  }

  .service-type-label {
    font-size: 1rem;
  }

  .service-type-desc {
    font-size: 0.85rem;
  }

  /* Option grid - single column on small screens */
  .option-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .option-item label {
    padding: 12px 10px;
    min-height: 54px;
  }

  .option-label {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  /* Section titles */
  .section-title {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  /* Units select - full width on mobile */
  .units-select select {
    max-width: 100%;
    font-size: 16px; /* Prevents iOS zoom */
  }

  /* Quote reveal */
  .quote-amount {
    padding: 25px 20px;
    margin: 0 auto 20px;
  }

  .quote-range {
    font-size: 1.75rem;
  }

  .quote-financing {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .quote-includes {
    margin: 0 auto 25px;
  }

  .quote-includes li {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .quote-disclaimer {
    font-size: 0.8rem;
  }

  .quote-details {
    font-size: 0.9rem;
  }

  /* Contact form */
  .quote-sidebar {
    padding: 16px;
    margin-bottom: 20px;
  }

  .sidebar-amount {
    font-size: 1.3rem;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-group label {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  /* Prevent iOS zoom on input focus - minimum 16px font */
  .form-group input,
  .form-group textarea {
    font-size: 16px;
    padding: 12px 14px;
  }

  .form-group textarea {
    min-height: 80px;
  }

  /* Navigation buttons */
  .form-nav {
    flex-direction: column-reverse;
    gap: 12px;
    margin-top: 25px;
  }

  .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    /* Ensure minimum touch target */
    min-height: 48px;
  }

  .form-note {
    font-size: 0.8rem;
    margin-top: 12px;
  }

  /* Header */
  .header-phone span {
    display: none;
  }

  .header-phone svg {
    width: 22px;
    height: 22px;
  }

  /* Success message */
  .success-message {
    padding: 20px 10px;
  }

  .success-message h2 {
    font-size: 1.5rem;
  }

  .success-quote .amount {
    font-size: 1.6rem;
  }

  .success-text {
    font-size: 1rem;
  }

  .phone-link {
    font-size: 1.2rem;
  }
}

/* Extra small screens */
@media (max-width: 380px) {
  .quote-container {
    padding: 15px 12px 40px;
  }

  .quote-form-container {
    padding: 20px 16px;
  }

  .progress-number {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .progress-line {
    width: 18px;
    margin: 0 3px;
    margin-bottom: 18px;
  }

  .progress-step span {
    font-size: 0.55rem;
    max-width: 45px;
  }

  .form-step h2 {
    font-size: 1.15rem;
  }

  /* Single column for smallest screens */
  .option-grid {
    grid-template-columns: 1fr;
  }

  .option-item label {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 14px 16px;
  }

  .quote-range {
    font-size: 1.5rem;
  }

  .quote-amount {
    padding: 20px 16px;
  }
}
