/* Override back to default default */
html {
  overflow-y: auto !important;
}

h1 {
  font-size: 2em;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.big-modal {
  width: 90% !important;
}

@media screen and (min-width: 1024px) {
  .big-modal {
    max-width: 960px !important;
  }
}

@media screen and (min-width: 1216px) {
  .big-modal {
    max-width: 1152px !important;
  }
}

.hide {
  display: none !important;
}

.lecture-empty-layout {
  display: flex;
  justify-content: center;
  width: 100%;
}

.lecture-empty-content {
  display: flex;
  justify-content: center;
  width: 100%;
}

.lecture-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 36rem);
}

.menu-list a.lecture-menu-is-editing,
.menu-list a.lecture-menu-is-editing.is-active {
  background-color: #f4fafc !important;
  color: #1f2933 !important;
}

.menu-list a.lecture-menu-is-editing .lecture-menu-caption,
.menu-list a.lecture-menu-is-editing .lecture-menu-exercise-count {
  color: #1f2933 !important;
}

.lecture-menu-caption {
  align-items: center;
  display: flex;
  gap: .5rem;
  min-width: 0;
  width: 100%;
}

.lecture-menu-caption-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lecture-menu-item-inner {
  align-items: flex-start;
  display: flex;
  gap: .85rem;
  min-width: 0;
  width: 100%;
}

.lecture-menu-body {
  flex: 1 1 auto;
  min-width: 0;
}

.lecture-menu-drag-handle {
  align-self: center;
  flex: 0 0 auto;
}

@media screen and (max-width: 1023px) {
  .lecture-menu-drag-handle {
    display: none;
  }
}

.lecture-menu-drag-handle .icon {
  height: 1rem !important;
  pointer-events: auto !important;
  position: static !important;
  width: 1rem !important;
}

.lecture-menu-drag-handle,
.lecture-menu-drag-handle * {
  cursor: grab !important;
}

.lecture-menu-drag-handle:active,
.lecture-menu-drag-handle:active * {
  cursor: grabbing !important;
}

.lecture-menu-editor-state,
.menu-list a.is-active .lecture-menu-editor-state,
.menu-list a:hover .lecture-menu-editor-state {
  animation: lecture-menu-editor-pulse 1.4s ease-in-out infinite;
  color: #1b6d8f !important;
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1;
  margin-left: auto;
  white-space: nowrap;
}

@keyframes lecture-menu-editor-pulse {
  0%,
  100% {
    opacity: .64;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lecture-menu-editor-state {
    animation: none;
  }
}

.svg-container {
  position: relative;
}

.svg {
  position: absolute;
  right: -25px;
  top: 2px;
}

.rtl {
  direction: rtl;
  text-align: right;
}

.ltr {
  text-align: left;
}

.ctr {
  text-align: center;
}

.search-box .button {
  border-radius: 0px !important;
}

.highlight {
  background-color: yellow;
}

.num-submitted {
  float: right;
}

td,
th {
  word-wrap: break-word;
  max-width: 300px;
}

@media screen and (max-device-width: 1024px) {
  .hero-body {
    padding-top: 0 !important;
  }
}

/* .lecture_menu_item {
    white-space: nowrap;
}
.lecture_menu_item {
    overflow-x: auto;
} */

@media screen and (min-width: 769px) {
  /* .menu {
        border-right: 1px solid gray;
    } */
}

.menu {
  overflow-y: auto;
  overflow-x: hidden;
}

aside {
  position: relative;
}

.home {
  padding: 1rem;
}

.accordion_input+.accordion {
  display: none;
}

.accordion_input:checked+.accordion {
  display: block;
}

.accordion_input {
  display: none;
}

.ck-editor__editable[role="textbox"] {
  min-height: 300px;
}

.ck-content .image {
  max-width: 80%;
  margin: 20px auto;
}

.annotator-resize {
  display: none;
}

.annotator-editor .annotator-controls {
  text-align: left !important;
  display: flex !important;
  border-radius: 0 0 0 0 !important;
  -webkit-border-radius: 0 0 0 0 !important;
  padding: 0px !important;
}

.annotator-editor a {
  margin: 5px;
  font-weight: normal;
}

.annotator-wrapper {
  display: flex;
}

.annotator-widget {
  /* max-height: 165px; */
  min-width: 350px;
}

.annotator-item textarea {
  padding: 5px 5px !important;
}

.annotator-item textarea.check-direction {
  text-align: start !important;
}

.annotator-widget .check-direction .rtl {
  direction: rtl !important;
  text-align: right !important;
}

.annotator-widget .check-direction .ltr {
  direction: ltr !important;
  text-align: left !important;
}

.annotator-viewer .check-direction {
  color: #3c3c3c !important;
  line-height: 1.3 !important;
}

.annotator-viewer .check-direction > div {
  border-top: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  padding: 0 !important;
}

.annotator-editor .annotator-widget::after {
  background-position: 0 0 !important;
}

.span-td {
  padding: 0 !important;
  /* background-color: #f5f5f5; */
}

.of-inherit {
  overflow: inherit !important;
}

.of-scroll {
  overflow-x: auto !important;
}

.span-pre {
  padding: 0 !important;
  padding-left: 1rem !important;
}

.span-pre.line-numbered-pre {
  padding-left: 0 !important;
  overflow-x: hidden !important;
}

.code-lines-shell {
  display: flex;
  overflow-x: auto;
  width: 100%;
}

.line-number-gutter {
  flex: 0 0 auto;
  position: sticky;
  left: 0;
  z-index: 1;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 0 .75rem 0 .5rem;
  border-right: 1px solid #d8dce3;
  color: #7a8493;
  background: #f7f9fc;
  font-family: monospace;
  font-size: inherit;
  line-height: inherit;
  text-align: right;
  user-select: none;
  white-space: pre;
}

.code-lines-shell > pre {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.code-lines-shell > pre.line-numbered-pre {
  padding-left: .75rem !important;
}

.code-lines-shell > pre.line-numbered-pre code {
  white-space: pre !important;
}

.editor {
  display: none;
}

.prog {
  height: 30px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: bottom center, 50%, 50%;
  background-image: url("/static/img/spinner.gif");
}

.input-search-pending .prog {
  width: 25px;
  height: 25px;
}

.svg-trash-container {
  transform: translateY(3px);
  display: inline-block;
}

.dropdown.is-fullwidth,
.dropdown.is-fullwidth .dropdown-trigger,
.dropdown.is-fullwidth .dropdown-menu {
  width: 100%;
}

.image-style-align-right {
  float: right;
}

/* Add some custom styles if needed */
#class_dropdown .dropdown.is-hoverable .dropdown-trigger,
#class_dropdown .dropdown.is-hoverable .dropdown-menu {
  display: none !important;
}

#class_dropdown .dropdown.is-hoverable:hover .dropdown-trigger,
#class_dropdown .dropdown.is-hoverable:hover .dropdown-menu {
  display: block !important;
}

