/* Svitlo YouTube videos module */

.sv-yt-camera {
    vertical-align: -0.2em;
    margin-right: 12px;
}

.sv-yt-accent {
    color: #EB5757;
}

.sv-yt-subtitle {
    text-align: center;
    color: #777777;
    font-size: 14px;
    margin: -5px 0 25px;
}

.sv-yt-channel-link,
.sv-yt-subtitle a.sv-yt-channel-link {
    color: #EB5757;
    font-weight: 500;
}

.sv-yt-subtitle a.sv-yt-channel-link:hover {
    text-decoration: underline;
}

/* Layout */

.sv-yt-layout {
    position: relative;
}

.sv-yt-main .rm-video {
    border-radius: 6px;
    overflow: hidden;
}

.sv-yt-item-thumb {
    display: block;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
}

.sv-yt-item-thumb:hover .rm-video__media {
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.sv-yt-item .rm-video__button {
    width: 48px;
    height: 34px;
}

.sv-yt-item .rm-video__button svg {
    width: 48px;
    height: 34px;
    display: block;
}

.sv-yt-item-title {
    font-size: 14px;
    line-height: 20px;
    color: #272323;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sv-yt-footer {
    text-align: center;
    margin-top: 25px;
}

/* Mobile: horizontal swipe list, main player hidden */

@media (max-width: 767px) {
    .sv-yt .rm-module-header {
        text-align: left;
        font-size: 20px;
        line-height: 26px;
        margin-bottom: 5px;
    }

    .sv-yt-camera {
        display: none;
    }

    .sv-yt-subtitle {
        display: none;
    }

    .sv-yt-main {
        display: none;
    }

    .sv-yt-list {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 12px;
    }

    /* Firefox only: webkit-браузери використовують ::-webkit-scrollbar нижче */
    @supports not selector(::-webkit-scrollbar) {
        .sv-yt-list {
            scrollbar-width: thin;
            scrollbar-color: #EB5757 #E9E9E9;
        }
    }

    .sv-yt-list::-webkit-scrollbar {
        height: 4px;
    }

    .sv-yt-list::-webkit-scrollbar-thumb {
        background: #EB5757;
        border-radius: 2px;
    }

    .sv-yt-list::-webkit-scrollbar-track {
        background: #E9E9E9;
        border-radius: 2px;
    }

    .sv-yt-item {
        flex: 0 0 72%;
        max-width: 320px;
        scroll-snap-align: start;
    }

    .sv-yt-footer {
        margin-top: 15px;
    }

    .sv-yt-footer .rm-btn {
        width: 100%;
        text-align: center;
    }
}

/* Desktop: big player on the left, scrollable list on the right */

@media (min-width: 768px) {
    .sv-yt-main {
        margin-right: 280px;
    }

    .sv-yt-list {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 260px;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 14px;
    }

    /* Firefox only: webkit-браузери використовують ::-webkit-scrollbar нижче */
    @supports not selector(::-webkit-scrollbar) {
        .sv-yt-list {
            scrollbar-width: thin;
            scrollbar-color: #272323 #F0F0F0;
        }
    }

    .sv-yt-list::-webkit-scrollbar {
        width: 8px;
    }

    .sv-yt-list::-webkit-scrollbar-thumb {
        background: #272323;
        border-radius: 4px;
    }

    .sv-yt-list::-webkit-scrollbar-thumb:hover {
        background: #000000;
    }

    .sv-yt-list::-webkit-scrollbar-track {
        background: #F0F0F0;
        border-radius: 4px;
    }

    .sv-yt-item {
        margin-bottom: 16px;
    }

    .sv-yt-item:last-child {
        margin-bottom: 0;
    }

    .sv-yt-item-active .sv-yt-item-thumb {
        outline: 2px solid #EB5757;
        outline-offset: -2px;
    }
}

@media (min-width: 1200px) {
    .sv-yt-main {
        margin-right: 320px;
    }

    .sv-yt-list {
        width: 300px;
    }
}
