/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

:root {
    /* Twitch Color */
    --el-tw-color-twitch: #5c16c5;
    --el-tw-color-partner: #A96FFF;
    --el-tw-color-glitch: #9146FF;
    --el-tw-color-hover : #772ce8;
    --el-tw-color-button: #9147ff;
}

/* Embed */
.el-twitch-front .el-live-embed {
    display: flex;
    margin: 1rem 0;
}

.el-twitch-front .el-embed-video {
    position: relative;
    overflow: hidden;
    width: 70%;
    height: 56.25vh;
    max-height: 90vh;
    min-height: 480px;
    overflow-x: clip;
    aspect-ratio: 16/9;
    margin: 0 auto;
}

.el-twitch-front .el-embed-chat {
    position: relative;
    overflow: hidden;
    width: 30%;
    height: 56.25vh;
    max-height: 90vh;
    min-height: 480px;
    overflow-x: clip;
    aspect-ratio: 16/9;
    margin: 0 auto;
}

/* Header */
.el-twitch-front .el-category-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    margin: 1rem 0;
}

.el-twitch-front .el-header-title{
    display: flex;
}

.el-twitch-front .el-title-link {
    display: flex;
}

.el-twitch-front .el-title-img {
    width: auto;
    height: 2rem;
    margin: 0 0.5rem;
}

.el-twitch-front .el-title-name {
    display: flex;
    height: 2rem;
    align-items: center;
    font-weight: 600;
    color: #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: var(--el-tw-color-twitch);
    border-radius: 0.5rem;
    padding: 0 0.5rem;
}

.el-twitch-front .el-header-notice {
    text-wrap: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin: 0.5rem;
}

.el-twitch-front .el-header-button{
    color: #f0f0f0;
}

.el-twitch-front .el-button-reset{
    background-color: var(--el-tw-color-twitch);
    border-radius: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin: 0 0.5rem;
}


/* Live Section */
.el-twitch-front .el-category-section {
    position: relative;
}

/* Grid Article */
.el-twitch-front .el-section-list {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-template-rows: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    overflow: hidden;
    margin: 0.5rem;
}

/* List Article */
.el-twitch-front .el-list-article {
    position: relative;
    grid-row: span 1;
    max-width: 100%;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

/* 
.el-section-list.el-list-expand {
    animation: elListExpand 0.5s ease-in-out forwards;
}

.el-section-list.el-list-collapse {
    animation: elListCollapse 0.5s ease-in-out forwards;
}

@keyframes elListExpand {
    from {
        grid-auto-flow: column;
    }
    
    to {
        grid-auto-flow: inherit;
    }
}

@keyframes elListCollapse {
    from {
        grid-auto-flow: inherit;
    }
    
    to {
        grid-auto-flow: column;
    }
} */

/* Hide Article */
.el-twitch-front .el-list-article.el-article-hidden {
    display: none;
}

/* Animation */
.el-twitch-front .el-list-article.el-article-expanded {
    animation: elExpandAnimation 0.5s ease-in-out forwards;
}

.el-twitch-front .el-list-article.el-article-collapsed {
    animation: elCollapseAnimation 0.5s ease-in-out forwards;
}

.el-twitch-front .el-article-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 250px;
    font-size: 0.8rem;
}

.el-twitch-front .el-article-error {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 250px;
    font-size: 0.8rem;
}

/* Article Thumbnail */
.el-twitch-front .el-article-thumbnail {
    width: 100%;
    max-width: 100%;
    cursor: pointer;
}

.el-twitch-front .el-thumbnail-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Article Channel */
.el-twitch-front .el-article-channel {
    display: flex;
    align-items: flex-start;
    font-size: 0.8rem;
    max-width: 100%;
    margin: 0.5rem 0;
}

/* Channel User */
.el-twitch-front .el-channel-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0.25rem 0 0;
}

.el-twitch-front .el-user-profile {
    width: 2.5rem;
    height: 2.5rem;
    overflow: hidden;
}

.el-twitch-front .el-profile-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.el-twitch-front .el-user-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
}

.el-twitch-front .el-status-indicator {
    background-color: var(--el-tw-color-twitch);
    font-weight: 600;
    color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
}

