/*
 * Learning outcome coverage in the Journey Analytics panel (OutcomeCoverage.js)
 *
 * Bauhaus: a black frame, square cells with a 2px gap, a navy header, one blue
 * for coverage (light to dark) and red for an outcome no session covers.
 * The blue steps were checked as a sequential scale (one hue, each step
 * darker, the lightest at 2:1 against white) and the numbers on them reach
 * at least 5.3:1.
 */

.oc {
  border-top: 2px solid var(--bh-black, #111);
  padding-top: 1rem;
}

.oc-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.oc-summary {
  margin-bottom: 0.75rem;
}

.oc-empty,
.oc-hint {
  color: #555;
  font-size: 0.85rem;
  margin: 0;
}

.oc-hint {
  margin-top: 0.75rem;
}

/* "Øktdetaljer" in the hint under the storyboard: opens the drawer (1.41.1) */
.oc-details-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--bh-blue, #2B4C8C);
  font-weight: 600;
  text-decoration: underline;
}

#session-course-outcomes-title:focus {
  outline: none;
}

#session-course-outcomes-title:focus-visible {
  outline: 2px solid var(--bh-gold, #E8A820);
  outline-offset: 2px;
}

/* Many sessions: the grid scrolls sideways inside the panel */
.oc-scroll {
  overflow-x: auto;
  padding: 0 6px 6px 0; /* room for the offset shadow */
}

.oc-grid {
  border-collapse: separate;
  border-spacing: 2px;
  width: 100%;
  background: var(--bh-white, #fff);
  border: 2px solid var(--bh-black, #111);
  box-shadow: var(--bh-shadow-sm, 3px 3px 0 #111);
}

.oc-grid thead th {
  background: var(--bh-navy, #1B2A4A);
  color: var(--bh-white, #fff);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.5rem;
  vertical-align: bottom;
}

.oc-outcome-head {
  min-width: 14rem;
}

.oc-sessions-head {
  text-align: center;
}

.oc-session {
  width: 2.6rem;
  min-width: 2.6rem;
  text-align: center;
}

.oc-session-current {
  width: 6rem;
  white-space: nowrap;
}

.oc-total-head {
  width: 9rem;
  min-width: 8rem;
}

/* The outcome: category square, SOLO square, text (two lines at most) */
.oc-outcome {
  font-weight: 400;
  padding: 0.35rem 0.5rem;
  background: var(--bh-white, #fff);
}

.oc-outcome-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.oc-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.85rem;
  line-height: 1.3;
}

.oc-cat,
.oc-solo {
  flex: 0 0 auto;
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.2rem;
  border: 1px solid var(--bh-black, #111);
}

/* Same category colours as the learning outcome tab (course-info-tabs.css) */
.oc-cat-knowledge { background: var(--category-knowledge, #9575cd); }
.oc-cat-skills { background: var(--category-skills, #4fc3f7); }
.oc-cat-competence { background: var(--category-competence, #81c784); }

/* Cells: coverage in a session, as a number on a shade of blue */
.oc-cell {
  height: 2.6rem;
  text-align: center;
  vertical-align: middle;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bh-black, #111);
}

.oc-lnone { background: var(--bh-white, #fff); outline: 1px solid #d4d0c8; outline-offset: -1px; }
.oc-l0 { background: var(--bh-cream, #F5F0E6); }
.oc-l1 { background: #A2B6DC; }
.oc-l2 { background: #7392C9; }
.oc-l3 { background: #456AAE; color: #fff; }
.oc-l4 { background: var(--bh-blue, #2B4C8C); color: #fff; }

/* Total per outcome: a bar and the percentage, or "not covered" in red */
.oc-total {
  padding: 0.35rem 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
}

.oc-bar {
  display: inline-block;
  width: 4.5rem;
  height: 0.6rem;
  margin-right: 0.4rem;
  border: 1px solid var(--bh-black, #111);
  background: var(--bh-white, #fff);
  vertical-align: middle;
}

.oc-bar span {
  display: block;
  height: 100%;
  background: var(--bh-navy, #1B2A4A);
}

.oc-pct {
  font-weight: 700;
  font-size: 0.8rem;
}

.oc-gap {
  display: inline-block;
  background: var(--bh-red, #C0392B);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
}

.oc-uncovered .oc-outcome {
  box-shadow: inset 4px 0 0 var(--bh-red, #C0392B);
}

/* This session: outcomes the session doesn't touch are faded */
.oc-muted .oc-outcome,
.oc-muted .oc-cell {
  opacity: 0.45;
}

/* Legend and category totals */
.oc-legend,
.oc-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

.oc-legend-label {
  font-weight: 700;
}

.oc-key {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.oc-swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 1px solid var(--bh-black, #111);
}

.oc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 2px solid var(--bh-black, #111);
  background: var(--bh-white, #fff);
  padding: 0.2rem 0.5rem;
}

.oc-chip-gap {
  border-color: var(--bh-red, #C0392B);
}

@media print {
  .oc-scroll { overflow: visible; }
  .oc-grid { box-shadow: none; }
}
