/* Portal: student results page */
.results-header {
  margin-bottom: var(--dstp);
}

.results-header h1 {
  margin-bottom: 0.25rem;
}

.results-header p {
  color: var(--darkgray);
  font-weight: 400;
}

.results-header .greeting {
  margin-top: .8rem;
  font-size: 1.6rem;
  font-weight: 400;
  color: #000;
}

/* Score summary bars */
.score-bars-section {
  display: flex;
  flex-direction: column;
  gap: var(--hstp);
  margin-bottom: var(--dstp);
}

.score-bar-container {
  display: flex;
  align-items: center;
  gap: var(--stp);
}

.score-bar {
  flex: 1;
  max-width: 300px;
  height: 1.2rem;
  background: #eee;
  border-radius: 0.6rem;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 0.6rem;
  transition: width 0.3s ease;
}

.score-bar-fill.score-bar-good { background: #2e7d32; }
.score-bar-fill.score-bar-danger { background: #c62828; }

.score-bar-summary {
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}

.results-section {
  margin-bottom: var(--dstp);
}

.results-section h2 {
  margin-bottom: var(--stp);
}

.results-section h3 {
  margin-top: var(--dstp);
  margin-bottom: var(--hstp);
}

/* Collapsible assignment details */
.assignment-details summary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.assignment-details summary::-webkit-details-marker { display: none; }

.assignment-details summary h3 {
  margin-top: 0;
  margin-bottom: 0;
}

h2 + .results-section .assignment-details {
  margin-top: var(--stp);
}

.details-arrow {
  transition: transform 0.25s ease;
  transform: rotate(-90deg);
}

.assignment-details[open] .details-arrow {
  transform: rotate(0deg);
}

.assignment-details .details-table {
  margin-top: var(--hstp);
}