#class_dropdown .dropdown-content {
  display: none !important;
}

#class_dropdown .dropdown:hover .dropdown-content {
  display: block !important;
}

#class_dropdown .dropdown-content .dropdown-item:first-child {
  display: block !important;
}

.password-container {
  position: relative;
}

.password-container .toggle-icon {
  position: absolute;
  right: 35px;
  top: 50%;
  transform: translateY(-53%);
  cursor: pointer;
}

.password-container .gen-pass-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-53%);
  cursor: pointer;
}

.vcode-container {
  position: relative;
}

.vcode-container .gen-vcode {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-53%);
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .pl-mobile-0 {
    padding-left: 0 !important;
  }

  #triangle-container {
    display: none;
  }

  /* Main containers */
  .main-content.columns,
  .main-content.columns.is-fullheight {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    display: block !important;
  }

  /* Content areas */
  .lectures-content-menu-open,
  .lectures-content-menu-closed {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.75rem !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .lectures-side-menu-open,
  .lectures-side-menu-closed {
    width: 100% !important;
    margin-bottom: 1rem !important;
    box-sizing: border-box !important;
  }

  /* Lecture content */
  .lecture-content,
  .lecture-content>div {
    max-width: 100% !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  /* Tables */
  .table-container {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  .publish-row-table-container {
    overflow: visible !important;
  }

  /* Code blocks */
  pre {
    max-width: 100% !important;
    overflow-x: auto !important;
    white-space: pre !important;
  }

  code {
    white-space: pre !important;
  }

  /* Images */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* RTL/LTR content */
  .rtl,
  .ltr {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .copy-group-link-container {
    overflow-x: auto;
  }
}

@media screen and (min-width: 769px) {
  .triangle-menu-open {
    background: inherit;
    position: absolute;
    right: 0px;
    /* Position outside the right border */
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    /* Transparent on the left */
    border-right: 10px solid black;
    /* Creates the triangle pointing left */
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    cursor: pointer;
    z-index: 1;
    /* Ensure triangle is above other elements */
  }

  .triangle-menu-closed {
    background: inherit;
    position: absolute;
    /* Adjust based on the size of your triangle */
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid black;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 0px;
    cursor: pointer;
    z-index: 1;
    /* Ensure triangle is above other elements */
  }

  #triangle-container {
    position: relative;
    width: 10px;
    z-index: 1;
  }

  .triangle-container-menu-open {
    border-right: 1px solid gray;
    border-left: 0;
    margin-right: 0px;
    margin-left: 10px;
  }

  .triangle-container-menu-closed {
    border-left: 1px solid gray;
    border-right: 0;
    margin-left: 0px;
    margin-right: 10px;
  }

  .triangle-side-menu-container {
    width: 0%;
    /* Start with closed */
    transition: width 0.5s ease;
    /* Smooth animation */
  }

  .lectures-side-menu-open {
    width: 25% !important;
  }

  .lectures-side-menu-closed {
    width: 0% !important;
  }

  .lectures-content-menu-open {
    width: calc(75% - 20px) !important;
  }

  .lectures-content-menu-closed {
    width: calc(100% - 20px) !important;
  }
}

.hidden {
  visibility: hidden;
}

.input-search-container {
  position: relative !important;
}

.input-search-container .input-search-pending {
  position: absolute;
  right: 5px;
  top: 10%;
}

.input-search.expanded {
  width: 100% !important;
  /* End state of the animation */
}

.gap-1 {
  gap: 5px;
}

.items-center {
  align-items: center;
}

.flex {
  display: flex;
}

pre {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 75px;
  height: 30px;
  background: transparent;
  /* Removes the background color */
  border: none;
  /* Optionally remove the border */
  color: inherit;
  /* Inherit text color from parent or set a color */
  cursor: pointer;
  /* Optional: change the cursor to a pointer */
  user-select: none;
}

.my-modal {
  align-items: center;
  display: none;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: fixed;
  z-index: 40;
}

.bordered {
  border-radius: 4px;
  border: 1px solid #dbdbdb;
}

.ck-powered-by {
  display: none !important;
}

.is-size-6p5 {
  font-size: 0.8rem !important;
}

.is-size-5p6 {
  font-size: 1.1rem !important;
}

/* Style for the three-dot-dropdown container */
.three-dot-dropdown {
  position: relative;
  display: inline-block;
}

/* Style for the button */
.three-dot-dropdown-btn {
  position: relative;
  background-color: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  outline: none;
}

.three-dot-exe-btn {
  top: -8px;
}

/* Style for the three-dot-dropdown content */
.three-dot-dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  opacity: 1;
}

.three-dot-exe-content {
  top: 26px;
}

.three-dot-dropdown-content {
  min-width: 200px;
}

/* Style for three-dot-dropdown items */
.three-dot-dropdown-content a {
  color: black;
  padding: 6px 10px;
  text-decoration: none;
  display: block;
}

/* Change color on hover */
.three-dot-dropdown-content a:hover {
  background-color: #f1f1f1;
}

.three-dot-dropdown-show {
  display: block;
}

.navbar-dropdown {
  display: none;
}

.navbar-dropdown-show {
  display: block !important;
}

@media (min-width: 1024px) {
  .app-navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .app-navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e8ebf3;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(31, 45, 61, 0.05);
  }

  .app-navbar__menu {
    flex: 1 1 auto;
    align-items: stretch;
  }

  .app-navbar .navbar-start,
  .app-navbar .navbar-end {
    align-items: stretch;
    gap: 0.25rem;
  }

  .app-navbar .navbar-item,
  .app-navbar .navbar-link {
    position: relative;
    border-radius: 10px;
    padding: 0.75rem 0.95rem;
    color: #1f2d3d;
    font-weight: 600;
    transition: background-color 0.18s ease, color 0.18s ease;
  }

  .app-navbar .navbar-start>.navbar-item:not(:last-child)::after,
  .app-navbar .navbar-end>.navbar-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -0.25rem;
    top: 30%;
    width: 2px;
    height: 40%;
    background: linear-gradient(180deg, transparent, #eef0f6, transparent);
    pointer-events: none;
  }

  .app-navbar .navbar-item:hover,
  .app-navbar .navbar-link:hover,
  .app-navbar .navbar-item.is-active,
  .app-navbar .navbar-link.is-active {
    background: #f3f6ff;
    color: #2e3b82;
  }

  .app-navbar .navbar-item.has-dropdown:hover>.navbar-link,
  .app-navbar .navbar-item.has-dropdown:focus-within>.navbar-link {
    background: #f3f6ff;
    color: #2e3b82;
  }

  .app-navbar .navbar-dropdown {
    border-radius: 10px;
    border: 1px solid #eef0f6;
    box-shadow: 0 6px 14px rgba(31, 45, 61, 0.08);
    padding: 0.5rem 0;
  }

  .app-navbar .navbar-dropdown .navbar-item {
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
  }

  .app-navbar .navbar-dropdown .nested-navbar-button,
  .app-navbar .navbar-dropdown .nested-navbar-button span {
    font-weight: 600;
    color: #1f2d3d;
  }
}

