/*---VIDEOS------------*/
.videos-library-page .videos-library {
    padding-right: 16px;
    padding-left: 16px;
}

.videos-library-page .videos-filter {
    align-items: stretch;
}

.videos-library-page .videos-filter {
    width: 100%;
}

.videos-library-page.videos-filter-ready .videos-filter-toggle {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-bottom: 16px;
    padding: 8px 18px;
    border: 1px solid var(--theme-button, var(--theme-primary, #176b62));
    border-radius: 999px;
    background: var(--theme-background, #ffffff);
    color: var(--theme-text, #19312d);
    font: inherit;
}

.videos-library-page.videos-filter-ready .videos-filter-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.videos-library-page.videos-filter-ready .videos-filter {
    position: fixed;
    z-index: 70;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 100%);
    padding: 24px 20px 32px;
    overflow: auto;
    background: var(--theme-background, #ffffff);
    transform: translateX(-105%);
}

.videos-library-page.videos-filter-ready .videos-filter.is-open {
    transform: none;
}

.videos-library-page.videos-filter-ready .videos-filter-bar,
.videos-library-page.videos-filter-ready .videos-filter-close {
    display: flex;
}

.videos-library-page.videos-filter-ready .videos-filter-bar {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.videos-library-page.videos-filter-ready .videos-filter-overlay:not([hidden]) {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.42);
}

body.videos-filter-open {
    overflow: hidden;
}

.videos-library-page .videos-player-layout {
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}

.videos-library-page .videos-player-stage--short {
    height: auto;
    width: min(100%, calc((100dvh - 220px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 9 / 16));
    max-height: calc(100dvh - 220px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

.videos-library-page .videos-player-detail {
    width: 100%;
    max-width: none;
    max-height: 160px;
}

.videos-library-page .videos-filter-query,
.videos-library-page .videos-filter-category,
.videos-library-page .videos-filter-submit,
.videos-library-page .videos-filter-clear {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    height: 44px;
}

.videos-library-page .videos-list--video,
.videos-library-page .videos-list--short {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 560px) {
    .videos-library-page .videos-list--video,
    .videos-library-page .videos-list--short {
        grid-template-columns: minmax(0, 1fr);
    }
}
