/**
 * Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
 * SPDX-license-identifier: BSD-3-Clause
 */

.wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    padding: 36px 72px;
    box-sizing: border-box;

    .conversation {
        width: 100%;
        position: relative;
        height: 100%;
        /**
         * 100% 为容器高度
         * 128px 为上层 DouBao Card Height
         * 24px 为 margin top
         * 36px * 2 为容器 padding
         * 128 + 24 + 36 * 2 = 224px
         */
        max-height: calc(100% - 224px - 8px);
        display: flex;
        flex-direction: column;
        padding-bottom: 12px;
        // background-color: black;
        overflow-x: hidden;
        overflow-y: auto;
        margin-top: 24px;

        .sentence {
            position: relative;
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-items: center;
            width: max-content;
            white-space: normal;
            max-width: 100%;
            line-height: 28px;

            .content {
                width: max-content;
            }
        }

        .user {
            width: max-content;
            border: 0px solid;
            align-self: flex-end;
            padding: 8px 12px 8px 12px;
            border-radius: 12px 0px 12px 12px;
            background: var(--background-color-bg-5, rgba(241, 243, 245, 1));
            margin-top: 12px;
            margin-bottom: 12px;
        }
        .robot {
            font-family: PingFang SC;
            font-size: 14px;
            font-weight: 400;
            letter-spacing: 0.003em;

            border: 0px solid;
            align-self: flex-start;
            padding: 3px 12px 3px 0px;
        }

        .loading-wrapper {
            width: max-content;
            display: inline-block;

            .loading {
                margin-left: 8px;
                width: max-content;
            }

            .dot {
                background-color: rgba(193, 163, 237, 1);
                width: 8px;
                height: 8px;
            }
        }

        .aiReadying {
            font-family: PingFang SC;
            font-size: 16px;
            font-weight: 500;
            color: rgba(27, 30, 61, 0.6);
            text-align: center;
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-items: center;
            line-height: 28px;
        }

        .aiReading-spin {
            margin-right: 12px;
            line-height: 16px;
        }

        .interruptTag {
            width: max-content;
            height: 22px;
            padding: 0px 6px 0px 6px;
            border-radius: 4px;
            margin-left: 6px;
            font-family: PingFang SC;
            font-size: 12px;
            font-weight: 400;
            line-height: 22px;
            letter-spacing: 0.003em;
            color: var(--text-color-text-3, rgba(115, 122, 135, 1));
            background: var(--security-unknown-tag-unknown-1, rgba(241, 243, 245, 1));
        }
    }

    .conversation::-webkit-scrollbar {
        width: 0px;
        height: 0px;
    }
    
    .conversation::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0);
        border-radius: 0px;
    }
    
    .conversation::-webkit-scrollbar-track {
        background: rgba(0,0,0,0);
        border-radius: 0px;
    }

    .toolBar {
        position: absolute;
        right: 0px;
        margin-right: 36px;
        bottom: 36px;
    }

    .controller {
        position: absolute;
        left: 0px;
        bottom: 36px;
        margin-left: 50%;
        transform: translateX(-50%);
    }

    .declare {
        position: absolute;
        bottom: 8px;
        left: 12px;
        color: var(--text-color-text-4, rgba(199, 204, 214, 1));
        font-size: 10px;
        font-weight: 400;
        line-height: 20px;
    }
}

.mobile {
    padding: 12px 28px;
}

.text {
    width: 100%;
    text-align: center;
    color: rgba(148, 116, 255, 1);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
}

.btns {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;

    .setting {
        background-color: rgba(111, 111, 111, 0.497);
        border-radius: 50%;
        width: 48px;
        height: 48px;
        padding: 12px;
        box-sizing: border-box;
        cursor: pointer;
    }

    .btn {
        cursor: pointer;
    }

    .btn:hover {
        opacity: 0.8;
    }

    .btn:active {
        opacity: 1;
    }
}

.column {
    flex-direction: column !important;
    align-items: flex-end !important;
}

.interrupt {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background: #FFFFFF;
    border-radius: 4px;
    box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.08), 0px 0px 0px 1px rgba(221, 226, 233, 1);
    border-color: #d9d9d9;
    width: 81px;
    height: 24px;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */

    .interrupt-text {
        color: var(--text-color-text-3, rgba(115, 122, 135, 1));
        font-size: 12px;
    }
    
    &:hover {
      opacity: 0.8;
    }
    
    &:active {
      opacity: 1;
    }
}

.camera-wrapper {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 320px;
    height: 200px;
    border-radius: 8px;
    background: var(--line-color-border-2, rgba(234, 237, 241, 1));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 0.81px solid var(--line-color-border-3, rgba(221, 226, 233, 1));
    overflow: hidden;
    z-index: 4;

    .camera-player {
        width: 100%;
        height: 100%;
        border-radius: 8px;
    }

    .camera-placeholder {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        font-size: 12px;
        color: var(--text-color-text-3, rgba(115, 122, 135, 1));

        .camera-placeholder-close-note {
            margin-bottom: 8px;
        }

        .camera-open-btn {
            color: var(--primary-color-primary-6, rgba(22, 100, 255, 1));
            cursor: pointer;
        }
    }
}