/* games/sentence_builder/sentence_builder.css */

.sb-card-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 20px 20px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  color: #1c2342;
}

/* Meta-Zeile */

.sb-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #6b6f76;
}

.sb-topic {
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sb-counter {
  opacity: 0.8;
}

/* Frage & Text */

.sb-question {
  margin: 4px 0 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.sb-instruction {
  margin: 0;
  font-size: 0.9rem;
  color: #555c6c;
  line-height: 1.45;
}

/* Audio-Block */

.sb-audio-wrapper {
  margin-top: 2px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8f5ee 0%, #f1ebdf 100%);
  border: 1px solid rgba(232, 189, 79, 0.28);
  box-shadow: 0 10px 24px rgba(84, 56, 10, 0.08);
}

.sb-audio-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b6c29;
}

.sb-audio-btn {
  border: 1px solid rgba(28, 35, 66, 0.08);
  border-radius: 999px;
  width: auto;
  min-height: 48px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f1e8 100%);
  color: #1c2342;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    color 0.12s ease;
}

.sb-audio-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #efe7d4 100%);
}

.sb-audio-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.22);
}

.sb-audio-btn.is-playing {
  background: linear-gradient(180deg, #1c2342 0%, #2b355f 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(28, 35, 66, 0.28);
  transform: translateY(-1px) scale(1.03);
}

.sb-audio-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.sb-audio-text {
  font-size: 0.92rem;
  font-weight: 700;
}

/* Antwortbereich */

.sb-answer-area {
  margin-top: 2px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7f7fb 0%, #eff1f6 100%);
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(28, 35, 66, 0.08);
}

.sb-answer-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
}

.sb-answer-slots {
  min-height: 60px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(28, 35, 66, 0.14);
}

/* Wortbank */

.sb-word-bank {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-word-bank-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
}

.sb-word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Wortchips */

.sb-word {
  border: 1px solid rgba(28, 35, 66, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  background: linear-gradient(180deg, #ffffff 0%, #f2f4f7 100%);
  color: #1c2342;
  cursor: pointer;
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease,
    background 0.1s ease,
    border-color 0.1s ease;
}

.sb-word:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #ebe5d6 100%);
  border-color: rgba(232, 189, 79, 0.45);
}

/* Buttons */

.sb-actions {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.sb-btn {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.sb-btn-reset {
  background: transparent;
  color: #6b6f76;
  border: none;
  padding-left: 0;
  padding-right: 0;
  text-decoration: underline;
}

.sb-btn-reset:hover {
  background: transparent;
}

.sb-btn-check {
  background: linear-gradient(180deg, #1c2342 0%, #2a3560 100%);
  color: #ffffff;
  min-width: 160px;
  box-shadow: 0 10px 18px rgba(28, 35, 66, 0.18);
}

.sb-btn-check:hover {
  filter: brightness(1.05);
}

.sb-btn-check:disabled {
  opacity: 0.48;
  cursor: default;
  box-shadow: none;
}

/* Feedback & Zustände */

.sb-feedback {
  margin-top: 4px;
  min-height: 18px;
  font-size: 0.9rem;
}

.sb-card-main.sb-correct {
  box-shadow: 0 0 0 2px #16a34a33, 0 20px 45px rgba(15, 23, 42, 0.22);
}

.sb-card-main.sb-wrong {
  box-shadow: 0 0 0 2px #dc262633, 0 20px 45px rgba(15, 23, 42, 0.22);
}

/* Desktop breiter */

@media (min-width: 1024px) {
  .sb-card-main {
    padding: 22px 24px 24px;
    border-radius: 26px;
  }

  .sb-question {
    font-size: 1.2rem;
  }

  .sb-audio-btn {
    min-height: 50px;
    padding: 0 18px;
  }
}

/* Mobile */

@media (max-width: 640px) {
  .sb-card-main {
    padding: 16px 14px 16px;
    border-radius: 18px;
  }

  .sb-question {
    font-size: 1rem;
  }

  .sb-audio-wrapper {
    margin-top: 4px;
    padding: 10px 12px;
  }

  .sb-audio-btn {
    min-height: 44px;
    width: 100%;
    padding: 0 14px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.22);
  }

  .sb-audio-icon {
    font-size: 1.1rem;
  }

  .sb-audio-text {
    font-size: 0.88rem;
  }

  .sb-actions {
    flex-direction: row;
  }

  .sb-btn-check {
    min-width: 138px;
  }
}