@media (min-width: 1024px) {
  .nested.dropdown:hover {
    background-color: #fafafa !important;
    color: #485fc7 !important;
  }

  .nested.dropdown {
    padding: 0px 0px !important;

    &:hover>.dropdown-menu {
      display: block;
    }

    .dropdown-menu {
      top: -12px;
      margin-left: 100%;
    }

    .dropdown-trigger {
      flex-grow: 1;

      .nested-navbar-link {
        padding: 16px 40px 16px 16px;
        border: 0px;
        font-size: 14px;
        font-weight: 400;
        width: 100%;
        height: 2.5em;
        justify-content: flex-start;
      }

      .nested-navbar-link:hover {
        background-color: #fafafa !important;
        color: #485fc7 !important;
      }
    }
  }
}

.nested-navbar-link {
  position: relative;
  box-shadow: none !important;
}

.nested-navbar-link::after {
  content: "";
  position: absolute;
  margin-top: -0.375em;
  top: 50%;
  right: 16px;
  transform: rotate(-135deg);
  border: 3px solid transparent;
  border-radius: 2px;
  border-right: 0;
  border-top: 0;
  border-color: #485fc7;
  width: 0.625em;
  height: 0.625em;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .nested.dropdown {
    .dropdown-menu {
      position: relative;
    }

    .dropdown-trigger {
      .nested-navbar-link {
        padding: 0px 0px;
        border: 0px;
        font-size: 14px;
        font-weight: 400;
        height: 2em;
      }
    }

    .dropdown-content {
      box-shadow: none;
    }
  }

  .nested.dropdown .dropdown-menu {
    display: none;
  }

  .nested.dropdown.sub-navbar-dropdown-show .dropdown-menu {
    display: block;
  }

  .double-nested.dropdown .dropdown-menu {
    display: none !important;
  }

  .double-nested.dropdown.sub-navbar-dropdown-show .dropdown-menu {
    display: block !important;
  }

  .navbar-link:hover {
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
  }

  .nested-navbar-link::after {
    transform: rotate(-45deg);
    right: -20px;
  }
}

/* .is-bordered .table td, .is-bordered .table th {
    border-width: 0 0 1px !important;
}

.is-bordered .table thead td, .is-bordered .table thead th {
    border-width: 0 0 2px;
} */

.right-bottom-border {
  border-width: 0 1px 1px 0 !important;
}

.bottom-border {
  border-width: 0 0 1px 0 !important;
}

.right-border {
  border-width: 0 1px 0 0 !important;
}

.no-border {
  border-width: 0 0 0 0 !important;
}

.line-with-text {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 10px 0;
}

.line-with-text::before,
.line-with-text::after {
  content: "";
  flex: 1;
  border-bottom: 2px solid #f5f5f5;
  /* Solid line */
}

.line-with-text::before {
  margin-right: 10px;
}

.line-with-text::after {
  margin-left: 10px;
}

