/* 1. Base Reset and Font */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: #f5f6fa;
  color: #222;
  font-size: 17px;
  line-height: 1.6;
}

/* 2. Main Quiz Container */
#dsp-quiz-container {
  max-width: 800px;
  margin: 48px auto;
  border: 1px solid #e0e0e5;
  border-radius: 18px;
  padding: 40px 32px 32px 32px;
  box-sizing: border-box;
  transition: box-shadow 0.2s;
}

#dsp-quiz-container h2,
#dsp-quiz-container h3 {
  font-weight: 600;
  color: #111;
  margin-top: 0;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

#dsp-quiz-container p {
  color: #444;
  margin-bottom: 18px;
}

/* 3. Buttons */
.dsp-btn,
.dsp-btn:link,
.dsp-btn:visited,
.dsp-btn:hover,
.dsp-btn:active,
.dsp-btn:focus {
  text-decoration: none !important;
}

.dsp-btn {
  display: inline-block;
  background: linear-gradient(90deg, #0071e3 0%, #34c759 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
.dsp-btn:disabled {
  background: #f0f0f3;
  color: #bbb;
  cursor: not-allowed;
  box-shadow: none;
}
.dsp-btn:hover:not(:disabled) {
  background: linear-gradient(90deg, #34c759 0%, #0071e3 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* 4. Form Elements */
#dsp-lead-form input[type="text"],
#dsp-lead-form input[type="email"],
#dsp-lead-form input[type="number"],
#dsp-lead-form input[type="date"] {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #e0e0e5;
  border-radius: 8px;
  background: #fafbfc;
  font-size: 16px;
  transition: border 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
#dsp-lead-form input:focus {
  border-color: #0071e3;
  outline: none;
  box-shadow: 0 0 0 2px #0071e320;
}
#dsp-lead-form label {
  font-size: 15px;
  color: #333;
  margin-bottom: 6px;
  display: block;
}
#dsp-lead-form div {
  margin-bottom: 18px;
}

/* 5. Progress Bar */
#dsp-progress-bar {
  width: 100%;
  background: transparent;
  border-radius: 0;
  height: auto;
  margin-bottom: 32px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 0 18px 0;
  position: relative;
}
#dsp-progress-bar .dsp-step {
  flex: 1 1 0;
  text-align: center;
  position: relative;
  z-index: 1;
}
#dsp-progress-bar .dsp-step-indicator {
  display: inline-block;
  width: 34px;
  height: 34px;
  line-height: 34px;
  border-radius: 50%;
  background: #ececf0;
  color: #bbb;
  font-weight: 600;
  font-size: 1.1rem;
  border: 2.5px solid #ececf0;
  transition: background 0.3s, color 0.3s, border 0.3s;
  margin-bottom: 6px;
}
#dsp-progress-bar .dsp-step-active .dsp-step-indicator {
  background: linear-gradient(90deg, #0071e3 0%, #34c759 100%);
  color: #fff;
  border: 2.5px solid #0071e3;
  box-shadow: 0 2px 8px #0071e320;
}
#dsp-progress-bar .dsp-step-completed .dsp-step-indicator {
  background: #34c759;
  color: #fff;
  border: 2.5px solid #34c759;
}
#dsp-progress-bar .dsp-step-label {
  display: block;
  font-size: 0.95rem;
  color: #888;
  margin-top: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}
#dsp-progress-bar .dsp-step-active .dsp-step-label {
  color: #0071e3;
}
#dsp-progress-bar .dsp-step-completed .dsp-step-label {
  color: #34c759;
}
#dsp-progress-bar .dsp-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  right: -50%;
  width: 100%;
  height: 4px;
  background: #ececf0;
  z-index: 0;
  border-radius: 2px;
  transition: background 0.3s;
}
#dsp-progress-bar .dsp-step-completed:not(:last-child)::after {
  background: linear-gradient(90deg, #0071e3 0%, #34c759 100%);
}

/* Hide old progress bar */
#dsp-progress {
  display: none !important;
}

/* 6. Question Area */
#dsp-question-area {
  margin-bottom: 32px;
}
#dsp-question-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: #222;
  margin-bottom: 18px;
}

/* 7. Answer Options */
#dsp-options-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dsp-option {
  background: #f7f8fa;
  border: 1.5px solid #e0e0e5;
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 16px;
  color: #222;
  cursor: pointer;
  transition: background 0.18s, border 0.18s, color 0.18s;
  user-select: none;
  position: relative;
}
.dsp-option.selected {
  background: #eaf6ff;
  border-color: #0071e3;
  color: #0071e3;
  box-shadow: 0 2px 8px #0071e310;
}
.dsp-option:hover:not(.selected) {
  background: #f0f4f8;
  border-color: #b3d7f6;
}

/* 8. Results Screen */

#dsp-result-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
#dsp-result-image img {
  max-width: 120px;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px #0001;
}
#dsp-result-description {
  color: #444;
  font-size: 1.1rem;
  margin-bottom: 22px;
}

/* 9. Recommendations */
#dsp-result-recs {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  text-align: left;
}
#dsp-result-recs li {
  background: #f7f8fa;
  border-radius: 8px;
  padding: 13px 18px;
  margin-bottom: 10px;
  border-left: 4px solid #0071e3;
  color: #222;
  font-size: 16px;
}

