/* Video Learning */
.lms-video-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 2px 12px rgba(29,24,35,.12);
}

.lms-video-shell {
    display: grid;
    grid-template-rows: minmax(0, auto) auto auto;
    gap: 10px;
    padding: 10px;
    width: 100%;
    max-width: 100%;
    max-height: calc(100svh - 112px);
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 8px;
    background: #2f104c;
    color: #f7f9fb;
    box-shadow: 0 12px 34px rgba(0,0,0,.28);
}

    .lms-video-shell:fullscreen {
        width: 100svw;
        height: 100svh;
        max-height: 100svh;
        grid-template-rows: minmax(0, 1fr) auto auto;
        gap: 8px;
        padding: 8px;
        border-radius: 0;
        overflow: hidden;
    }

.lms-video-frame {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    justify-self: center;
    align-self: center;
    width: 100%;
    max-width: min(100%, 1280px, max(160px, calc(177.7778svh - 419.56px)));
    aspect-ratio: 16 / 9;
    min-height: 0;
    max-height: min(720px, calc(100svh - 236px));
    border-radius: 8px;
    background: #050608;
}

    .lms-video-shell:fullscreen .lms-video-frame {
        align-self: stretch;
        min-height: 0;
        max-width: 100%;
        max-height: none;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 0;
    }

.lms-video-element {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #050608;
}

    .lms-video-shell:fullscreen .lms-video-element {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
    }

.lms-video-watermark {
    position: absolute;
    z-index: 4;
    max-width: min(46ch, 42%);
    color: rgba(10,14,18,.09);
    font-size: clamp(.75rem, 2.2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.2;
    pointer-events: none;
    transform: translate(-10%, -10%);
    transition: left 8s ease, top 8s ease;
    overflow-wrap: anywhere;
}

.lms-video-center-state {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(5,6,8,.42);
}

.lms-video-center-state--wide {
    align-content: center;
}

.lms-video-checkpoint-transition {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: clamp(12px, 4vw, 36px);
    background:
        radial-gradient(circle at center, rgba(47,16,76,.62), rgba(5,6,8,.92));
}

.lms-video-checkpoint-transition__card {
    width: min(100%, 560px);
    max-height: 100%;
    overflow: auto;
    border: 1px solid rgba(255,255,255,.14);
}

.lms-video-checkpoint-transition__icon {
    font-size: clamp(2.25rem, 7vw, 4rem);
}

.lms-video-checkpoint-transition__text {
    max-width: 42ch;
    overflow-wrap: anywhere;
}

.lms-video-controls {
    display: grid;
    grid-template-columns: auto auto minmax(44px, auto) minmax(120px, 1fr) minmax(44px, auto) auto auto auto;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f7f9fb;
    color: #1d2430;
}

.lms-video-time {
    min-width: 44px;
    color: #2d3645;
    font-size: .86rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.lms-video-range {
    width: 100%;
    min-width: 0;
    height: 20px;
    accent-color: #6c4796;
    cursor: pointer;
}

    .lms-video-range:disabled {
        accent-color: #9aa3af;
        cursor: not-allowed;
        opacity: .58;
        pointer-events: none;
    }

    .lms-video-range::-webkit-slider-runnable-track {
        height: 8px;
        border-radius: 999px;
        background: #d8dde6;
    }

    .lms-video-range::-webkit-slider-thumb {
        margin-top: -5px;
    }

    .lms-video-range:disabled::-webkit-slider-runnable-track {
        background: #e2e6ee;
    }

    .lms-video-range:disabled::-webkit-slider-thumb {
        background: #9aa3af;
    }

    .lms-video-range::-moz-range-track {
        height: 8px;
        border-radius: 999px;
        background: #d8dde6;
    }

    .lms-video-range::-moz-range-progress {
        height: 8px;
        border-radius: 999px;
        background: #6c4796;
}

    .lms-video-range:disabled::-moz-range-track,
    .lms-video-range:disabled::-moz-range-progress {
        background: #e2e6ee;
    }

.lms-video-status {
    display: grid;
    gap: 8px;
    min-height: 0;
    overflow: auto;
}

.lms-video-progress-alert {
    max-width: 100%;
}

.lms-video-checkpoint-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lms-admin-table-wrap {
    overflow-x: auto;
    margin-top: 8px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 8px;
}

.lms-admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: .92rem;
}

    .lms-admin-table th,
    .lms-admin-table td {
        padding: 7px 9px;
        border-bottom: 1px solid rgba(0,0,0,.07);
        text-align: left;
        vertical-align: middle;
    }

    .lms-admin-table th {
        color: #394150;
        font-weight: 700;
        background: #f6f7f9;
    }

    .lms-admin-table tbody tr:hover {
        background: rgba(108,71,150,.06);
    }

.lms-admin-row-selected {
    background: rgba(108,71,150,.13);
}

.lms-video-language-editor__help {
    max-width: 100%;
}

.lms-video-language-editor__split-host {
    min-height: 0;
}

.lms-video-language-editor__split-panel {
    min-height: 520px;
}

.lms-video-language-editor__panel {
    min-width: 0;
    min-height: 0;
}

.lms-video-language-editor__table-panel,
.lms-video-language-editor__form-panel {
    height: 100%;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.lms-video-language-editor__divider {
    background: rgba(108,71,150,.32);
}

.lms-video-checkpoint-editor,
.lms-video-checkpoint-editor__split-host,
.lms-video-checkpoint-editor__split-panel,
.lms-video-checkpoint-editor__panel {
    min-width: 0;
    min-height: 0;
}

.lms-video-checkpoint-editor__help {
    max-width: 100%;
}

.lms-video-checkpoint-editor__context {
    gap: 12px;
}

.lms-video-checkpoint-editor__language-select {
    width: min(100%, 320px);
}

.lms-video-checkpoint-editor__split-panel {
    width: 100%;
    height: clamp(620px, calc(100dvh - 270px), 860px);
}

.lms-video-checkpoint-editor__list-panel,
.lms-video-checkpoint-editor__form-panel {
    box-sizing: border-box;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.lms-video-checkpoint-editor__table {
    min-width: 760px;
}

.lms-video-checkpoint-editor__content-selection {
    display: grid;
    min-width: 0;
    gap: 10px;
}

.lms-video-checkpoint-editor__divider {
    background: rgba(108,71,150,.32);
}

.lms-video-checkpoint-selection-dialog__content {
    display: grid;
    min-width: 0;
    min-height: 0;
    max-height: min(76dvh, 760px);
    gap: 12px;
}

.lms-video-checkpoint-selection-dialog__filters {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 2fr) minmax(190px, 1fr);
    gap: 12px;
}

.lms-video-checkpoint-selection-dialog__list {
    height: clamp(280px, 52dvh, 560px);
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.lms-video-checkpoint-selection-item {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 88px;
    margin-bottom: 8px;
    padding: 10px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    color: inherit;
    background: var(--mud-palette-surface);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.lms-video-checkpoint-selection-item:hover {
    border-color: var(--mud-palette-lines-inputs);
    background: var(--mud-palette-action-default-hover);
}

.lms-video-checkpoint-selection-item:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--mud-palette-primary) 48%, transparent);
    outline-offset: -3px;
}

.lms-video-checkpoint-selection-item--selected {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 11%, transparent);
    box-shadow: inset 4px 0 0 var(--mud-palette-primary);
}

