/* Keep the lesson number visible; expand the title without clipping its words. */
@media (max-width: 700px) {
  .lesson-context-actions .mobile-lesson-title {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: .25em;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-family: inherit;
    text-align: start;
    line-height: 1.55;
    cursor: pointer;
    touch-action: manipulation;
    border-radius: 5px;
  }
  .mobile-lesson-title .level-stage-prefix {
    flex: 0 0 auto;
    white-space: nowrap;
    unicode-bidi: isolate;
  }
  .mobile-lesson-title .level-stage-name {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-lesson-title:focus-visible {
    outline: 2px solid var(--green, #276749);
    outline-offset: 2px;
  }
  .lesson-context-actions.mobile-title-open > :first-child {
    grid-column: 1;
    grid-row: 1;
  }
  .lesson-context-actions.mobile-title-open > :last-child {
    grid-column: 3;
    grid-row: 1;
  }
  .lesson-context-actions.mobile-title-open .mobile-lesson-title.expanded {
    grid-column: 1 / -1;
    grid-row: 2;
    display: block;
    height: auto;
    min-height: 0;
    padding: 6px 8px;
    background: var(--paper, #f6faf8);
    white-space: normal;
    overflow: visible;
    line-height: 1.65;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .mobile-lesson-title.expanded .level-stage-prefix {
    display: block;
    white-space: normal;
  }
  .mobile-lesson-title.expanded .level-stage-name {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

@media (max-width: 700px) {
  .lesson-context-actions .mobile-lesson-title:not(.expanded) {
    font-size: 11px;
    line-height: 1.8;
    padding: 2px 4px;
  }
  .app.lang-ur .lesson-context-actions .mobile-lesson-title:not(.expanded) {
    font-size: 12px;
    line-height: 1.9;
  }
  .mobile-lesson-title:not(.expanded) .level-stage-name {
    display: none;
  }
  .mobile-lesson-title .mobile-lesson-short-name {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    line-height: inherit;
  }
  .mobile-lesson-title .mobile-lesson-ellipsis {
    flex: 0 0 auto;
    display: block;
    white-space: nowrap;
    unicode-bidi: isolate;
    line-height: inherit;
  }
  .mobile-lesson-title.expanded .mobile-lesson-short-name,
  .mobile-lesson-title.expanded .mobile-lesson-ellipsis {
    display: none;
  }
}