/* 10. CTAs and Social */
#dsp-result-ctas {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}
#dsp-result-ctas .dsp-btn {
  min-width: 180px;
  margin: 0 0.5rem;
}
#dsp-social-share {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  order: 2; /* Ensures it comes after the buttons in flex */
}
#dsp-social-share span {
  margin-right: 0.5rem;
  font-weight: 500;
  color: #888;
}
#dsp-social-share .dsp-btn {
  min-width: 110px;
  font-size: 15px;
  padding: 8px 12px;
  margin: 0;
}

/* 11. Focus & Accessibility */
.dsp-btn:focus,
.dsp-option:focus {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px #0071e320;
  z-index: 1;
}
.dsp-option:active {
  background: #e0e6ed;
  border-color: #0071e3;
}
#dsp-lead-form input:focus {
  border-color: #0071e3;
  outline: none;
  box-shadow: 0 0 0 2px #0071e320;
}

/* 12. Subtle Transitions */
.dsp-option,
.dsp-btn,
#dsp-lead-form input {
  transition: background 0.18s, border 0.18s, color 0.18s, box-shadow 0.18s;
}

.dsp-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 4px;
  border-radius: 50%;
  background: #f5f6fa;
  border: 1.5px solid #e0e0e5;
  color: #555;
  font-size: 20px;
  transition: background 0.18s, border 0.18s, box-shadow 0.18s;
  text-decoration: none !important;
  box-shadow: 0 1px 4px #0001;
}
.dsp-social-icon:hover,
.dsp-social-icon:focus {
  background: #eaf6ff;
  border-color: #0071e3;
  color: #0071e3;
  box-shadow: 0 2px 8px #0071e310;
  outline: none;
}
.dsp-social-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

/* 13. Responsive Design */
@media (max-width: 900px) {
  #dsp-quiz-container {
    max-width: 98vw;
    padding: 28px 8vw 24px 8vw;
  }
  #dsp-result-ctas {
    gap: 10px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }
  #dsp-quiz-container {
    padding: 18px 5vw 16px 5vw;
    border-radius: 10px;
    margin: 18px 0;
    box-shadow: none;
  }
  #dsp-quiz-container h2,
  #dsp-quiz-container h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
  }
  #dsp-quiz-container p {
    margin-bottom: 12px;
  }
  .dsp-btn {
    padding: 11px 0;
    font-size: 15px;
    min-width: 100%;
    border-radius: 7px;
  }
  #dsp-lead-form input[type="text"],
  #dsp-lead-form input[type="email"],
  #dsp-lead-form input[type="number"],
  #dsp-lead-form input[type="date"] {
    padding: 10px 10px;
    font-size: 15px;
    border-radius: 7px;
  }
  #dsp-lead-form label {
    font-size: 14px;
  }
  #dsp-lead-form div {
    margin-bottom: 12px;
  }
  #dsp-progress-bar {
    padding-bottom: 10px;
  }
  #dsp-progress-bar .dsp-step-indicator {
    width: 26px;
    height: 26px;
    line-height: 26px;
    font-size: 0.98rem;
    margin-bottom: 3px;
  }
  #dsp-progress-bar .dsp-step-label {
    font-size: 0.82rem;
  }
  #dsp-question-area {
    margin-bottom: 18px;
  }
  #dsp-question-text {
    font-size: 1.05rem;
    margin-bottom: 12px;
  }
  #dsp-options-area {
    gap: 8px;
  }
  .dsp-option {
    padding: 12px 10px;
    font-size: 15px;
    border-radius: 7px;
  }
  #dsp-result-title {
    font-size: 1.3rem;
    margin-bottom: 7px;
  }
  #dsp-result-image img {
    max-width: 80px;
    border-radius: 8px;
    margin-bottom: 10px;
  }
  #dsp-result-description {
    font-size: 1rem;
    margin-bottom: 14px;
  }
  #dsp-result-recs li {
    padding: 10px 10px;
    font-size: 15px;
    border-radius: 7px;
    margin-bottom: 7px;
  }
  #dsp-result-ctas {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
  }
  #dsp-result-ctas .dsp-btn {
    min-width: unset;
    width: 100%;
    margin: 0;
  }
  #dsp-social-share {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1rem;
    gap: 6px;
  }
  #dsp-social-share .dsp-btn {
    min-width: unset;
    width: 100%;
    font-size: 14px;
    padding: 8px 0;
  }
  .dsp-social-icon {
    width: 34px;
    height: 34px;
    font-size: 17px;
    border-radius: 7px;
  }
  .dsp-social-icon svg {
    width: 18px;
    height: 18px;
  }
}

/* 14. Question Step Transition */
.dsp-question-transition {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.dsp-question-transition.dsp-question-active {
  opacity: 1;
  transform: translateY(0);
}

/* 15. Enhanced Button Hover */
.dsp-btn:hover:not(:disabled),
.dsp-btn:focus-visible:not(:disabled) {
  background: linear-gradient(90deg, #34c759 0%, #0071e3 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.13);
  transform: scale(1.045);
  transition: background 0.2s, box-shadow 0.2s, color 0.2s, transform 0.18s;
}
.dsp-btn {
  transition: background 0.18s, border 0.18s, color 0.18s, box-shadow 0.18s,
    transform 0.18s;
}
