kurs-showcase { display: block; min-width: 0; }
kurs-showcase[hidden] { display: none; }

.course-showcase {
  --show-bg: #0e131c;
  --show-bar: #141b29;
  --show-line: #293449;
  --show-text: #ecf1fc;
  --show-muted: #a2b0c7;
  --show-blue: #86a9ff;
  color: var(--show-text);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}

.showcase-window {
  overflow: hidden;
  background: var(--show-bg);
  border: 1px solid #374664;
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(2, 7, 19, .28);
}

.showcase-window-bar {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.45rem;
  padding: .3rem .8rem;
  background: var(--show-bar);
  border-bottom: 1px solid var(--show-line);
  font-size: .78rem;
}

.showcase-window-mark {
  display: grid;
  width: 1.24rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 6px;
  background: #2f66e6;
  color: white;
}
.showcase-window-mark svg { width: .9rem; height: .9rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.showcase-window-bar strong + span { margin-inline-start: auto; color: var(--show-muted); }
.showcase-viewport {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: clamp(14rem, 29vw, 21rem);
  line-height: 1.35;
}

.showcase-frames, .showcase-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

/* Inactive items still size the shared grid cell. */
.showcase-frame, .showcase-caption-entry {
  grid-area: 1 / 1;
  min-width: 0;
  visibility: hidden;
}

.showcase-frame.active, .showcase-caption-entry.active { visibility: visible; }
.showcase-caption { grid-area: caption; }
.showcase-caption strong { display: block; line-height: 1.3; font-size: 1rem; }
.showcase-caption p { margin: .25rem 0 0; color: #b6c4dc; font-size: .84rem; line-height: 1.4; }
.showcase-caption .site-language-secondary { color: #a9bcdf; }
.course-showcase.showcase-nb-only .preview-screen .pv-pl-gloss { display: none; }
html[lang="nb"] .preview-screen .pv-scene:not(.pv-eksamen) .pv-heading > p { display: none; }
.showcase-meta {
  display: grid;
  grid-template: "caption caption" auto "dots toggle" auto / 1fr auto;
  align-items: center;
  gap: .5rem;
  padding: .65rem .15rem 0;
}

.showcase-dots { grid-area: dots; display: flex; align-items: center; flex-wrap: wrap; }
.showcase-dots button, .showcase-toggle {
  appearance: none;
  border: 0;
  background: none;
  color: var(--show-muted);
  font: inherit;
  cursor: pointer;
}

.showcase-dots button { position: relative; width: 1.65rem; height: 2rem; padding: 0; border-radius: .4rem; }
.showcase-dots button::before {
  content: "";
  position: absolute;
  inset: 0;
  width: .45rem;
  height: .45rem;
  margin: auto;
  border-radius: 999px;
  background: currentColor;
}

.showcase-dots button[aria-pressed="true"] { color: var(--show-blue); }
.showcase-dots button[aria-pressed="true"]::before { width: .84rem; }
.showcase-toggle { grid-area: toggle; min-height: 2rem; min-inline-size: 6.1rem; padding: 0 .35rem; border-radius: .4rem; font-size: .83rem; }
.showcase-toggle:hover, .showcase-dots button:hover { color: white; }
.course-showcase button:focus-visible { outline: 2px solid var(--show-blue); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .showcase-frame.active { animation: showcase-in .25s ease-out both; }
  @keyframes showcase-in { from { opacity: .35; } to { opacity: 1; } }
}
