/*
 * Phone-friendly overrides for the course player.
 *
 * Everything lives inside a small-screen media query, so the desktop layout
 * is untouched. Rise sets the root font size to 62.5% (1rem = 10px), so sizes
 * here are in px to keep them predictable.
 */
@media (max-width: 767.98px) {
  /* Never let the page scroll sideways. `clip` (unlike `hidden`) does not
     create a scroll container, so sticky headers keep working. */
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  /* Long words and URLs wrap instead of pushing the layout wider. */
  body #app {
    overflow-wrap: break-word;
  }

  /* Images and embeds scale down to fit their column. */
  body #app img,
  body #app video {
    max-width: 100%;
    height: auto;
  }

  body #app iframe,
  body #app embed,
  body #app object {
    max-width: 100%;
  }

  /* Body text: at least 16px. */
  body #app .lesson-header__author-name,
  body #app .cover__header-content-authors-name,
  body #app .cover__header-content-action-link-text,
  body #app .overview-list-item__title,
  body .continue-hint__content,
  body .flashcard-side-flip__tooltip {
    font-size: 16px;
  }

  body #app .overview-list-item__title {
    line-height: 1.35;
  }

  /* Tap targets: at least 44 x 44px. */
  body .nav-control__button,
  body .nav-sidebar-header__search-btn,
  body .nav-sidebar-search__close,
  body .flashcard-side-flip__btn {
    min-width: 44px;
    min-height: 44px;
  }

  body .flashcard-side-flip__btn {
    flex-shrink: 0;
  }

  body .flashcard-side-flip__btn--round {
    width: 44px;
    height: 44px;
  }

  body .cover__header-content-action-link {
    min-height: 44px;
  }
}
