/* css/quiz.css */

/* Hero button reset (на случай если нужен после смены тега) */
button.hero-cta-btn { font-family: inherit; border: none; cursor: pointer; }

/* Modal */
.quiz-modal {
  border: none;
  padding: 0;
  background: #fff;
  color: #0f1117;
  max-width: 640px;
  width: calc(100vw - 32px);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  inset: 0;
  margin: auto;
}
.quiz-modal::backdrop { background: rgba(15, 17, 23, 0.55); }

.quiz-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #555;
}
.quiz-close:hover { color: #000; }

.quiz-header { padding: 28px 28px 0; }
.quiz-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.quiz-bait {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #555;
}
.quiz-bait li::before { content: '✓ '; color: #0ea5e9; font-weight: 700; }

.quiz-body { padding: 16px 28px 28px; min-height: 240px; position: relative; }

.quiz-step-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}
.quiz-error {
  color: #c0392b;
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
}
.quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.quiz-option {
  padding: 14px 12px;
  border: 1.5px solid #d8dde3;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  text-align: center;
  color: #0f1117;
  transition: border-color 0.15s, background 0.15s;
}
.quiz-option:hover { border-color: #0ea5e9; }
.quiz-option.is-active {
  border-color: #0ea5e9;
  background: #eaf6fc;
  color: #0c4a6e;
}
.quiz-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-input {
  padding: 14px 16px;
  border: 1.5px solid #d8dde3;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  color: #0f1117;
}
.quiz-input::placeholder { color: #9aa1ab; }
.quiz-input:focus {
  border-color: #0ea5e9;
  outline: none;
}
.quiz-consent {
  font-size: 12px;
  color: #888;
  margin: 12px 0 0;
}
.quiz-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.quiz-btn {
  padding: 14px 26px;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.quiz-btn--back {
  background: transparent;
  color: #555;
  padding-left: 0;
}
.quiz-btn--back:hover { color: #000; }
.quiz-btn--next {
  margin-left: auto;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
}
.quiz-btn--next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.35);
}
.quiz-btn[hidden] { display: none; }

.quiz-thanks {
  text-align: center;
  padding: 16px 0 8px;
}
.quiz-thanks-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}
.quiz-thanks-text {
  color: #555;
  margin: 0 0 24px;
  font-size: 15px;
}
.quiz-thanks .quiz-btn--next {
  margin: 0 auto;
}

@media (max-width: 480px) {
  .quiz-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }
  .quiz-header { padding: 24px 20px 0; }
  .quiz-body { padding: 14px 20px 24px; }
  .quiz-title { font-size: 16px; }
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-nav { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .quiz-btn--next { margin-left: 0; }
  .quiz-btn--back { padding: 12px 0; text-align: center; }
}