.copy-text {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.copy-button {
  /* margin-left: 5px; */
  /* padding: 5px 10px; */
  font-size: 16px;
  border: none;
  cursor: pointer;
  background-color: transparent;
}

.approval-toggle-form {
  display: inline-flex;
  margin-bottom: 0;
}

.approval-toggle-button {
  min-width: 0;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.approval-toggle-button.is-optional {
  color: hsl(0, 0%, 48%) !important;
}

.approval-toggle-button:hover,
.approval-toggle-button:focus,
.approval-toggle-button:active {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.approval-toggle-button.is-optional:hover,
.approval-toggle-button.is-optional:focus,
.approval-toggle-button.is-optional:active {
  color: hsl(0, 0%, 35%) !important;
}

.media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.media iframe {
  width: 100%;
  /* max-width: 560px; */
  aspect-ratio: 16 / 9;
  height: auto;
}

.pointer {
  cursor: pointer;
}

.questionnaire {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question {
  display: flex;
  align-items: center;
  gap: 10px;
}

.question-text {
  font-size: 16px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 20px;
  min-width: 44px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #48c78e;
}

input:checked+.slider:before {
  transform: translateX(20px);
}

.center-height-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.center-height {
  margin-top: auto !important;
  margin-bottom: auto !important;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.prefix {
  position: absolute;
  left: 0.5rem;
  /* Adjust based on input padding */
  font-size: 1rem;
  color: #4a4a4a88;
  /* Text color for the prefix */
  white-space: nowrap;
  /* Prevents text wrapping */
  z-index: 1;
  /* Ensures it appears above the input background */
  pointer-events: none;
  /* Makes it unselectable */
}

.teacher-input {
  padding-left: calc(1ch * 24) !important;
  /* Adjust padding to leave space for the prefix */
  z-index: 0;
  /* Ensures the input text doesn't overlap the prefix */
}

.has-text-inherit {
  color: inherit !important;
}

.nested-navbar-link.no-sub-dropdown::after {
  content: none;
}

.link-with-icon {
  display: inline-flex;
  /* Keep the text and icon on the same line */
  align-items: center;
  /* Vertically align the text and SVG */
  text-decoration: none;
  /* Optional: Remove underline for links */
  gap: 0.3rem;
  /* Add spacing between the text and the icon */
}

.link-with-icon svg {
  position: relative;
  /* Ensure proper alignment with the text */
  top: 0.3rem;
  /* Adjust vertical positioning slightly if needed */
}

.pricing-card {
  border: 1px solid #dbdbdb;
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  transition: box-shadow 0.3s ease;
}

.pricing-card:hover {
  box-shadow: 0 2px 8px rgba(10, 10, 10, 0.1);
}

.pricing-card .price {
  font-size: 2rem;
  font-weight: bold;
  margin: 1rem 0;
}

.pricing-card .title {
  margin-bottom: 0.5rem;
}

.features-list {
  list-style-type: none;
  padding: 0;
  margin: 1rem 0;
}

.features-list li {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.is-highlight {
  background-color: #f5f5f5;
  border-color: #00d1b2;
}

@media screen and (max-width: 1024px) {
  .navbar>.container {
    min-height: 0 !important;
  }
}

.py-7 {
  padding-top: 6rem !important;
  padding-bottom: 6rem !important;
}

/* The header (navbar) blur on scroll effect */
#header {
  /* transition: background-color 0.3s ease, backdrop-filter 0.3s ease; */
  /* z-index: 9999; */
  background-color: hsl(238.41deg 40.37% 93.22% / 90%);
}

/* Dialog backdrop to darken the background */
dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.box-100 {
  border-radius: 0.5rem;
  width: 100%;
  height: 100%;
}

.icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Shake animation keyframes */
@keyframes shake {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-10px);
  }

  40% {
    transform: translateX(10px);
  }

  60% {
    transform: translateX(-10px);
  }

  80% {
    transform: translateX(10px);
  }

  100% {
    transform: translateX(0);
  }
}

/* Class that applies the shake animation */
.shake {
  animation: shake 0.4s ease-in-out;
}

#signup-container {
  overflow: hidden;
  transition: height 0.5s ease-in-out;
  position: relative;
}

#pre-pay {
  transition: transform 0.5s ease-in-out;
}

#pay {
  position: absolute;
  top: 0;
  width: 100%;
  transform: translateY(150%);
  transition: transform 0.5s ease-in-out;
}

.ai-lecture-color .ck-icon {
  color: #b9a32a !important;
}

.ai-lecture-bg-color {
  background-color: #b9a32a !important;
}

.ai-exe-color .ck-icon {
  color: #9C27B0 !important;
}

.ai-exe-bg-color {
  background-color: #9C27B0 !important;
}

.ai-course-color .ck-icon {
  color: #009688 !important;
}

.ai-course-bg-color {
  background-color: #009688 !important;
}

.ai-review-color {
  color: #E76F51 !important;
}

.ai-review-bg-color {
  background-color: #E76F51 !important;
  border-color: #E76F51 !important;
}

.ai-review-bg-color-light {
  background-color: #fdf0ed !important;
  border-color: transparent !important;
  color: #E76F51 !important;
}

.ai-review-bg-color-light:hover {
  background-color: #f9ddd6 !important;
}

.ai-review-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask: url("/static/img/ai.svg") center / contain no-repeat;
  mask: url("/static/img/ai.svg") center / contain no-repeat;
}

.ai-review-pulse {
  animation: ai-pulse 1.2s ease-in-out infinite;
}

.ai-review-pending {
}

@keyframes ai-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ai-review-blink {
  animation: ai-blink 1.5s ease-in-out infinite;
}

@keyframes ai-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ai-review-status {
  font-size: 0.7rem;
  vertical-align: middle;
}

.card-content .media-content {
  overflow-x: visible !important;
}

@media screen and (min-width: 1024px) {
  [data-tooltip] {
    position: relative;
  }

  [data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 999;
  }

  [data-tooltip]:hover:before,
  [data-tooltip].is-tooltip-active:before {
    opacity: 1;
    visibility: visible;
  }

  .lecture-menu-drag-handle[data-tooltip]:before {
    bottom: auto;
    left: 100%;
    top: 0;
    transform: translate(0.4rem, -100%);
  }

  [data-tooltip].tooltip-click-only:hover:before {
    opacity: 0;
    visibility: hidden;
  }

  [data-tooltip].tooltip-click-only.is-tooltip-active:before {
    opacity: 1;
    visibility: visible;
  }

  .tooltip-multiline:before {
    white-space: pre;
    text-align: left;
  }

  .custom-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    white-space: normal;
    max-width: 200px;
    /* Prevents it from being too wide */
    width: max-content;
    /* Shrinks to fit content */
    text-align: center;
    /* Centered text */
    z-index: 1000;
  }

  a.button:hover .custom-tooltip {
    opacity: 1;
    visibility: visible;
  }

}

