/* SuperFastDiet Foundation Quiz Styles */

/* Import SFD Design System */
@import url('../foundation-assets/assets/colors_and_type.css');

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

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #FFF5F8 0%, #FFFBF0 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #F0F0F0;
  z-index: 1000;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #EE728E 0%, #F9B233 100%);
  width: 0%;
  transition: width 0.3s ease;
}

/* Quiz Container */
.quiz-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  margin-top: 4px;
}

.quiz-screen {
  display: none;
  width: 100%;
  max-width: 640px;
  animation: fadeIn 0.4s ease;
}

.quiz-screen.active {
  display: block;
}

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

.quiz-content {
  background: white;
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Logo */
.logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo img {
  height: 48px;
}

/* Typography */
h1 {
  font-size: 32px;
  font-weight: 700;
  color: #2D2D2D;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.2;
}

h2 {
  font-size: 26px;
  font-weight: 700;
  color: #2D2D2D;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.3;
}

.subtitle {
  font-size: 18px;
  color: #666;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.5;
}

.question-number {
  text-align: center;
  color: #EE728E;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Welcome Screen Benefits */
.benefits {
  list-style: none;
  margin: 32px 0;
  padding: 0;
}

.benefits li {
  font-size: 16px;
  color: #2D2D2D;
  padding: 12px 0;
  border-bottom: 1px solid #F0F0F0;
}

.benefits li:last-child {
  border-bottom: none;
}

/* Options */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: white;
  border: 2px solid #E8E8E8;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: 500;
  color: #2D2D2D;
  text-align: left;
  width: 100%;
}

.option-btn:hover {
  border-color: #EE728E;
  background: #FFF5F8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(238, 114, 142, 0.15);
}

.option-btn .emoji {
  font-size: 28px;
  flex-shrink: 0;
}

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

/* Form Inputs */
.form-inputs {
  margin-bottom: 32px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.input-group.full-width {
  grid-column: 1 / -1;
}

.input-group label {
  font-size: 14px;
  font-weight: 600;
  color: #2D2D2D;
}

.input-group input,
.input-group select {
  padding: 14px 16px;
  border: 2px solid #E8E8E8;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  color: #2D2D2D;
  background: white;
  transition: border-color 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #EE728E;
}

.input-with-unit {
  display: flex;
  gap: 8px;
}

.input-with-unit input {
  flex: 1;
}

.input-with-unit select {
  width: 80px;
}

.unit-display {
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #F8F8F8;
  border: 2px solid #E8E8E8;
  border-radius: 12px;
  font-weight: 600;
  color: #666;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #EE728E;
}

.checkbox-group label {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  cursor: pointer;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(135deg, #EE728E 0%, #F9B233 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(238, 114, 142, 0.3);
}

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

.btn-back {
  width: 100%;
  padding: 14px 32px;
  background: transparent;
  color: #666;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-back:hover {
  background: #F8F8F8;
  color: #EE728E;
}

/* Privacy Text */
.privacy {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-top: 24px;
}

.privacy a {
  color: #EE728E;
  text-decoration: none;
}

.privacy a:hover {
  text-decoration: underline;
}

/* Loading Screen */
.loading-content {
  text-align: center;
}

.spinner {
  width: 64px;
  height: 64px;
  border: 4px solid #F0F0F0;
  border-top: 4px solid #EE728E;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 32px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-steps {
  margin-top: 32px;
  text-align: left;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.loading-step {
  font-size: 16px;
  color: #CCC;
  padding: 12px 0;
  transition: color 0.3s ease;
}

.loading-step.active {
  color: #EE728E;
  font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .quiz-content {
    padding: 32px 24px;
    border-radius: 16px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .subtitle {
    font-size: 16px;
  }

  .option-btn {
    padding: 16px 20px;
    font-size: 15px;
  }

  .option-btn .emoji {
    font-size: 24px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    font-size: 16px;
    padding: 16px 28px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0;
  }

  .quiz-container {
    padding: 20px 16px;
  }

  .quiz-content {
    padding: 24px 20px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }
}

/* Checkbox options for multi-select questions */
.checkbox-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: #FFFFFF;
  border: 2px solid #F0F0F0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkbox-option:hover {
  border-color: #EE728E;
  background: #FFF5F7;
}

.checkbox-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #EE728E;
}

.checkbox-option .text {
  font-size: 16px;
  color: #333333;
  font-weight: 500;
}

.checkbox-option input[type="checkbox"]:checked + .text {
  color: #EE728E;
}