.el-twitch-front .el-status-count {
    max-width: 5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.el-twitch-front .el-status-language {
    max-width: 4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #e8e8e8;
    border-radius: 4px;
    padding: 2px 6px;
}

/* Channel Card */
.el-twitch-front .el-channel-card {
    flex-grow: 1;
    flex-shrink: 1;
    overflow: clip;
    line-height: 1.2rem;
}

.el-twitch-front .el-stream-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    max-height: 2.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.el-twitch-front .el-user-type {
    width: 20px;
    height: 20px;
    margin: 0 0.2rem;
}

.el-twitch-front .el-user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.el-twitch-front .el-game-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.el-twitch-front .el-card-tags {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.2rem;
}

.el-twitch-front .el-tags-label {
    display: inline-block;
    background-color: #e8e8e8;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 4px;
    max-width: 5rem;
    padding: 2px 4px;
    margin-right: 2px;
}

/* Section Button */
.el-twitch-front .el-section-bottom {
    font-size: 0.8rem;
}

.el-twitch-front .el-bottom-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: #f0f0f0;
    background-color: #d0d0d0;
    width: 100%;
    height: 1px;
    margin: 2rem 0;
}

.el-twitch-front .el-toggle-collapse {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 2rem;
    background-color: var(--el-tw-color-button);
    border-radius: 8px;
    margin: 0.5rem 1rem;
    cursor: pointer;
}

.el-twitch-front .el-toggle-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 2rem;
    background-color: var(--el-tw-color-button);
    border-radius: 8px;
    margin: 0.5rem 1rem;
    cursor: pointer;
}

.el-twitch-front .el-bottom-scroll {
    display: none;
}

.el-twitch-front .el-button-hidden {
    display: none;
    /* visibility: hidden;
    opacity: 0;
    pointer-events: none; */
}

/* Animation for expanding */
@keyframes elExpandAnimation {
    from {
        opacity: 0;
        /* height: 0; */
    }

    to {
        opacity: 1;
        /* height: 100%; */
    }
}

/* Animation for collapsing */
@keyframes elCollapseAnimation {
    from {
        opacity: 1;
        /* height: 100%; */
    }

    to {
        opacity: 0;
        /* height: 0; */
    }
}

/* Mobile Layout */
@media (hover:none) or (max-width: 768px) {

    /* Embed Mobile */
    .el-twitch-front .el-live-embed {
        flex-direction: column;
    }

    .el-twitch-front .el-embed-video {
        width: 100%;
        height: 35vh;
        min-height: 300px;
    }

    .el-twitch-front .el-embed-chat {
        width: 100%;
        height: 40vh;
        min-height: 450px;
    }

    /* Section Mobile */
    .el-twitch-front .el-section-list {
        grid-auto-columns: 250px;
        grid-auto-flow: column;
        overflow: auto;
    }

    /* Section for Scroll Button */
    .el-twitch-front .el-section-bottom {
        display: flex;
        opacity: 0.5;
        transition: opacity 0.5s ease 0s;
    }

    .el-twitch-front .el-bottom-toggle {
        display: none;
    }

    .el-twitch-front .el-bottom-scroll {
        display: flex;
    }

    .el-twitch-front .el-scroll-left {
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        align-items: center;
        -webkit-box-align: center;
        justify-content: center;
        width: 40px;
        height: 100%;
        border: none;
        outline: 0px;
        background-color: transparent;
        border-radius: 10px;
        cursor: pointer;
        transition: visibility 0.5s ease 0s;
    }

    .el-twitch-front .el-left-svg {
        display: flex;
        align-items: center;
        -webkit-box-align: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        color: #dddddd;
        background-color: rgba(0, 0, 0, 0.4);
        transition: visibility 0.4s ease 0s, opacity 0.4s ease 0s, background-color 0.2s ease 0s, color 0.2s ease 0s;
        pointer-events: none;
    }

    .el-twitch-front .el-scroll-right {
        position: absolute;
        top: 0;
        right: 0;
        display: flex;
        align-items: center;
        -webkit-box-align: center;
        justify-content: center;
        width: 40px;
        height: 100%;
        border: none;
        outline: 0px;
        background-color: transparent;
        border-radius: 10px;
        cursor: pointer;
        transition: visibility 0.5s ease 0s;
    }

    .el-twitch-front .el-right-svg {
        display: flex;
        align-items: center;
        -webkit-box-align: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        color: #dddddd;
        background-color: rgba(0, 0, 0, 0.4);
        transition: visibility 0.4s ease 0s, opacity 0.4s ease 0s, background-color 0.2s ease 0s, color 0.2s ease 0s;
        pointer-events: none;
    }

    .el-twitch-front .el-button-hidden {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }

}