/**
 * Nancy Medina Art - Quiz Component
 * 
 * "Which Flower Are You?" interactive quiz styling
 * Follows website factory CSS architecture and NMA brand identity
 */

/* Quiz Page Layout */
.quiz-page {
  min-height: 100vh;
  width: 100%;
  background-image: url('https://media.nancymedina.com/public/d476e842-861d-41df-9fcf-2fd7060ddb7f.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  font-family: var(--font-body);
  color: #3a2c2a;
  display: flex;
  justify-content: center;
  padding: 4rem 1.5rem 6rem;
}

.quiz-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(250, 243, 234, 0.7);
  z-index: 0;
}

@media (max-width: 768px) {
  .quiz-page {
    padding: 3rem 1rem 4rem;
  }
}

.quiz-container {
  position: relative;
  z-index: 1;
  max-width: 820px;
  width: 100%;
}

/* Fade Animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header Section (Always Visible) */
.quiz-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.quiz-banner {
  margin-bottom: 2.5rem;
}

.quiz-banner-pill {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: rgba(255, 250, 245, 0.9);
  color: var(--color-primary);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.quiz-headline {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 3.625rem;
  line-height: 1.05;
  margin: 1.375rem 0 1.125rem;
  color: #3a2420;
}

@media (max-width: 768px) {
  .quiz-headline {
    font-size: 2.5rem;
  }
}

.quiz-intro {
  margin-bottom: 2.25rem;
}

.quiz-intro-lead {
  font-size: 1rem;
  line-height: 1.65;
  color: #5a4a45;
  margin: 0 auto 0.875rem;
  font-weight: 500;
}

.quiz-intro-body {
  font-size: 1rem;
  line-height: 1.65;
  color: #6b5b55;
  margin: 0 auto;
}

.quiz-preview {
  margin-bottom: 2.25rem;
}

.quiz-preview-lead {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 400;
  color: #5a4a45;
  margin: 0 0 0.25rem;
}

/* Benefits List */
.quiz-benefits {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-bottom: 2.75rem;
  flex-wrap: wrap;
}

.quiz-benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 1rem;
  color: #5a4a45;
  white-space: nowrap;
}

.quiz-benefit-text {
  white-space: normal;
}

.quiz-benefit-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

/* Quiz Card */
.quiz-card {
  background: #fffdfa;
  border-radius: 1.25rem;
  box-shadow: 0 20px 50px -20px rgba(58, 44, 42, 0.35),
              0 2px 8px rgba(58, 44, 42, 0.08);
  padding: 2.5rem 2.25rem 2.25rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
  .quiz-card {
    padding: 2rem 1.5rem 1.5rem;
  }
}

.quiz-card--result {
  text-align: center;
  padding: 3rem 2.5rem;
}

@media (max-width: 768px) {
  .quiz-card--result {
    padding: 2.5rem 1.75rem;
  }
}

/* Progress Indicator */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}

.quiz-progress-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.quiz-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(221, 35, 187, 0.1);
}

.quiz-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--color-primary);
  transition: width 0.4s ease;
  width: 0;
}

/* Question */
.quiz-question-text {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.875rem;
  line-height: 1.3;
  margin: 0 0 1.625rem;
  color: #3a2420;
}

@media (max-width: 768px) {
  .quiz-question-text {
    font-size: 1.5rem;
  }
}

/* Answer Buttons */
.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-answer-btn {
  text-align: left;
  padding: 1.125rem 1.25rem;
  border-radius: 0.875rem;
  border: 1.5px solid rgba(221, 35, 187, 0.15);
  background: #fffdfa;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: #4a3a35;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quiz-answer-btn:hover {
  border-color: var(--color-primary);
  background: rgba(255, 253, 250, 1);
  box-shadow: 0 2px 8px rgba(221, 35, 187, 0.15);
  transform: translateY(-1px);
}

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

/* Result State */
.quiz-result-label {
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
  margin: 0 0 0.625rem;
}

.quiz-result-subtitle {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 2.625rem;
  margin: 0 0 1.5rem;
  color: #3a2420;
}

