body {
  /* just to keep the nested selectors as specific as possible */

  .lp-single-course {
    #course-item-content-header {
      top: var(--wp-admin--admin-bar--height, 0);

      position: fixed;
      z-index: 9999;

      > .toggle-content-item {
        top: var(--wp-admin--admin-bar--height, 0);
      }
    }

    #popup-course {
      display: flex;
      position: fixed;
      background: #fff;
      height: calc(100% - 70px);
      border-top: 3px solid #b5151c;

      #popup-sidebar {
        z-index: 1000 !important;

        #learn-press-course-curriculum {
          .learn-press-breadcrumb {
            list-style: none;
            color: #2b3339;
            font-weight: 700;

            margin-inline: 20px;
            margin-block: 0.75rem;

            li,
            span {
              font-weight: inherit;
            }
          }
        }

        &:not(.closed) {
          @media (max-width: 767px) {
            flex-basis: 100dvh;
          }
        }
      }

      #popup-content {
        @media (max-width: 767px) {
          margin-top: 0;
          margin-bottom: 0;
        }
      }

      #popup-footer {
        left: 0;
        max-width: unset;

        border-top-style: none;

        .course-item-nav {
          justify-content: center;
          gap: 2rem;
        }
      }
    }

    @media (max-width: 767px) {
      #popup-sidebar:not(.closed) ~ #popup-footer {
        display: none;
      }
    }
  }
}

@media (max-width: 767px) {
  .viewing-course-item #cbra-header__img-col .elementor-element-populated {
    padding: 5px 20px 5px 20px;
  }
}

body.admin-bar {
  .content-area {
    #popup-course {
      top: calc(
        var(--wp-admin--admin-bar--height, 0) + 95px
      ); /* 95px = course header */

      @media (max-width: 767px) {
        top: calc(var(--wp-admin--admin-bar--height, 0) + 75px);
      }
    }
  }
}

@media (max-width: 768px) {
  .content-item-wrap .quiz-buttons.align-center .button-left {
    bottom: 10% !important;
  }

  .content-item-wrap .questions-pagination .nav-links .page-numbers {
    align-items: flex-end !important;
  }

  .content-item-wrap .questions-pagination .nav-links .page-numbers.next,
  .content-item-wrap .questions-pagination .nav-links .page-numbers.prev {
    padding: 0 !important;
  }
}

.items-progress > :first-child {
  color: #888888;
}

.learnpress-v3.course-item-popup
  #course-item-content-header.thim-course-item-header
  .toggle-content-item {
  display: none; /* removes arrow icons */
}

body.single-lp_course.viewing-course-item
  .global-header
  .elementor-widget-nav-menu {
  display: none; /* removes the hamburger menu */
}
