/* ==========================================================================
   Frío Servicios L.S. - 3-Stage Interactive Quote Wizard Styles
   Clean, modern, zero-scroll UX
   ========================================================================== */

:root {
  --quote-bg: #f8fafc;
  --quote-card-bg: #ffffff;
  --quote-border: #e2e8f0;
  --quote-navy: #0a2540;
  --quote-blue: #0077b6;
  --quote-cyan: #00b4d8;
  --quote-green: #22c55e;
  --quote-text-main: #1e293b;
  --quote-text-muted: #64748b;
  --quote-radius: 14px;
}

body {
  background-color: var(--quote-bg);
  color: var(--quote-text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   1. Topbar Navigation
   ========================================================================== */
.quote-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--quote-border);
  padding: 0.65rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.04);
}

.quote-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

.quote-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--quote-border);
  color: var(--quote-navy);
  cursor: pointer;
  transition: all 0.18s ease;
}

.quote-back-btn:hover {
  background: #e2e8f0;
}

.quote-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.quote-brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.quote-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #0284c7;
  text-decoration: none;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 5px 10px;
  border-radius: 8px;
}

.quote-wa-link svg {
  color: #25d366;
  fill: #25d366;
}

@media (max-width: 480px) {
  .quote-wa-text {
    display: none;
  }
}

/* ==========================================================================
   2. Main Layout & Progress Stepper
   ========================================================================== */
.quote-main {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 1.25rem auto 2.5rem;
  padding: 0 1rem;
  box-sizing: border-box;
}

.quote-wizard-card {
  background: #ffffff;
  border: 1px solid var(--quote-border);
  border-radius: var(--quote-radius);
  box-shadow: 0 8px 30px rgba(10, 37, 64, 0.05);
  padding: clamp(1.25rem, 3.5vw, 2rem);
}

/* Stepper Progress Bar */
.wizard-stepper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.stepper-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  transition: all 0.2s ease;
}

.stepper-item.active {
  color: var(--quote-navy);
}

.stepper-item.active .stepper-circle {
  background: var(--quote-navy);
  border-color: var(--quote-navy);
  color: #ffffff;
}

.stepper-item.completed .stepper-circle {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
}

.stepper-divider {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 8px;
  transition: background 0.2s ease;
}

.stepper-divider.completed {
  background: #22c55e;
}

@media (max-width: 480px) {
  .stepper-label {
    display: none;
  }
}

/* ==========================================================================
   3. Stage Panels & Transitions
   ========================================================================== */
.wizard-stage-panel {
  display: none;
  animation: fadeInStage 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wizard-stage-panel.active {
  display: block;
}

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

.stage-header {
  margin-bottom: 1.35rem;
}

.stage-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--quote-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.stage-title {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 800;
  color: var(--quote-navy);
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.stage-desc {
  font-size: 13.5px;
  color: var(--quote-text-muted);
  line-height: 1.45;
  margin: 0;
}

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

.stage-field-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

/* ==========================================================================
   4. Horizontal Chips (Stage 1)
   ========================================================================== */
.services-chips-grid,
.property-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.service-chip,
.property-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  flex: 0 0 auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
  user-select: none;
}

.service-chip input,
.property-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.service-chip svg {
  color: var(--quote-blue);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.service-chip:hover,
.property-chip:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.service-chip:has(input:checked),
.property-chip:has(input:checked) {
  background: var(--quote-navy);
  border-color: var(--quote-navy);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(10, 37, 64, 0.2);
}

.service-chip:has(input:checked) svg {
  color: #38bdf8;
}

/* ==========================================================================
   5. Intent Cards (Stage 2)
   ========================================================================== */
.intent-cards-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intent-card-option {
  display: flex;
  align-items: flex-start;
  padding: 12px 14px;
  background: #ffffff;
  border: 1.5px solid var(--quote-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  position: relative;
}

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

.intent-option-content {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.intent-option-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.intent-option-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--quote-navy);
}

.intent-badge-urgent {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: #fef2f2;
  color: #b91c1c;
  text-transform: uppercase;
}

.intent-option-sub {
  font-size: 12px;
  color: var(--quote-text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.intent-card-option:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.intent-card-option:has(input:checked) {
  border-color: var(--quote-navy);
  background: #f0f7ff;
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.08);
}

.intent-card-option:has(input:checked) .intent-option-title {
  color: var(--quote-blue);
}

/* Sub-container for Technical Visit Dates & Hours */
.date-time-subcontainer {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid var(--quote-border);
  border-radius: 10px;
}

.chips-scroll-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.date-chip-label,
.time-chip-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--quote-text-main);
  transition: all 0.15s ease;
  user-select: none;
}

.date-chip-label input,
.time-chip-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.date-chip-label:hover,
.time-chip-label:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.date-chip-label:has(input:checked),
.time-chip-label:has(input:checked) {
  background: var(--quote-navy);
  border-color: var(--quote-navy);
  color: #ffffff;
}

.date-chip-calendar {
  position: relative;
}

.native-date-hidden-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ==========================================================================
   6. Contact & Follow-up Note (Stage 3)
   ========================================================================== */
.quote-system-trust-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.trust-card-icon {
  color: #16a34a;
  flex-shrink: 0;
  margin-top: 1px;
}

.trust-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  line-height: 1.4;
  color: #166534;
}

