/* Courses module: catalogue cards, course page, quiz page. */
.course-card {
  transition: transform .15s ease, box-shadow .15s ease;
}

.course-card:hover,
.course-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .08);
}

.course-cover {
  aspect-ratio: 16 / 7;
  width: 100%;
  object-fit: cover;
  background: var(--gic-green-light);
}

.course-cover-placeholder {
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gic-green) 0%, var(--gic-green-dark) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: .06em;
}

.course-cover-placeholder.v1 { background: linear-gradient(135deg, #1f6f5c 0%, #154d40 100%); }
.course-cover-placeholder.v2 { background: linear-gradient(135deg, #2a5d8f 0%, #1c4166 100%); }
.course-cover-placeholder.v3 { background: linear-gradient(135deg, #5b6b1f 0%, #3f4a14 100%); }
.course-cover-placeholder.v4 { background: linear-gradient(135deg, #7a4b16 0%, #56340f 100%); }
.course-cover-placeholder.v5 { background: linear-gradient(135deg, #4b3f8f 0%, #332b63 100%); }

.course-card .card-title a {
  color: inherit;
  text-decoration: none;
}

.course-meta {
  font-size: .85rem;
  color: #5c6660;
}

.tag-chip {
  display: inline-block;
  font-size: .75rem;
  padding: .1rem .5rem;
  border-radius: 1rem;
  background: var(--gic-green-light);
  color: var(--gic-green-dark);
  margin: 0 .25rem .25rem 0;
}

.course-hero {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: .75rem;
}

.course-hero .course-cover,
.course-hero .course-cover-placeholder {
  border-radius: .5rem;
}

.description-md > :last-child {
  margin-bottom: 0;
}

.chapter-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.chapter-row:last-child {
  border-bottom: 0;
}

.chapter-no {
  flex: 0 0 2.75rem;
  height: 2.75rem;
  border-radius: .5rem;
  background: var(--gic-green-light);
  color: var(--gic-green-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chapter-body {
  flex: 1 1 auto;
  min-width: 0;
}

.chapter-links .btn {
  margin: .25rem .25rem 0 0;
}

.quiz-question {
  border-left: 4px solid var(--gic-green);
}

.quiz-question.teacher-only {
  border-left-color: #b35c00;
}

.quiz-question .question-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.quiz-options {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quiz-options li {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: .5rem;
  padding: .5rem .75rem;
  margin-top: .5rem;
  overflow-wrap: anywhere;
}

.quiz-options .option-letter {
  flex: 0 0 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #eef1ed;
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-options li.is-correct {
  border-color: #198754;
  background: #e8f5ee;
}

.quiz-options li.is-correct .option-letter {
  background: #198754;
  color: #fff;
}

.badge-teacher {
  background: #fff1e0;
  color: #7a3e00;
  border: 1px solid #f0c48f;
}

.member-table td,
.member-table th {
  white-space: nowrap;
}

.member-table td.wrap {
  white-space: normal;
}

.cover-preview {
  max-width: 18rem;
  border-radius: .5rem;
}