.lms-video-checkpoint-selection-item__topline {
    display: flex;
    min-width: 0;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.lms-video-checkpoint-selection-item__topline strong,
.lms-video-checkpoint-selection-item__preview {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lms-video-checkpoint-selection-item__preview {
    display: -webkit-box;
    color: var(--mud-palette-text-secondary);
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.lms-video-checkpoint-selection-item__topline span,
.lms-video-checkpoint-selection-item__selected-label {
    color: var(--mud-palette-text-secondary);
    font-size: .75rem;
}

.lms-video-checkpoint-selection-item__selected-label {
    font-weight: 600;
}

.lms-video-checkpoint-test-dialog__content {
    min-width: 0;
    min-height: 0;
    max-height: min(76dvh, 820px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.lms-course-exercise-editor,
.lms-course-exercise-editor__split-panel,
.lms-course-exercise-editor__panel {
    min-width: 0;
    min-height: 0;
}

.lms-course-exercise-editor__split-panel {
    height: clamp(620px, calc(100dvh - 330px), 860px);
}

.lms-course-exercise-editor__list-panel,
.lms-course-exercise-editor__form-panel {
    box-sizing: border-box;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 12px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
}

.lms-course-exercise-editor__list {
    display: grid;
    min-width: 0;
    gap: 8px;
    margin-top: 12px;
}

.lms-course-exercise-editor__item {
    display: grid;
    width: 100%;
    min-width: 0;
    padding: 12px;
    gap: 5px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    color: inherit;
    background: var(--mud-palette-surface);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.lms-course-exercise-editor__item:hover {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-action-default-hover);
}

.lms-course-exercise-editor__item:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--mud-palette-primary) 48%, transparent);
    outline-offset: -3px;
}

.lms-course-exercise-editor__item--selected {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 11%, transparent);
    box-shadow: inset 4px 0 0 var(--mud-palette-primary);
}

.lms-course-exercise-editor__item-topline {
    display: flex;
    min-width: 0;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.lms-course-exercise-editor__item-topline strong,
.lms-course-exercise-editor__item-meta {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lms-course-exercise-editor__item-meta,
.lms-course-exercise-editor__content-summary span {
    color: var(--mud-palette-text-secondary);
    font-size: .875rem;
}

.lms-course-exercise-editor__content-card,
.lms-course-exercise-editor__content-summary {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.lms-course-exercise-editor__divider {
    background: rgba(108,71,150,.32);
}

.lms-course-exercise-test-dialog__content {
    display: grid;
    min-width: 0;
    min-height: 0;
    max-height: min(76dvh, 820px);
    gap: 16px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.lms-course-exercise-test-dialog__steps {
    display: grid;
    min-width: 560px;
    margin: 0;
    padding-left: 28px;
    gap: 8px;
}

.lms-course-exercise-test-dialog__steps li {
    display: flex;
    min-width: 0;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.lms-course-exercise-area,
.lms-course-exercise-area__heading,
.lms-course-exercise-area__grid,
.lms-course-exercise-area__card {
    min-width: 0;
}

.lms-course-exercise-area:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--mud-palette-primary) 42%, transparent);
    outline-offset: 4px;
}

.lms-course-exercise-area__heading {
    overflow-wrap: anywhere;
}

.lms-course-exercise-area__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.lms-course-exercise-area__card {
    box-sizing: border-box;
    padding: 16px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    background: var(--mud-palette-surface);
    box-shadow: var(--mud-elevation-3);
}

.lms-course-exercise-area__card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--mud-palette-primary) 48%, transparent);
    outline-offset: -3px;
}

