/* Public course catalog and its description/overview dialog. */
body.theme-source .public-course-catalog__intro {
  padding-top: 2.5rem;
}

body.theme-source .public-course-catalog__intro h1,
body.theme-source .public-course-modal__header h2 {
  font-family: var(--font-label);
  font-size: 1.15rem;
  font-weight: var(--type-weight-medium);
  letter-spacing: 0.2em;
  line-height: 1.5;
  text-transform: uppercase;
}

body.theme-source .public-course-catalog__intro p {
  margin-bottom: 0;
  color: var(--theme-text-muted);
}

body.theme-source .public-course-catalog {
  padding-bottom: 3rem;
}

body.theme-source .public-course-catalog__tabs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--theme-border-strong);
}

body.theme-source .public-course-catalog__tabs button {
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--theme-text-muted);
  font-family: var(--font-label);
  font-size: var(--type-size-label);
  font-weight: var(--type-weight-medium);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
}

body.theme-source .public-course-catalog__tabs button[aria-selected="true"] {
  border-bottom-color: var(--theme-primary-strong);
  color: var(--theme-primary-strong);
}

body.theme-source .public-course-catalog__count {
  letter-spacing: normal;
}

body.theme-source .public-course-catalog :focus-visible,
body.theme-source .public-course-modal :focus-visible {
  outline: 2px solid var(--theme-primary-strong);
  outline-offset: 3px;
}

body.theme-source .public-course-catalog__table {
  min-width: 760px;
}

body.theme-source .public-course-catalog__table thead th {
  font-family: var(--font-label);
  font-size: var(--type-size-micro);
  font-weight: var(--type-weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.theme-source .public-course-catalog__table tbody th {
  width: 42%;
  min-width: 250px;
  font-weight: var(--type-weight-normal);
}

body.theme-source .public-course-catalog__table td {
  font-size: var(--type-size-body-sm);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

body.theme-source .public-course-catalog__empty {
  padding: 2rem 1rem;
  color: var(--theme-text-muted);
}

body.theme-source.public-course-modal-open {
  overflow: hidden;
}

body.theme-source .public-course-modal {
  width: min(850px, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--theme-radius-md);
  background: var(--theme-modal-background);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow-lg);
  overscroll-behavior: contain;
}

body.theme-source .public-course-modal::backdrop {
  background: rgba(2, 6, 23, 0.7);
}

body.theme-source .public-course-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--theme-border);
}

body.theme-source .public-course-modal__header h2,
body.theme-source .public-course-modal__header form {
  margin: 0;
}

body.theme-source .public-course-modal__close {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--theme-radius-sm);
  background: var(--theme-surface-soft);
  color: var(--theme-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

body.theme-source .public-course-modal__body {
  padding: 1.5rem;
  overflow-wrap: anywhere;
}

body.theme-source .public-course-modal__description > :last-child {
  margin-bottom: 0;
}

body.theme-source .public-course-modal__body img,
body.theme-source .public-course-modal__body video {
  max-width: 100%;
  height: auto;
}

body.theme-source .public-course-modal__video {
  margin-top: 1.5rem;
}

@media (max-width: 575.98px) {
  body.theme-source .public-course-catalog__tabs {
    gap: 1rem;
  }

  body.theme-source .public-course-catalog__tabs button {
    letter-spacing: 0.06em;
  }

  body.theme-source .public-course-modal__header,
  body.theme-source .public-course-modal__body {
    padding: 1rem;
  }
}
