.course-video-teaser,
.course-video-prompt {
  border: 1px solid #384968;
  border-radius: 12px;
  background: #151d2d;
  color: var(--text);
}
.course-video-teaser {
  display: flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 15px 8px 8px;
}
.course-video-teaser:hover,
.course-video-prompt:focus-within,
.course-video-prompt:hover { border-color: #91aaff; }
.course-video-thumb {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 88px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 7px;
  background: var(--surface);
}
.course-video-thumb img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-video-play {
  z-index: 0;
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #cad8ff80;
  border-radius: 50%;
  background: #0b1426dc;
  color: #fff;
}
.course-video-play::before {
  content: "";
  margin-left: 2px;
  border: solid transparent;
  border-width: 5px 0 5px 8px;
  border-left-color: currentColor;
}
.course-video-thumb .course-video-play {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 25px;
  height: 25px;
}
.course-video-teaser strong,
.course-video-prompt strong { display: block; font-size: 13px; line-height: 1.35; }
.course-video-teaser small,
.course-video-prompt small { display: block; margin-top: 3px; color: #b5c3dc; font-size: 11px; }

.course-video-prompt {
  position: fixed;
  z-index: 70;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  max-width: calc(100% - 28px);
  box-shadow: 0 6px 22px #0006;
}
.course-video-prompt > a { display: flex; align-items: center; gap: 10px; padding: 10px 0 10px 10px; }
.course-video-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b5c3dc;
  font-size: 24px;
  line-height: 1;
}
.course-video-close:hover { color: #fff; }
.course-video-prompt .course-video-close:focus-visible { outline-offset: -5px; }

body:has(.course-video-dialog[open]) { overflow: hidden; }
.course-video-dialog {
  width: min(820px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #384968;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}
.course-video-dialog::backdrop { background: rgb(0 0 0 / 76%); }
.course-video-dialog header { position: relative; padding-right: 41px; margin-bottom: 14px; }
.course-video-dialog header .course-video-close { position: absolute; top: -9px; right: -9px; }
.course-video-dialog h2 { font-size: clamp(22px, 3vw, 28px); text-wrap: initial; }
.course-video-dialog p { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.course-video-player {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #000;
}
.course-video-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.course-video-next {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 20px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #384968;
  border-radius: 9px;
  background: #151d2d;
}
.course-video-next h3 { font-size: 16px; text-wrap: initial; }
.course-video-next .button { min-height: 44px; padding: 9px 14px; font-size: 13px; }
.course-video-external { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: #b5caff; font-size: 12px; }
.course-video-external:hover { text-decoration: underline; }

@media (max-width: 680px) {
  .course-video-prompt { right: 14px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .mobile-action:has(.mobile-sticky.visible) + .course-video-prompt {
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 62px);
  }
  .course-video-dialog { padding: 16px; }
}
@media (max-width: 520px) {
  .course-video-next { grid-template-columns: 1fr; }
}
