/* ─── WS PMS Quiz — Core Styles ─── */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

:root {
  --ws-accent: #b24104;
  --ws-accent-light: rgba(178, 65, 4, 0.12);
  --ws-accent-hover: #8e3403;
  --ws-bg: #b24104;
  --ws-bg-white: #ffffff;
  --ws-card-bg: #ffffff;
  --ws-text: #ffffff;
  --ws-text-dark: #b24104;
  --ws-text-muted: rgba(255, 255, 255, 0.75);
  --ws-border: rgba(255, 255, 255, 0.3);
  --ws-border-selected: #ffffff;
  --ws-radius: 12px;
  --ws-radius-sm: 8px;
  --ws-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ws-transition: 0.25s ease;
}

/* ─── Full-screen Container ─── */

.ws-pms-quiz {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 40px 20px 60px;
  font-family: var(--ws-font);
  color: var(--ws-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.ws-pms-quiz * {
  box-sizing: border-box;
}

/* ─── Landing Page Background (full screen) ─── */

.ws-pms-quiz-landing-page {
  background: var(--ws-bg);
  color: var(--ws-text);
}

/* ─── Landing Screen ─── */

.ws-quiz-landing {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

/* Title — centered */
.ws-quiz-title {
  font-family: var(--ws-font);
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--ws-text);
  letter-spacing: 0.02em;
  text-align: center;
}

.ws-quiz-title-arrow {
  font-weight: 400;
}

.ws-quiz-subtitle {
  font-family: var(--ws-font);
  font-size: 18px;
  color: var(--ws-text);
  font-style: normal;
  margin: 8px 0 24px;
  text-align: center;
}

/* Hero image — matches title width, centered below subtitle */
.ws-quiz-hero-image {
  max-width: 520px;
  margin: 0 auto 28px;
}

.ws-quiz-hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--ws-radius);
}

.ws-quiz-intro-box {
  background: transparent;
  border-radius: var(--ws-radius);
  padding: 0 16px;
  margin: 0 auto 32px;
  max-width: 600px;
  text-align: justify;
  box-shadow: none;
}

.ws-quiz-intro-hook {
  font-size: 16px;
  font-weight: 700;
  color: var(--ws-text);
  margin: 0 0 16px !important;
  text-align: center;
}

.ws-quiz-intro-box p {
  margin: 0;
  font-size: 15px;
  color: var(--ws-text);
  line-height: 1.7;
}

.ws-quiz-intro-box strong {
  color: var(--ws-text);
}

/* ─── Buttons ─── */

.ws-quiz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ws-bg-white);
  color: var(--ws-text-dark);
  font-family: var(--ws-font);
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 40px;
  padding: 14px 36px;
  cursor: pointer;
  transition: background var(--ws-transition), transform var(--ws-transition), opacity var(--ws-transition);
  text-decoration: none;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.ws-quiz-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.ws-quiz-btn:active {
  transform: translateY(0);
}

.ws-quiz-btn:focus-visible {
  outline: 3px solid var(--ws-bg-white);
  outline-offset: 3px;
}

.ws-quiz-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ws-quiz-meta {
  font-family: var(--ws-font);
  font-size: 13px;
  color: var(--ws-text-muted);
  margin-top: 16px;
}

/* ─── Progress Bar ─── */

.ws-quiz-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--ws-text);
  font-family: var(--ws-font);
}

.ws-quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 36px;
}

.ws-quiz-progress-fill {
  height: 100%;
  background: var(--ws-bg-white);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ─── Question Screen ─── */

.ws-quiz-question {
  max-width: 720px;
  margin: 0 auto;
}

.ws-quiz-question-text {
  font-family: var(--ws-font);
  font-size: clamp(1.15rem, 3.2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 28px;
  text-align: center;
  color: var(--ws-text);
}

/* ─── Option Cards ─── */

.ws-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-quiz-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--ws-card-bg);
  border: 2px solid rgba(178, 65, 4, 0.2);
  border-radius: var(--ws-radius);
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  font-family: var(--ws-font);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color var(--ws-transition), background var(--ws-transition), box-shadow var(--ws-transition);
  color: var(--ws-text-dark);
}