@media (max-width: 768px) {
  .quiz-result-subtitle {
    font-size: 2rem;
  }
}

.quiz-result-image {
  margin: 0 auto 0.75rem;
  border-radius: 1rem;
  overflow: hidden;
  max-width: 500px;
}

.quiz-result-image img {
  width: 100%;
  height: auto;
  display: block;
}

.quiz-result-credit {
  margin: 0 auto 2rem;
  max-width: 500px;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #7a6a65;
}

.quiz-result-credit-artwork {
  display: block;
  font-style: italic;
}

.quiz-result-credit-photo {
  display: block;
}

.quiz-result-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(221, 35, 187, 0.08);
  border: 2px dashed rgba(221, 35, 187, 0.25);
  border-radius: 1rem;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  padding: 1.5rem;
}

.quiz-result-content {
  text-align: left;
  margin-bottom: 1.75rem;
}

.quiz-result-cta {
  margin-top: 2rem;
}

.quiz-result-blurb {
  font-size: 1rem;
  line-height: 1.7;
  color: #5a4a45;
  margin: 0 0 1rem;
}

.quiz-result-blurb:last-child {
  margin-bottom: 0;
}

/* Result Reminder Box */
.quiz-result-reminder {
  background: rgba(255, 240, 230, 0.6);
  border-radius: 0.875rem;
  padding: 1.25rem 1.5rem;
  text-align: left;
  margin-bottom: 2rem;
}

.quiz-result-reminder-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  font-weight: 600;
  margin: 0 0 0.375rem;
}

.quiz-result-reminder-text {
  font-family: var(--font-primary);
  font-size: 1.1875rem;
  line-height: 1.6;
  color: #4a3a35;
  margin: 0;
}

@media (max-width: 768px) {
  .quiz-result-reminder-text {
    font-size: 1rem;
  }
}

/* Result Unlock Section */
.quiz-result-unlock {
  border-top: 1px solid rgba(221, 35, 187, 0.1);
  padding-top: 1.75rem;
  text-align: left;
}

.quiz-result-unlock-title {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 0.875rem;
  color: #3a2420;
}

.quiz-result-unlock-text {
  font-size: 1rem;
  line-height: 1.7;
  color: #5a4a45;
  margin: 0 0 0.875rem;
}

.quiz-result-bundle-link {
  display: block;
  margin-bottom: 1.75rem;
  border-radius: 0.875rem;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.quiz-result-bundle-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(221, 35, 187, 0.3);
}

/* Base styles for bundle images */
.quiz-result-bundle-image {
  width: 100%;
  height: auto;
  transition: all 0.3s ease;
}

/* Desktop: show desktop image, hide mobile */
.quiz-result-bundle-image.desktop-only {
  display: block;
}

.quiz-result-bundle-image.mobile-only {
  display: none;
}

/* Mobile: hide desktop image, show mobile */
@media (max-width: 768px) {
  .quiz-result-bundle-image.desktop-only {
    display: none;
  }
  
  .quiz-result-bundle-image.mobile-only {
    display: block;
  }
}

.quiz-result-bundle-link:hover .quiz-result-bundle-image {
  opacity: 0.95;
}

.quiz-signature {
  font-family: var(--font-primary);
  font-size: 1.1875rem;
  color: #3a2420;
  margin: 0;
  text-align: center;
}

/* CTA Button */
.quiz-cta {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1.125rem 1.5rem;
  border-radius: 0.875rem;
  transition: all 0.15s ease;
}

.quiz-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(221, 35, 187, 0.3);
}

/* Error State (survey-widget failure recovery) */
.quiz-error {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1.5px solid rgba(216, 31, 38, 0.35);
  background: rgba(216, 31, 38, 0.06);
  text-align: center;
}

.quiz-error-message {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #b91c1c;
}

.quiz-error-retry {
  margin-top: 0.625rem;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid #d81f26;
  background: transparent;
  color: #d81f26;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quiz-error-retry:hover {
  background: #d81f26;
  color: #fff;
}