.lms-course-exercise-area__actions {
    margin-top: auto;
}

@media (max-width: 959px) {
    .lms-video-language-editor__split-panel {
        min-height: 0;
    }

    .lms-video-checkpoint-editor__split-panel {
        height: clamp(760px, calc(100dvh - 150px), 1040px);
    }

    .lms-course-exercise-editor__split-panel {
        height: clamp(800px, calc(100dvh - 170px), 1120px);
    }

    .lms-course-exercise-area__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .lms-video-checkpoint-selection-dialog__filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .lms-video-checkpoint-selection-item__topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 700px) {

    .lms-video-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .lms-video-shell {
        padding: 6px;
        gap: 6px;
        max-height: calc(100svh - 84px);
    }

    .lms-video-frame {
        max-width: min(100%, max(160px, calc(177.7778svh - 334.22px)));
        max-height: calc(100svh - 188px);
    }

    .lms-video-controls {
        grid-template-columns: auto auto minmax(44px, auto) minmax(44px, auto) auto auto auto;
        gap: 4px;
        padding: 5px 6px;
    }

        .lms-video-controls > :nth-child(4) {
            grid-column: 1 / -1;
            grid-row: 2;
        }

}

@media (max-width: 480px) {
    .lms-video-controls {
        grid-template-columns: auto auto minmax(42px, auto) minmax(42px, auto) auto auto;
    }

        .lms-video-controls > :nth-child(6) {
            display: none;
        }

        .lms-video-controls > :nth-child(7),
        .lms-video-controls > :nth-child(8) {
            justify-self: end;
        }

    .lms-video-time {
        min-width: 42px;
        font-size: .78rem;
    }
}

@media (max-height: 560px) {
    .lms-video-page-header {
        margin-bottom: 8px;
        padding: 8px 12px;
    }

    .lms-video-shell {
        max-height: calc(100svh - 72px);
    }

    .lms-video-frame {
        max-width: min(100%, max(160px, calc(177.7778svh - 277.33px)));
        max-height: calc(100svh - 156px);
    }

    .lms-video-status {
        max-height: 72px;
    }
}

@media (orientation: landscape) and (max-height: 560px) {
    .lms-video-page-header {
        display: none;
    }

    .lms-video-shell {
        height: calc(100svh + 6px);
        max-height: none;
        grid-template-rows: minmax(0, 1fr) auto minmax(0, auto);
        gap: 4px;
        padding: 6px;
    }

    .lms-video-frame {
        width: 100%;
        max-width: min(100%, max(160px, calc(177.7778svh - 170.67px)));
        height: auto;
        max-height: calc(100svh - 96px);
        aspect-ratio: 16 / 9;
    }

    .lms-video-element {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
    }

    .lms-video-controls {
        gap: 4px;
        padding: 4px 6px;
    }

    .lms-video-status {
        max-height: 40px;
    }

}