.publish-row-table-container {
  overflow: visible !important;
}

.clone-course-connect-option {
  display: block;
  border: 2px solid #9fd5cf;
  border-radius: 10px;
  background: linear-gradient(135deg, #edfdf8 0%, #f7fffd 100%);
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.clone-course-connect-option:hover {
  border-color: #0f766e;
}

.clone-course-connect-title {
  display: block;
  color: #0f766e;
  font-weight: 700;
  line-height: 1.3;
}

.clone-course-connect-copy {
  display: block;
  color: #355b57;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.clone-course-group-select select,
#clone-course-class-dropdown {
  color: #21496d;
}

.clone-course-group-select::after {
  border-color: #21496d;
}

.clone-course-group-select.is-current-group select,
#clone-course-class-dropdown.clone-course-current-group-selected {
  color: #0f766e;
}

.clone-course-group-select.is-current-group::after {
  border-color: #0f766e;
}

#clone-course-modal .modal-card {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 760px);
}

#clone-course-modal .modal-card-head {
  align-items: flex-start;
}

#clone-course-modal .modal-card-title {
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 0.75rem;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

#clone-course-title {
  display: block;
}

#clone-course-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

#clone-course-modal .modal-card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

#clone-course-modal .modal-card-foot {
  flex-shrink: 0;
}

