/* Course descriptions: load this stylesheet on the Teaching page. */
.course-tooltip {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.course-title {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
  cursor: help;
}

.course-title:focus-visible {
  outline: 2px solid var(--accent, #405e76);
  outline-offset: 3px;
}

.course-popup {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  width: min(24rem, calc(100vw - 3rem));
  padding: 0.8rem 1rem;
  border: 1px solid var(--border, #d9dee3);
  border-radius: 4px;
  background: #ffffff;
  color: var(--text, #20252b);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
}

.course-tooltip.is-open .course-popup {
  display: block;
}

/* Keep long descriptions within the screen on phones. */
@media (max-width: 600px) {
  .course-popup {
    position: fixed;
    top: auto;
    bottom: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    width: auto;
    max-height: 55vh;
    overflow-y: auto;
  }
}
.course-title {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.course-title:hover,
.course-title:focus-visible {
  color: var(--accent, #405e76);
  text-decoration: underline;
}
.course-title {
  color: var(--accent, #405e76);
  text-decoration: none;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.course-title:hover,
.course-title:focus-visible {
  color: var(--text, #20252b);
  text-decoration-style: solid;
}