.trust-card-text strong {
  font-size: 12.5px;
  color: #14532d;
}

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

.location-input-wrapper {
  position: relative;
}

.location-input,
.quote-text-input,
.quote-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--quote-text-main);
  background: #f8fafc;
  border: 1.5px solid var(--quote-border);
  border-radius: 8px;
  box-sizing: border-box;
  font-family: inherit;
  transition: all 0.18s ease;
}

.location-input:focus,
.quote-text-input:focus,
.quote-textarea:focus {
  background: #ffffff;
  border-color: var(--quote-blue);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.12);
  outline: none;
}

.location-input.has-error,
.quote-text-input.has-error,
.quote-textarea.has-error {
  border-color: #ef4444;
  background: #fff5f5;
}

.gps-locate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.form-group-quote {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.quote-field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.field-error-text {
  display: none;
  font-size: 11.5px;
  color: #ef4444;
  font-weight: 600;
  margin-top: 3px;
}

.field-error-text.visible {
  display: block;
}

/* ==========================================================================
   7. Navigation Buttons (Next / Prev / Submit)
   ========================================================================== */
.wizard-stage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
}

.btn-wizard-next,
.btn-wizard-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--quote-navy);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.15);
}

.btn-wizard-next:hover,
.btn-wizard-submit:hover {
  background: var(--quote-blue);
  transform: translateY(-1px);
}

.btn-wizard-prev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #f1f5f9;
  border: 1px solid var(--quote-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-wizard-prev:hover {
  background: #e2e8f0;
  color: var(--quote-navy);
}

/* ==========================================================================
   8. Success Panel
   ========================================================================== */
.quote-success-panel {
  text-align: center;
  padding: 2rem 1rem;
}

.success-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.success-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--quote-navy);
  margin-bottom: 0.5rem;
}

.success-desc {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.success-summary-box {
  background: #f8fafc;
  border: 1px solid var(--quote-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: left;
  max-width: 520px;
  margin: 0 auto 1.5rem;
  font-size: 13.5px;
  line-height: 1.6;
}

.btn-wa-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 380px;
  height: 48px;
  background: #25d366;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  margin-bottom: 10px;
}

.btn-return-home {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
}

.btn-return-home:hover {
  text-decoration: underline;
  color: var(--quote-navy);
}


/* Confetti Canvas Overlay */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.success-actions-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
}

.btn-wa-success {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  height: 48px !important;
  background: #25d366 !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3) !important;
  transition: all 0.2s ease !important;
}

.btn-wa-success:hover {
  background: #1eb954 !important;
  transform: translateY(-2px) !important;
}

.btn-return-home {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-decoration: none !important;
}

.btn-return-home:hover {
  color: var(--quote-navy) !important;
  text-decoration: underline !important;
}

.slot-conflict-note {
  font-size: 12px;
  font-weight: 600;
  color: #b91c1c;
  background: #fee2e2;
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 6px;
}

.time-chip-label.is-conflict {
  opacity: 0.45;
  pointer-events: none;
  background: #f1f5f9;
  text-decoration: line-through;
}