.clone-course-publish-panel {
  display: block;
  border: 2px solid #b9d3ee;
  border-radius: 10px;
  background: linear-gradient(135deg, #f3f9ff 0%, #fbfdff 100%);
  padding: 0.9rem 1rem;
}

.clone-course-publish-title {
  display: block;
  color: #215b94;
  font-weight: 700;
  line-height: 1.3;
}

.clone-course-publish-copy {
  display: block;
  color: #46617a;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.clone-course-publish-options {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.clone-course-publish-option {
  display: block;
  border: 1px solid #d4e1ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.clone-course-publish-option:hover {
  border-color: #7aa7d8;
  box-shadow: 0 8px 20px rgba(33, 91, 148, 0.08);
  transform: translateY(-1px);
}

.clone-course-publish-option input[type="radio"] {
  margin-right: 0.55rem;
  transform: translateY(1px);
}

.clone-course-publish-option-title {
  color: #21496d;
  font-weight: 600;
}

.clone-course-publish-option-copy {
  display: block;
  color: #5a6e83;
  margin-top: 0.35rem;
  margin-left: 1.45rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

.clone-course-publish-option:has(input:checked) {
  border-color: #215b94;
  box-shadow: 0 10px 24px rgba(33, 91, 148, 0.14);
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
}

.publish-lecture-modal {
  white-space: normal;
}

.publish-lecture-modal .modal-card {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 680px);
  width: min(92vw, 560px);
  white-space: normal;
}

.publish-lecture-modal .modal-card-head {
  align-items: flex-start;
}

.publish-lecture-modal .modal-card-title {
  align-items: flex-start;
  display: flex;
  flex: 1 1 auto;
  line-height: 1.35;
  margin-right: 0.75rem;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.publish-lecture-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.publish-lecture-modal .modal-card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.publish-lecture-modal .modal-card-foot {
  flex-shrink: 0;
}

.publish-lecture-options-panel {
  display: block;
  border: 2px solid #b9d3ee;
  border-radius: 10px;
  background: linear-gradient(135deg, #f3f9ff 0%, #fbfdff 100%);
  min-width: 0;
  overflow-x: hidden;
  padding: 0.9rem 1rem;
  text-align: left;
}

.publish-lecture-options-title {
  display: block;
  color: #215b94;
  font-weight: 700;
  line-height: 1.3;
}

.publish-lecture-options-copy {
  display: block;
  color: #46617a;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.publish-lecture-options {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
  min-width: 0;
}

.publish-lecture-option {
  align-items: flex-start;
  border: 1px solid #d4e1ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  width: 100%;
}

.publish-lecture-option:hover {
  border-color: #7aa7d8;
  box-shadow: 0 8px 20px rgba(33, 91, 148, 0.08);
  transform: translateY(-1px);
}

.publish-lecture-option input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.25rem;
}

.publish-lecture-option-text {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}

.publish-lecture-option-title {
  color: #21496d;
  display: block;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.publish-lecture-option-copy {
  display: block;
  color: #5a6e83;
  font-size: 0.9rem;
  line-height: 1.35;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
  white-space: normal;
}

.publish-lecture-option:has(input:checked) {
  border-color: #215b94;
  box-shadow: 0 10px 24px rgba(33, 91, 148, 0.14);
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
}

@media screen and (max-width: 1024px) {
  .overflow-mobile {
    overflow-x: auto !important;
  }
}

.lecture-reorder-active [data-tooltip]:before {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

[data-tooltipmenu]:before {
  content: attr(data-tooltipmenu);
  position: absolute;
  bottom: 800%;
  left: 200%;
  transform: translateX(-50%);
  padding: 0.5rem;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1;
}

[data-tooltipmenu]:hover:before {
  opacity: 1;
  visibility: visible;
}

/* wrapper/spacing -----------------------------------------------------------*/
.summary {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-left: -.5rem;
}

.summary__wrapper {
  flex: 1 1 0;
  min-width: 0;
}

/* collapsing container ------------------------------------------------------*/
.summary__container {
  position: relative;
  overflow: hidden;
  transition: height .5s ease;
}

.summary__content {
  margin-top: -.1rem;
}

.summary__truncated {
  max-height: 2em;
  overflow: hidden;
  position: relative;
  opacity: 1;
  transition: opacity .3s ease;
  z-index: 1;
  margin-top: -.2rem;
}

.summary__full {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: transform .5s ease, opacity .3s ease;
}

.summary__full:not(.active) {
  display: none;
}

.summary__full.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.summary__full.collapsing {
  transform: translateY(-20px);
  opacity: 0;
}

.fade-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1.5em;
  background: linear-gradient(transparent, white);
  pointer-events: none;
}

/* toggle button & icon ------------------------------------------------------*/
.summary__toggle {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: .85;
  font-size: .85rem;
  cursor: pointer;
}

.summary__toggle:hover {
  opacity: 1;
}

.summary__toggle:focus:not(:active) {
  box-shadow: 0 0 0 .125em rgba(255, 255, 255, 0);
}

.summary__icon {
  font-size: .8rem;
  display: inline-block;
  transform: rotate(0deg);
  transition: transform .3s ease;
}

.summary__toggle[aria-expanded="true"] .summary__icon {
  transform: rotate(180deg);
}

@media screen and (max-width: 768px) {

  .lectures-content-menu-open,
  .lectures-content-menu-closed {
    width: 100% !important;
    padding: 0.75rem !important;
  }
}

.menu-list {
  list-style: none;
}

ul:has(> li > p.rtl) {
  direction: rtl;
  list-style-position: inside;
  width: 100%;
  text-align: right;
}

ul:has(> li > p.rtl) li {
  text-align: right;
}

ul:has(> li > p.rtl) li>p.rtl {
  display: inline;
  margin: 0;
}

ol:has(> li > p.rtl) {
  direction: rtl;
  list-style-position: inside;
  width: 100%;
  text-align: right;
}

ol:has(> li > p.rtl) li {
  text-align: right;
}

ol:has(> li > p.rtl) li>p.rtl {
  display: inline;
  margin: 0;
}

.grade-column textarea {
  min-height: 50vh !important;
}

.scrollable-student-solution {
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.scrollable-student-solution code {
  overflow-y: visible !important;
}

.image img {
  margin: auto;
}

.image.image-style-side {
  float: right;
}


.lecture-content::after {
  content: "";
  display: block;
  clear: both;
}

.lecture-content .image {
  clear: both;
}

.lecture-content figure.table {
  display: table !important;
  max-width: 100%;
  margin-top: .9em !important;
  margin-bottom: .9em !important;
  background: transparent !important;
  color: inherit !important;
}

.lecture-content figure.table:not(.layout-table) {
  margin-left: auto;
  margin-right: auto;
}

.lecture-content figure.table.table-style-block-align-left {
  margin-left: 0;
  margin-right: auto;
}

.lecture-content figure.table.table-style-block-align-right {
  margin-left: auto;
  margin-right: 0;
}

.lecture-content figure.table.table-style-align-center {
  margin-left: auto;
  margin-right: auto;
}

.lecture-content figure.table.table-style-align-left {
  float: left;
  margin-right: var(--ck-content-table-style-spacing, 1.5em);
}

.lecture-content figure.table.table-style-align-right {
  float: right;
  margin-left: var(--ck-content-table-style-spacing, 1.5em);
}

.lecture-content figure.table[style*="width"] > table,
.lecture-content figure.table[style*="width:"] > table {
  width: 100% !important;
}

.lecture-content figure.table:not(.layout-table)>table, .lecture-content table.table:not(.layout-table) {
    border: 1px double #b3b3b3;
}

.lecture-content td,
.lecture-content th,
.ck-content td,
.ck-content th
{
  vertical-align: middle;
}

.lecture-content .table td,
.lecture-content .table th,
.ck-content .table td,
.ck-content .table th
{
  vertical-align: middle;
  border: 1px solid #dbdbdb;
}

.ck-content code {
  font-size: 1em;
}

.ck-content pre {
  font-size: 1em;
}

/* Let inline formatting inside lecture content win over Bulma's child element
   typography rules. This only affects descendants of inline-styled wrappers,
   so regular unstyled lecture headings/lists keep their default appearance. */
.lecture-content [style] *:not([style]), .ck-content [style] *:not([style]) {
  color: inherit !important;
  direction: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-style: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
  list-style-position: inherit !important;
  list-style-type: inherit !important;
  text-align: inherit !important;
  text-decoration: inherit !important;
  text-transform: inherit !important;
  white-space: inherit !important;
  word-spacing: inherit !important;
  border-width: inherit !important;
}

/* Align checkbox with label text baseline in submissions toggle. */
.submitted-only-toggle {
  display: inline-flex !important;
  align-items: flex-end;
  gap: 0.35rem;
}

.submitted-only-toggle input[type="checkbox"] {
  transform: translateY(-1px);
}

.tlui-button[data-testid="main-menu-sub.export-all-as-button"],
.tlui-button[data-testid="main-menu-sub.export-as-button"],
.tlui-button[data-testid="main-menu-sub.copy-as-button"] {
  display:none !important;
}

form.annotator-widget {
  height: 100px !important;
}

form.annotator-widget > .annotator-controls {
  position: absolute !important;
  top: 99px !important;
  right: -5px !important;
  background-image: none !important;
  border: 0 !important;
  background-color: transparent !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
}

.annotator-viewer .annotator-controls {
  position: absolute !important;
  top: auto !important;
  bottom: 0 !important;
}

/* Home refresh --------------------------------------------------------------*/
.home-shell {
  text-align: left;
}

.home-shell .box {
  margin-bottom: 0 !important;
}

.home-hero {
  margin-top: 1rem;
  padding: 1.75rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4f7ff, #eef2ff);
  border: 1px solid #e5e9f7;
  box-shadow: 0 12px 32px rgba(43, 62, 105, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero-copy,
.section-heading__copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hero-copy .subtitle,
.section-heading__copy .subtitle {
  margin: -0.8rem 0 0 !important;
  line-height: 1.6;
}

.helper-text {
  margin-top: 0.1rem;
  color: #536081;
  font-size: 0.95rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #5c6bc0;
}

.hero-metrics {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.metric-chip {
  background: #ffffff;
  border: 1px solid #e8ebf3;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  min-width: 140px;
  box-shadow: 0 6px 16px rgba(31, 45, 61, 0.08);
}

.metric-value {
  display: block;
  font-size: 1.4rem;
  color: #1f2d3d;
  line-height: 1.2;
}

.metric-label {
  display: block;
  color: #6b778c;
  font-size: 0.9rem;
}

.home-section {
  margin-top: 2.5rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hint-text {
  color: #536081;
  font-size: 0.95rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.course-card {
  border: 1px solid #e8ebf3;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(31, 45, 61, 0.06);
}

.course-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.course-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.group-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.group-stats-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7def8;
  border-radius: 999px;
  background: #ffffff;
  color: #3b4ab8;
  height: 1.55rem;
  width: 1.55rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.group-stats-link:hover {
  background: #f6f8ff;
  border-color: #bfc9f4;
  box-shadow: 0 6px 14px rgba(59, 74, 184, 0.12);
  color: #2f3c9c;
}

.group-stats-link .icon {
  height: 0.9rem;
  width: 0.9rem;
}

.student-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #d7def8;
  background: #ffffff;
  color: #3b4ab8;
  border-radius: 999px;
  padding: 0 0.6rem;
  height: 1.55rem;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.student-count:hover {
  background: #f6f8ff;
  border-color: #bfc9f4;
  box-shadow: 0 6px 14px rgba(59, 74, 184, 0.12);
  color: #2f3c9c;
}

.student-count .icon {
  height: 0.9rem;
  width: 0.9rem;
  line-height: 1;
}

.course-count {
  background: #eef8f1;
  color: #25724a;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.course-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.course-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #e8ebf3;
  background: #fbfcff;
  color: #1f2d3d;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  overflow-x: hidden;
}

.course-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(31, 45, 61, 0.08);
  border-color: #cfd8ff;
}

.course-pill__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pill-title {
  /* font-weight: 700; */
}

.pill-meta {
  font-size: 0.85rem;
  color: #667085;
}

.pill-action {
  font-size: 0.9rem;
  color: #3b4ab8;
  /* font-weight: 700; */
}

.empty-state {
  border: 1px dashed #c9d1e9;
  background: #fbfdff;
}

.pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.pending-card {
  border: 1px solid #e8ebf3;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(31, 45, 61, 0.06);
}

.pending-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.pill-badge {
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.pending-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pending-item {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid #e8ebf3;
  background: #fdfdff;
  color: #1f2d3d;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.pending-item:hover {
  transform: translateY(-2px);
  border-color: #cce4ff;
  box-shadow: 0 8px 18px rgba(31, 45, 61, 0.08);
}

.pending-lecture {
  /* font-weight: 700; */
}

.pending-exercise {
  color: #6b778c;
  font-size: 0.95rem;
}

@media screen and (max-width: 768px) {
  .home-hero {
    flex-direction: column;
  }
}

@media screen and (min-width: 769px) {
  .split-container {
    display: flex;
    gap: 0;
  }

  .split-container > .column {
    flex: 1 1 0;
    min-width: 100px;
  }

  .split-container .divider {
    margin-top: 30px !important;
    padding: 0 !important;
    flex: 0 0 4px !important;
    box-sizing: content-box; 
    background-color: #ccc !important;
    z-index: 1;
    cursor: ew-resize;
    align-self: stretch;
    user-select: none;
  }
}

.preserve {
    white-space: pre-wrap;       /* preserves spaces & newlines, and wraps long lines */
    font-family: monospace;      /* optional: makes it look like code */
  }

.pre-wrap {
  white-space: pre-wrap;
}

.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.latex-eq > img, img.latex-eq {
    height: 1em !important;
}

.latex-eq {
    vertical-align: -.15em !important;
}

.stop-icon-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  color: #ff5f5f;
  transition: transform 0.2s ease, color 0.2s ease;
  z-index: 10;
}

.stop-icon-button:hover {
  color: #ff2e2e;
  transform: scale(1.1);
}

.drag-handle {
  cursor: grab;
  color: #7a7a7a;
  border: none;
  box-shadow: none;
}

.drag-handle:hover {
  color: #363636;
  background-color: #f5f5f5;
}

.lecture-menu-drag-handle.drag-handle:hover,
.lecture-menu-drag-handle.drag-handle:focus,
.lecture-menu-drag-handle.drag-handle:active {
  background-color: transparent !important;
}

.drag-handle:active {
  cursor: grabbing;
}

.course-row.is-dragging {
  position: relative;
  z-index: 20;
  opacity: 1;
  background-color: #e5edff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px) scale(1.02);
  border: 2px solid #5a7bff;
  transition: transform 120ms ease, box-shadow 120ms ease, border 120ms ease, background-color 120ms ease;
}

.course-row.is-drag-placeholder {
  visibility: hidden;
}

.lecture-menu-row.is-dragging {
  position: relative;
  z-index: 20;
  opacity: 1;
  background-color: #e5edff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px) scale(1.02);
  border: 2px solid #5a7bff;
  transition: transform 120ms ease, box-shadow 120ms ease, border 120ms ease, background-color 120ms ease;
}

.lecture-menu-row.is-dragging .lecture_menu_item {
  cursor: grabbing;
}

.lecture-menu-row.is-drag-placeholder {
  visibility: hidden;
}

.exercise-row.is-dragging {
  position: relative;
  z-index: 20;
  opacity: 1;
  background-color: #e5edff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px) scale(1.02);
  border: 2px solid #5a7bff;
  transition: transform 120ms ease, box-shadow 120ms ease, border 120ms ease, background-color 120ms ease;
}

.exercise-row.is-drag-placeholder {
  visibility: hidden;
}

.note-row.is-dragging {
  position: relative;
  z-index: 20;
  opacity: 1;
  background-color: #e5edff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px) scale(1.02);
  border: 2px solid #5a7bff;
  transition: transform 120ms ease, box-shadow 120ms ease, border 120ms ease, background-color 120ms ease;
}

.note-row.is-drag-placeholder {
  visibility: hidden;
}

.drag-ghost {
  display: block;
  position: fixed;
  z-index: 999;
  pointer-events: none;
  opacity: 0.98;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px) scale(1.02);
  border: 2px solid #5a7bff;
  background-color: #e5edff;
  border-radius: 4px;
}

.drag-ghost.lecture-menu-row {
  list-style: none;
}

.drag-ghost.lecture-menu-row .lecture_menu_item {
  background-color: transparent;
  color: inherit;
}

.drag-ghost td {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
}

.drag-ghost .columns {
  align-items: center;
  min-height: 56px;
}

.drag-ghost td > .columns {
  width: 100%;
}

.drag-ghost .drag-handle,
.drag-ghost .drag-handle .button {
  opacity: 0;
  pointer-events: none;
}

.drag-ghost .column.is-narrow {
  min-width: 42px;
}

.drag-ghost .has-text-right {
  display: none !important;
}

/* Keep drag handle neutral on hover */
.drag-handle.button.is-white:hover,
.drag-handle.button.is-white.is-hovered {
  background-color: transparent !important;
  box-shadow: none !important;
}

.lecture-reorder-active {
  cursor: grabbing !important;
}

.lecture-reorder-active * {
  pointer-events: none !important;
  cursor: grabbing !important;
}

.lecture-reorder-active #lecturesTableBody,
.lecture-reorder-active #lecturesTableBody *,
.lecture-reorder-active #menu-list,
.lecture-reorder-active #menu-list * {
  pointer-events: auto !important;
}

.exercise-reorder-active {
  cursor: grabbing !important;
}

.exercise-reorder-active * {
  pointer-events: none !important;
  cursor: grabbing !important;
}

.exercise-reorder-active #exe-tbody,
.exercise-reorder-active #exe-tbody * {
  pointer-events: auto !important;
}

.note-reorder-active {
  cursor: grabbing !important;
}

.note-reorder-active * {
  pointer-events: none !important;
  cursor: grabbing !important;
}

.note-reorder-active #note_list,
.note-reorder-active #note_list * {
  pointer-events: auto !important;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.join-class-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 12px;
  background: #f6f8ff;
  border: 1px solid #d8def5;
  color: #2f3b66;
  box-shadow: 0 4px 12px rgba(47, 59, 102, 0.08);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.join-class-btn:hover {
  background: #eef2ff;
  border-color: #c7d2f5;
  box-shadow: 0 6px 16px rgba(47, 59, 102, 0.12);
}

.join-class-btn:active {
  box-shadow: 0 3px 8px rgba(47, 59, 102, 0.08);
}

.join-class-hint {
  color: #5b6683;
  font-size: 0.9rem;
}


#lectureAdvancedOptions,
#courseAdvancedOptions,
#exeAdvancedOptions,
#reviewAdvancedOptions {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.5s ease;
  opacity: 1;
}

#lectureAdvancedOptions.ao-hidden,
#courseAdvancedOptions.ao-hidden,
#exeAdvancedOptions.ao-hidden,
#reviewAdvancedOptions.ao-hidden {
  max-height: 0;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.review-grade-weight-list {
  display: grid;
  gap: 0.35rem;
}

.review-grade-weight-row {
  align-items: center;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.review-grade-weight-control {
  margin-bottom: 0 !important;
  width: 5.25rem;
}

.review-grade-weight-input {
  text-align: right;
  width: 3.2rem;
}

.review-grade-weight-row.is-disabled {
  opacity: 0.56;
}

.review-grade-weight-total-error {
  color: #b42318 !important;
}

.plus-minus {
  display: inline-block;
  width: 1em;
  text-align: center;
  font-weight: 700;
  font-size: 1.1em;  /* tweak as you like */
  line-height: 1;
}

.table.is-hoverable tbody tr.lectures-row:hover {
    background-color: transparent !important;
}

  .primary-action-wrap {
    margin: 0 auto;
  }
  .primary-action {
    background: #5066d4 !important;
    border: 1px solid #4358bb !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 14px rgba(74, 99, 216, 0.18) !important;
    transition: all 0.12s ease !important;
  }
  .primary-action:hover {
    background: #465dc5 !important;
    box-shadow: 0 7px 15px rgba(74, 99, 216, 0.22) !important;
    transform: translateY(-1px) !important;
    color: white !important;
  }
  .primary-action:focus {
    box-shadow: 0 0 0 0.12rem rgba(74, 99, 216, 0.3), 0 6px 14px rgba(74, 99, 216, 0.18) !important;
  }


.submit-grade-btn {
  background-color: #1f8df1 !important;
  color: #fff !important;
  border: 1px solid #1c7fd8;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
.submit-grade-btn:hover,
.submit-grade-btn:focus-visible {
  background: #1878cb;
  border-color: #166fbf;
  box-shadow: 0 6px 18px rgba(30, 115, 199, 0.35);
  transform: translateY(-1px);
}
.submit-grade-btn:active {
  background: #166fbf;
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(30, 115, 199, 0.3);
}

/* Regex toggle icon */
#search-regex-toggle {
  display: none;
}

#search-regex-toggle + .regex-toggle-icon {
  color: #7a7a7a;
  cursor: pointer;
  background-color: none;
}

#search-regex-toggle:checked + .regex-toggle-icon {
  color: #3273dc;
  background-color: #f5f5f5;
}

#search-regex-toggle:focus-visible + .regex-toggle-icon {
  outline: 2px solid #3273dc;
  outline-offset: 2px;
  border-radius: 4px;
}

.announcements-content p {
  margin-bottom: 0 !important;
}

.extra-time-fields {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  align-items: flex-start;
}

.extra-time-fields .field.has-addons {
  flex: 0 0 4.6rem;
  margin-bottom: 0;
}

.extra-time-fields .input[type="number"] {
  min-width: 0;
  padding-left: 0.45rem;
  padding-right: 0.15rem;
}

.extra-time-fields .button.is-static {
  min-width: 1.35rem;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}

.extra-time-upload-note {
  display: inline-flex;
  align-items: center;
  min-height: 2em;
  vertical-align: middle;
}

.file .extra-time-upload-note {
  align-self: center;
}
