/* games/scenario_choice/scenario_choice.css */

.scn-card {
  --scn-option-font-size: 17px;
  --scn-option-card-height: clamp(92px, 12vh, 108px);
  --scn-options-gap: 14px;
  --scn-situation-options-gap: clamp(24px, 7vh, 68px);
  --scn-footer-dock-height: 84px;

  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  color: #1c2342;
  padding-bottom: 96px; /* 84 + 12 */
}

/* Meta-Infos oben */
.scn-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #6b6f76;
}

.scn-topic {
  font-weight: 600;
}

.scn-counter {
  opacity: 0.8;
}

/* Situation / Szenario-Bereich (Chat-artig) */
.scn-situation {
  display: block;
  margin-top: 24px;
}

/* Chat-Bubble mit Titel und Text */
.scn-bubble {
  flex: 1;
  border-radius: 16px;
  background: linear-gradient(135deg, #f7f7fb, #eef0f7);
  border: 1px solid rgba(28, 35, 66, 0.08);
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* Title innerhalb des Bubbles */
.scn-situation-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1c2342;
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(28, 35, 66, 0.08);
  margin-bottom: 10px;
}

/* Text (kann mehrere Absätze enthalten) */
.scn-situation-text {
  font-size: 0.95rem;
  text-align: center;
  color: #4a4d57;
  line-height: 1.5;
}

.scn-situation-text p + p {
  margin-top: 8px;
}

/* Hinweis innerhalb der Bubble */
.scn-hint {
  display: block;
  font-size: 0.82rem;
  color: rgba(28, 35, 66, 0.45);
  font-style: italic;
  border-top: 1px solid rgba(28, 35, 66, 0.07);
  padding-top: 6px;
  margin-top: 6px;
  text-align: center;
}

/* Antwort-Optionen im „Chat-Button”-Style */
.scn-options {
  display: flex;
  flex-direction: column;
  gap: var(--scn-options-gap);
  margin-top: auto;
  padding-top: var(--scn-situation-options-gap);
}

/* Jede Option als große, gut klickbare Fläche */
.scn-option {
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
  font: inherit;
  position: relative;
  width: 100%;
  text-align: left;

  min-height: var(--scn-option-card-height);
  height: var(--scn-option-card-height);
  padding: 14px 16px 14px 38px;
  border-radius: 14px;
  border: 1px solid #d6d8e0;
  background: linear-gradient(180deg, #fffaf3 0%, #f3e6cb 100%);
  cursor: pointer;
  font-size: var(--scn-option-font-size);
  line-height: 1.4;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.08s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}
.scn-option-text {
  display: block;
  margin-left: 26px;
}
  

/* Option-Buchstabe (A, B, C...) links */
.scn-option-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8e7be 0%, #eed39c 100%);
  color: #2a1f0f;
  font-size: 0.98rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Automatik je Anzahl Antworten */
.scn-card.scn-card--options-4 {
  --scn-option-card-height: clamp(82px, 10.2vh, 96px);
  --scn-options-gap: 10px;
  --scn-situation-options-gap: clamp(12px, 3.5vh, 30px);
}

.scn-card.scn-card--options-3 {
  --scn-option-card-height: clamp(96px, 12.4vh, 114px);
  --scn-options-gap: 14px;
  --scn-situation-options-gap: clamp(24px, 7vh, 68px);
}

.scn-card--auto-advance .game-footer-row {
  display: none;
}

.scn-footer-row {
  --gm-dock-height: 84px;
  --gm-dock-bg: #1c2342;
}

.scn-next-btn {
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0 20px 3px;
}

/* Hover-Effekt (Mobile nur minimal spürbar) */
.scn-option:hover:not(.scn-option--disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Hover-Transform auf Touch deaktivieren */
@media (hover: none) {
  .scn-option:hover:not(.scn-option--disabled) {
    transform: none;
    box-shadow: none;
  }
}

/* Zustand: ausgewählt, noch nicht ausgewertet */
.scn-option--selected {
  border-color: #1c2342;
  background: #ecefff;
  box-shadow: 0 3px 10px rgba(28, 35, 66, 0.2);
}

/* Zustand: disabled nach Beantwortung */
.scn-option--disabled {
  cursor: default;
}

/* Zustand: richtige Antwort */
.scn-option--correct {
  border-color: #2e7d32;
  background: linear-gradient(135deg, #e8f5e9, #f7fff9);
  color: #1b3f21;
  box-shadow: 0 3px 10px rgba(46, 125, 50, 0.25);
}

/* Zustand: falsche Antwort */
.scn-option--wrong {
  border-color: #c62828;
  background: #ffebee;
  color: #7b1f1f;
  animation: scn-shake 0.25s ease-out;
}

/* Mini-Icon rechts, wenn korrekt */
.scn-option--correct::after {
  content: "✓";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) scale(1);
  font-size: 1.9rem;
  opacity: 0.9;
}

/* Mini-Icon rechts, wenn falsch */
.scn-option--wrong::after {
  content: "!";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) scale(1);
  font-size: 1.9rem;
  opacity: 0.9;
}

/* Karte bekommt beim Auswerten zusätzlich Zustände (für Puls & Confetti) */
.game-card.scn-card--correct {
  animation: scn-card-pulse 0.4s ease-out;
}

.game-card.scn-card--wrong {
  animation: scn-card-nudge 0.25s ease-out;
}

/* Inline-Erklärung zur gewählten Option (im Feedback-Text) */
.scn-feedback-extra {
  display: block;
  margin-top: 3px;
  font-size: 0.8rem;
  color: #4a4d57;
}

/* ======================================
   Confetti für richtige Entscheidung
   ====================================== */

.scn-confetti-piece {
  position: absolute;
  width: 6px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  animation: scn-confetti 0.7s ease-out forwards;
}

@keyframes scn-confetti {
  0% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(40px) translateX(10px) rotate(25deg) scale(0.9);
  }
}

/* ======================================
   Keyframes für Shake / Pulse
   ====================================== */

@keyframes scn-shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
  75% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes scn-card-pulse {
  0% {
    transform: scale(0.98);
  }
  45% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes scn-card-nudge {
  0% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(0);
  }
}

/* ======================================
   Mobile Feintuning
   ====================================== */

@media (max-width: 600px) {
  .scn-card {
    --scn-option-card-height: clamp(88px, 11.2vh, 100px);
    gap: 8px;
    padding-top: 28px;
    padding-bottom: 100px; /* 84 + 16 */
    min-height: 100%;
  }

  .scn-meta-row {
    font-size: 0.9rem;
  }

  .scn-situation {
    margin-top: 20px;
  }

  .scn-bubble {
    padding: 14px 12px;
  }

  .scn-situation-title {
    font-size: 1rem;
  }

  .scn-situation-text {
    font-size: 0.9rem;
  }

  .scn-option {
    font-size: var(--scn-option-font-size);
    line-height: 1.35;
    padding: 14px 14px 14px 36px;
  }

  .scn-option-label {
    left: 10px;
    width: 24px;
    height: 24px;
    font-size: 0.82rem;
  }

  .scn-option-text {
    margin-left: 18px;
  }

  .scn-options {
    margin-top: auto;
  }

  .scn-card.scn-card--options-4 {
    --scn-option-card-height: clamp(80px, 9.8vh, 92px);
    --scn-options-gap: 9px;
    --scn-situation-options-gap: clamp(10px, 3vh, 24px);
  }
}

