.stall-livestream {
    --stall-livestream-height: 620px;
    align-items: stretch;
}

.stall-livestream .stall-video-column,
.stall-livestream .stall-chat-column {
    display: flex;
    min-height: var(--stall-livestream-height);
}

.stall-livestream .stall-video-column .single-video,
.stall-livestream #live_stream {
    width: 100%;
    height: var(--stall-livestream-height);
    min-height: var(--stall-livestream-height);
}

.stall-livestream .stall-chat-column {
    align-self: stretch;
}

.stall-livestream .stall-chat-column .livechat,
.stall-livestream .stall-chat-column .cgl-live-chat,
.stall-livestream .stall-chat-column .chat-wrapper {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.stall-livestream .stall-chat-column .cgl-live-chat {
    height: 100% !important;
}

.stall-livestream .stall-chat-column .chat-title,
.stall-livestream .stall-chat-column .chat-message {
    flex: 0 0 auto;
    padding: 14px 18px;
}

.stall-livestream .stall-chat-column .chat-title {
    display: flex;
    align-items: center;
    min-height: 58px;
}

.stall-livestream .stall-chat-column .total_view {
    margin-left: 8px;
}

.stall-livestream .stall-chat-column .chat-view {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
}

.stall-livestream .stall-chat-column .chat-message .input-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
}

.stall-livestream .stall-chat-column .chat-message input {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0;
}

.stall-livestream .stall-chat-column .input-group-append {
    flex: 0 0 auto;
}

.stall-livestream .stall-chat-column .sendtext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    line-height: 1;
}

.stall-livestream .stall-chat-column #music-button.is-playing {
    position: relative;
    box-shadow: 0 0 0 3px rgba(255, 106, 0, .26);
}

.stall-livestream .stall-chat-column #music-button.is-playing::after {
    content: "";
    position: absolute;
    right: -1px;
    top: -1px;
    width: 9px;
    height: 9px;
    border: 2px solid #0a1424;
    border-radius: 50%;
    background: #18d36b;
}

.stall-livestream .horse-chat-shortcut-wrapper {
    display: flex;
    justify-content: center;
    margin: 22px auto 8px;
    min-height: 46px;
    text-align: center;
}

.stall-livestream .horse-chat-shortcut-mobile {
    display: none;
}

.stall-livestream .horse-chat-shortcut {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 250px;
    max-width: min(100%, 390px);
    min-height: 44px;
    padding: 11px 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transform: skewX(-14deg);
    transition: transform .18s ease, color .18s ease;
    z-index: 0;
}

.stall-livestream .horse-chat-shortcut::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid #f35111;
    border-radius: 5px;
    background: linear-gradient(17deg, #f35111, #ff8a00);
    box-shadow: 10px 4px 12px rgba(0, 0, 0, .25);
    z-index: -1;
    transition: inset .18s ease, background .18s ease, box-shadow .18s ease;
}

.stall-livestream .horse-chat-shortcut:hover,
.stall-livestream .horse-chat-shortcut:focus {
    color: #fff;
    text-decoration: none;
    transform: skewX(-14deg) translateY(-1px);
}

.stall-livestream .horse-chat-shortcut:hover::before,
.stall-livestream .horse-chat-shortcut:focus::before {
    inset: 3px -3px -3px 3px;
    border-color: #ff8a00;
    background: linear-gradient(-34deg, #ff8a00, #f35111);
    box-shadow: 5px 3px 5px rgba(0, 0, 0, .25);
}

.stall-livestream .horse-chat-shortcut:active,
.stall-livestream .horse-chat-shortcut.is-loading {
    transform: skewX(-14deg) translateY(1px);
}

.stall-livestream .horse-chat-shortcut:disabled {
    cursor: wait;
    opacity: .78;
}

.stall-livestream .horse-chat-shortcut i,
.stall-livestream .horse-chat-shortcut span {
    flex: 0 1 auto;
    transform: skewX(14deg);
}

.stall-livestream .stall-chat-column .sendtext i {
    display: block;
    width: 1em;
    height: 1em;
    line-height: 1;
    text-align: center;
}

@media (max-width: 991px) {
    .stall-livestream {
        --stall-livestream-height: clamp(300px, 56.25vw, 460px);
    }

    .stall-livestream .stall-video-column,
    .stall-livestream .stall-chat-column {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .stall-livestream .stall-chat-column {
        min-height: 360px;
        padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5) !important;
    }

    .stall-livestream .stall-chat-column .livechat {
        height: 360px;
        max-height: 360px;
        min-height: 360px;
    }

}

@keyframes horseChatShortcutFadeIn {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale(.92);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@media (max-width: 767px) {
    .stall-livestream {
        --stall-livestream-height: clamp(230px, 56.25vw, 330px);
    }

    .stall-livestream .stall-chat-column {
        min-height: 320px;
    }

    .stall-livestream .stall-chat-column .livechat {
        height: 320px;
        max-height: 320px;
        min-height: 320px;
    }

    .stall-livestream .horse-chat-shortcut-wrapper--desktop {
        display: none;
    }

    .stall-livestream .horse-chat-shortcut-mobile {
        position: fixed;
        right: calc(20px + env(safe-area-inset-right, 0px));
        bottom: calc(clamp(96px, 18vh, 126px) + env(safe-area-inset-bottom, 0px));
        z-index: 1060;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 62px;
        height: 62px;
        padding: 0;
        border: 2px solid rgba(255, 255, 255, .78);
        border-radius: 50%;
        background: radial-gradient(circle at 36% 32%, #ff9c19 0, #ff7900 48%, #f25a00 100%);
        box-shadow: 0 8px 18px rgba(0, 0, 0, .32), 0 0 0 4px rgba(255, 106, 0, .18);
        opacity: 0;
        animation: horseChatShortcutFadeIn .28s ease-out .15s forwards;
        -webkit-tap-highlight-color: transparent;
    }

    .stall-livestream .horse-chat-shortcut-mobile:active,
    .stall-livestream .horse-chat-shortcut-mobile.is-loading {
        transform: scale(.94);
    }

    .stall-livestream .horse-chat-shortcut-mobile:focus {
        outline: 3px solid rgba(255, 255, 255, .78);
        outline-offset: 3px;
    }

    .stall-livestream .horse-chat-shortcut-mobile__icon {
        display: block;
        width: 54px;
        height: 54px;
        pointer-events: none;
    }

    .stall-livestream .horse-chat-shortcut-mobile svg {
        display: block;
        width: 100%;
        height: 100%;
        overflow: visible;
    }

    .stall-livestream .horse-chat-shortcut-mobile__horse {
        fill: none;
        stroke: #fff;
        stroke-width: 4.4;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .stall-livestream .horse-chat-shortcut-mobile__bubble {
        fill: #fff;
    }

    .stall-livestream .horse-chat-shortcut-mobile__dot {
        fill: #ff7900;
    }

    .stall-livestream .stall-chat-column .chat-title {
        min-height: 50px;
        font-size: 17px;
    }

    .stall-livestream .stall-chat-column .chat-message {
        padding: 8px;
    }

}