.ws-quiz-option-card:hover {
  border-color: var(--ws-accent);
  box-shadow: 0 2px 8px rgba(178, 65, 4, 0.12);
}

.ws-quiz-option-card:focus-visible {
  outline: 3px solid var(--ws-accent);
  outline-offset: 2px;
}

.ws-quiz-option-card.ws-selected {
  border-color: var(--ws-accent);
  background: var(--ws-accent-light);
  box-shadow: 0 2px 12px rgba(178, 65, 4, 0.15);
}

.ws-option-letter {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(178, 65, 4, 0.08);
  color: var(--ws-text-dark);
  font-family: var(--ws-font);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ws-transition), color var(--ws-transition);
}

.ws-selected .ws-option-letter {
  background: var(--ws-accent);
  color: #fff;
}

.ws-option-text {
  flex: 1;
}

/* ─── Open Text (Q21) ─── */

.ws-quiz-open-text {
  max-width: 100%;
}

.ws-quiz-open-text textarea {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--ws-radius);
  padding: 16px;
  font-size: 15px;
  font-family: var(--ws-font);
  line-height: 1.5;
  resize: vertical;
  transition: border-color var(--ws-transition);
  color: var(--ws-text-dark);
  background: var(--ws-card-bg);
}

.ws-quiz-open-text textarea:focus {
  outline: none;
  border-color: var(--ws-bg-white);
}

/* ─── Navigation ─── */

.ws-quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}

.ws-quiz-back-btn {
  background: transparent;
  color: var(--ws-text);
  font-size: 15px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.ws-quiz-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ws-text);
}

.ws-quiz-next-btn {
  margin-left: auto;
  background: var(--ws-bg-white);
  color: var(--ws-text-dark);
}

.ws-quiz-next-btn:hover {
  opacity: 0.9;
}

/* ─── Email Capture ─── */

.ws-quiz-email {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  color: var(--ws-text);
}

.ws-quiz-email-title {
  font-family: var(--ws-font);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ws-text);
}

.ws-quiz-email-subtitle {
  font-size: 16px;
  color: var(--ws-text-muted);
  margin: 0 0 28px;
}

.ws-quiz-email-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ws-quiz-email-field {
  position: relative;
}

.ws-quiz-email-field input[type='email'],
.ws-quiz-email-field input[type='text'] {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-family: var(--ws-font);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--ws-radius);
  transition: border-color var(--ws-transition);
  color: var(--ws-text-dark);
  background: var(--ws-card-bg);
  box-sizing: border-box;
}

.ws-quiz-email-field input[type='email']:focus,
.ws-quiz-email-field input[type='text']:focus {
  outline: none;
  border-color: var(--ws-bg-white);
}

.ws-quiz-email-error {
  display: none;
  color: #ffcfcf;
  font-size: 13px;
  margin-top: 6px;
  text-align: left;
}

.ws-quiz-email-inbox {
  font-size: 14px;
  color: var(--ws-text);
  margin-top: 16px;
  text-align: center;
  font-style: italic;
}

.ws-quiz-email-privacy {
  font-size: 13px;
  color: var(--ws-text-muted);
  margin-top: 8px;
}

/* Submit button: white bg, #b24104 text */
.ws-quiz-submit-btn {
  background: var(--ws-bg-white) !important;
  color: var(--ws-text-dark) !important;
}

/* ─── Loading Screen ─── */

.ws-quiz-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--ws-text);
}

.ws-quiz-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--ws-bg-white);
  border-radius: 50%;
  animation: ws-spin 0.8s linear infinite;
}

@keyframes ws-spin {
  to {
    transform: rotate(360deg);
  }
}

.ws-quiz-loading p {
  font-family: var(--ws-font);
  font-size: 16px;
  color: var(--ws-text-muted);
}

/* ─── Error Screen ─── */

