/* Chess Placement Quiz Styles
   Loaded after chess.css. Reuses the chess page color palette. */

/* ─── Placement CTA on chess landing page ─── */
.placement-cta {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #5a5035;
}

.placement-cta-button {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.625rem 1.5rem;
  background: #8b7d3c;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.chess-landing a.placement-cta-button {
  color: white;
}

.placement-cta-button:hover {
  background: #6b5f2b;
}

/* ─── Quiz Layout ─── */
.placement-main {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.placement-container {
  width: 100%;
  max-width: 640px;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(61, 53, 32, 0.08);
  overflow: hidden;
}

/* ─── Progress Bar ─── */
.placement-progress {
  height: 4px;
  background: #ece6d8;
}

.placement-progress-bar {
  height: 100%;
  width: 0%;
  background: #8b7d3c;
  transition: width 0.4s ease;
}

/* ─── Slide Area ─── */
.placement-slide {
  padding: 2.5rem 2rem 1.5rem;
}

.placement-slide h2 {
  font-family: "Latin Modern Roman", Georgia, serif;
  color: #3d3520;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.placement-slide .slide-subtitle {
  color: #5a5035;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 1.75rem;
}

.placement-slide .slide-coach {
  color: #8b7d3c;
  font-size: 0.875rem;
  font-style: italic;
  margin: 0 0 1.5rem;
}

/* ─── Option Cards (Multiple Choice) ─── */
.placement-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.placement-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  background: #f7f3eb;
  border: 2px solid #ece6d8;
  border-radius: 0.5rem;
  color: #3d3520;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) {
  .placement-option:hover {
    border-color: #b5a86c;
    background: #f5f0e6;
  }
}

.placement-option.selected {
  border-color: #8b7d3c;
  background: rgba(139, 125, 60, 0.08);
}

.placement-option.correct {
  border-color: #4a7c59;
  background: rgba(74, 124, 89, 0.08);
}

.placement-option.incorrect {
  border-color: #b04040;
  background: rgba(176, 64, 64, 0.05);
}

/* ─── MC Feedback Text ─── */
.mc-feedback {
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 1rem;
}

.mc-feedback-correct {
  color: #4a7c59;
}

.mc-feedback-incorrect {
  color: #b04040;
}

/* ─── Yes/No Buttons ─── */
.placement-yesno {
  display: flex;
  gap: 1rem;
}

.placement-yesno .placement-option {
  flex: 1;
  text-align: center;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 1.25rem;
}

/* ─── Board Puzzle ─── */
.placement-board-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.placement-board {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
}

/* Ensure chessground fills its container */
.placement-board cg-container {
  width: 100% !important;
  height: 100% !important;
}

/* Hide any coordinate labels that might leak */
.placement-board coords {
  display: none;
}

/* Static diagram boards shown alongside MC questions */
.placement-board-static {
  max-width: 320px;
  margin-bottom: 0.5rem;
}

.placement-board-feedback {
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 1.5em;
  text-align: center;
}

.placement-board-feedback.success {
  color: #4a7c59;
}

.placement-board-feedback.error {
  color: #b04040;
}

.placement-board-feedback.reveal {
  color: #8b7d3c;
}

.gauntlet-rating {
  color: #5a5035;
  font-size: 0.85rem;
  font-weight: 400;
}

/* ─── Navigation ─── */
.placement-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem 2rem;
}

.placement-nav-skip {
  color: #8b7d3c;
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.placement-nav-skip:hover {
  color: #6b5f2b;
  text-decoration: underline;
}

.placement-nav-next {
  padding: 0.625rem 1.5rem;
  background: #8b7d3c;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-left: auto;
}

.placement-nav-next:hover {
  background: #6b5f2b;
}

.placement-nav-next:disabled {
  background: #c4bda6;
  cursor: not-allowed;
}

/* ─── Intro Screen ─── */
.placement-intro {
  text-align: center;
  padding: 1rem 0;
}

.placement-intro h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.placement-intro p {
  color: #5a5035;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 28rem;
  margin: 0 auto 1.5rem;
}

.placement-intro-start {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  background: #8b7d3c;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 1.1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.placement-intro-start:hover {
  background: #6b5f2b;
}

/* ─── Result Screen ─── */
.placement-result {
  text-align: center;
  padding: 1rem 0;
}

.placement-result h2 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.placement-result .result-level {
  font-family: "Latin Modern Roman", Georgia, serif;
  color: #8b7d3c;
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 1rem;
}

.placement-result .result-description {
  color: #5a5035;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 28rem;
  margin: 0 auto 2rem;
}

.placement-result-cta {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  background: #8b7d3c;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.placement-result-cta:hover {
  background: #6b5f2b;
}

.placement-result .result-retake {
  display: block;
  margin: 1rem auto 0;
  color: #8b7d3c;
  font-size: 0.875rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.2s ease;
}

.placement-result .result-retake:hover {
  color: #6b5f2b;
  text-decoration: underline;
}

/* ─── Newsletter form on result screen ─── */
.placement-newsletter {
  max-width: 24rem;
  margin: 0 auto 1rem;
}

.placement-newsletter p {
  color: #5a5035;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.placement-newsletter-form {
  display: flex;
}

.placement-newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.625rem 1rem;
  background: #f7f3eb;
  border: 1px solid #ece6d8;
  border-right: none;
  border-radius: 0.375rem 0 0 0.375rem;
  color: #3d3520;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.placement-newsletter-form input[type="email"]::placeholder {
  color: rgba(90, 80, 53, 0.5);
}

.placement-newsletter-form input[type="email"]:focus {
  box-shadow: 0 0 0 2px rgba(139, 125, 60, 0.3);
}

.placement-newsletter-form button {
  padding: 0.625rem 1.25rem;
  background: #8b7d3c;
  color: white;
  border: 1px solid #8b7d3c;
  border-radius: 0 0.375rem 0.375rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.placement-newsletter-form button:hover {
  background: #6b5f2b;
  border-color: #6b5f2b;
}

/* ─── Responsive ─── */
@media (max-width: 767px) {
  .placement-main {
    padding: 1.5rem 1rem;
  }

  .placement-slide {
    padding: 2rem 1.25rem 1.25rem;
  }

  .placement-slide h2 {
    font-size: 1.4rem;
  }

  .placement-nav {
    padding: 0 1.25rem 1.5rem;
  }

  .placement-board {
    max-width: 100%;
  }

  .placement-yesno {
    flex-direction: column;
  }

  .placement-option {
    min-height: 48px;
  }
}
