/* STAT 468 course book -- deck embedding and lecture metadata */

.lecture-meta {
  font-size: 0.95rem;
  color: #5a6570;
  margin-bottom: 1rem;
}

.lecture-meta .date {
  white-space: nowrap;
}

.lecture-meta p {
  margin: 0;
}

/* Row of actions above each embedded deck. Pandoc wraps the div's contents in
   a <p>, so the flex container has to be that paragraph. */
.deck-actions {
  margin: 1.25rem 0 0.75rem;
}

.deck-actions p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.deck-actions a {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
  color: #24292f;
  font-size: 0.9rem;
  text-decoration: none;
}

.deck-actions a:hover {
  background: #eaeef2;
  border-color: #afb8c1;
  text-decoration: none;
}

/* Responsive 16:9 frame holding the revealjs deck */
.deck-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 0.75rem;
}

.deck-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Inline PDF handout. Height is fixed rather than aspect-ratio driven, since
   handouts arrive in whatever page size their author used. */
.pdf-frame {
  height: min(80vh, 720px);
  border: 1px solid #d0d7de;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 0.75rem;
}

.pdf-frame object {
  width: 100%;
  height: 100%;
  border: 0;
}

.pdf-frame p {
  padding: 1rem;
}

.deck-hint {
  font-size: 0.85rem;
  color: #6a737d;
}

.deck-hint kbd {
  padding: 0.1rem 0.35rem;
  border: 1px solid #d0d7de;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #f6f8fa;
  font-size: 0.8rem;
}

/* Lecture index table on the home page */
table.lecture-index td:first-child {
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .lecture-meta { color: #9aa4ae; }
  .deck-actions a {
    background: #21262d;
    border-color: #30363d;
    color: #c9d1d9;
  }
  .deck-actions a:hover { background: #30363d; }
  .deck-frame { border-color: #30363d; background: #0d1117; }
  .deck-hint { color: #8b949e; }
  .deck-hint kbd { background: #21262d; border-color: #30363d; }
}