.ws-quiz-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--ws-text);
}

.ws-quiz-error h2 {
  font-family: var(--ws-font);
  font-size: 1.5rem;
  margin: 0 0 12px;
  color: var(--ws-text);
}

.ws-quiz-error p {
  color: var(--ws-text-muted);
  margin: 0 0 24px;
}

.ws-quiz-error .ws-quiz-btn {
  background: var(--ws-bg-white);
  color: var(--ws-text-dark);
}

/* ─── Result Page ─── */

.ws-pms-result-page {
  background: var(--ws-bg);
  color: var(--ws-text);
}

.ws-pms-result {
  text-align: center;
}

.ws-result-content {
  animation: ws-fadeIn 0.6s ease;
  max-width: 720px;
  margin: 0 auto;
}

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

.ws-result-title {
  font-family: var(--ws-font);
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  font-weight: 800;
  margin: 16px 0 32px;
  color: var(--ws-text);
  white-space: nowrap;
}

/* Video Embed */

.ws-result-video {
  margin: 0 auto 36px;
  max-width: 640px;
}

.ws-result-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--ws-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ws-result-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Description */

.ws-result-description {
  max-width: 600px;
  margin: 0 auto 40px;
  font-family: var(--ws-font);
  font-size: 15px;
  line-height: 1.8;
  text-align: justify;
  color: var(--ws-text);
}

/* ─── Offer Block (white background section) ─── */

.ws-result-offer {
  background: var(--ws-bg-white);
  border-radius: var(--ws-radius);
  padding: 40px 32px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.ws-result-offer-title {
  font-family: var(--ws-font);
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
  font-weight: 800;
  color: var(--ws-text-dark);
  margin: 0 0 20px;
}

.ws-result-offer-copy {
  font-family: var(--ws-font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ws-text-dark);
  text-align: justify;
  margin-bottom: 28px;
  font-style: normal;
}

/* Mockup image — same width as description (600px) */
.ws-result-mockup {
  margin: 0 auto 28px;
  max-width: 100%;
}

.ws-result-mockup img {
  width: 100%;
  height: auto;
  border-radius: var(--ws-radius);
}

/* CTA button in offer: #b24104 bg, white text */
.ws-result-cta-btn {
  font-size: 18px;
  padding: 16px 40px;
  background: var(--ws-accent) !important;
  color: var(--ws-bg-white) !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ws-result-cta-btn:hover {
  background: var(--ws-accent-hover) !important;
  opacity: 1;
}

/* Closing italic line under CTA */
.ws-result-closing-line {
  font-family: var(--ws-font);
  font-size: 14px;
  font-style: italic;
  color: var(--ws-text-dark);
  margin: 20px 0 0;
}

/* Fallback */

.ws-result-fallback {
  text-align: center;
  padding: 60px 20px;
}

.ws-result-fallback h2 {
  font-family: var(--ws-font);
  font-size: 1.5rem;
  margin: 0 0 12px;
  color: var(--ws-text);
}

.ws-result-fallback p {
  color: var(--ws-text-muted);
  margin: 0 0 24px;
}

/* ─── Mobile Responsive ─── */

@media (max-width: 600px) {
  .ws-pms-quiz {
    padding: 24px 16px 40px;
  }

  .ws-quiz-title {
    font-size: clamp(1.1rem, 5vw, 1.8rem);
    white-space: normal;
  }

  .ws-quiz-intro-box {
    padding: 0 8px;
  }

  .ws-quiz-option-card {
    padding: 14px 16px;
    font-size: 14px;
  }

  .ws-option-letter {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .ws-quiz-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
  }

  .ws-quiz-nav {
    flex-direction: column;
  }

  .ws-quiz-back-btn {
    order: 2;
    width: 100%;
  }

  .ws-quiz-next-btn {
    order: 1;
    width: 100%;
    margin-left: 0;
  }

  .ws-result-offer {
    padding: 28px 20px;
  }

  .ws-result-title {
    white-space: normal;
  }
}
