/* 镭目智能客服：纯前端、零第三方依赖 */
.ramon-chat {
    position: fixed;
    right: 1rem;
    bottom: 15%;
    z-index: 9999;
    width: 3.8rem;
    height: min(5.7rem, 76vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #263548;
    background: #fff;
    border: 1px solid rgba(0, 90, 160, .1);
    border-radius: .16rem;
    box-shadow: 0 .12rem .45rem rgba(19, 52, 82, .2);
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: .14rem;
    line-height: 1.6;
    opacity: 0;
    visibility: hidden;
    transform: translateX(.18rem);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.ramon-chat.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.ramon-chat * {
    box-sizing: border-box;
}

.ramon-chat-header {
    flex: none;
    display: flex;
    align-items: center;
    min-height: .74rem;
    padding: .14rem .16rem;
    color: #fff;
    background: linear-gradient(135deg, #006db3, #004f91);
}

.ramon-chat-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: .42rem;
    height: .42rem;
    margin-right: .1rem;
    border-radius: 50%;
    color: #005a9f;
    background: #fff;
    font-size: .16rem;
    font-weight: bold;
}

.ramon-chat-heading {
    min-width: 0;
    flex: 1;
}

.ramon-chat-title {
    font-size: .17rem;
    font-weight: bold;
    line-height: 1.35;
}

.ramon-chat-status {
    margin-top: .02rem;
    font-size: .12rem;
    opacity: .8;
}

.ramon-chat-actions {
    display: flex;
    align-items: center;
    gap: .06rem;
}

.ramon-chat-lang,
.ramon-chat-close {
    min-width: .3rem;
    height: .3rem;
    padding: 0 .06rem;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: .04rem;
    cursor: pointer;
    font: inherit;
    line-height: .28rem;
}

.ramon-chat-close {
    border: 0;
    font-size: .22rem;
}

.ramon-chat-messages {
    flex: 1;
    min-height: 0;
    padding: .16rem;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f4f7fa;
    scroll-behavior: smooth;
}

.ramon-chat-message {
    display: flex;
    margin-bottom: .12rem;
}

.ramon-chat-message.is-user {
    justify-content: flex-end;
}

.ramon-chat-bubble {
    max-width: 86%;
    padding: .09rem .12rem;
    border-radius: .04rem .12rem .12rem .12rem;
    color: #314255;
    background: #fff;
    box-shadow: 0 .02rem .08rem rgba(23, 57, 87, .06);
    white-space: pre-line;
    word-break: break-word;
}

.ramon-chat-message.is-user .ramon-chat-bubble {
    color: #fff;
    background: #0067ad;
    border-radius: .12rem .04rem .12rem .12rem;
}

.ramon-chat-quick {
    flex: none;
    display: flex;
    gap: .07rem;
    padding: .1rem .14rem;
    overflow-x: auto;
    background: #f4f7fa;
    border-top: 1px solid #e5ebf0;
    scrollbar-width: thin;
}

.ramon-chat-quick button {
    flex: none;
    padding: .055rem .1rem;
    color: #005a9f;
    background: #fff;
    border: 1px solid #b9d2e5;
    border-radius: .14rem;
    cursor: pointer;
    font: inherit;
    font-size: .12rem;
    white-space: nowrap;
}

.ramon-chat-quick button:hover {
    color: #fff;
    background: #005a9f;
}

.ramon-chat-form {
    flex: none;
    display: flex;
    align-items: center;
    gap: .08rem;
    padding: .12rem .14rem;
    background: #fff;
    border-top: 1px solid #e5ebf0;
}

.ramon-chat-input {
    min-width: 0;
    flex: 1;
    height: .38rem;
    padding: 0 .12rem;
    color: #263548;
    background: #f6f8fa;
    border: 1px solid #dce4eb;
    border-radius: .19rem;
    outline: 0;
    font: inherit;
}

.ramon-chat-input:focus {
    border-color: #0067ad;
    box-shadow: 0 0 0 .02rem rgba(0, 103, 173, .1);
}

.ramon-chat-send {
    flex: none;
    width: .6rem;
    height: .36rem;
    padding: 0;
    color: #fff;
    background: #0067ad;
    border: 0;
    border-radius: .18rem;
    cursor: pointer;
    font: inherit;
}

.ramon-chat-send:hover {
    background: #004f91;
}

.ramon-chat button:focus-visible,
.c-floating .b1:focus-visible {
    outline: .02rem solid #31a8ff;
    outline-offset: .02rem;
}

@media screen and (max-width: 750px) {
    .ramon-chat {
        right: .12rem;
        bottom: .12rem;
        width: calc(100% - .24rem);
        height: min(5.6rem, calc(100vh - .24rem));
        max-width: 4.2rem;
        font-size: .14rem;
        border-radius: .14rem;
    }

    .ramon-chat-header {
        min-height: .68rem;
        padding: .12rem .14rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ramon-chat {
        transition: none;
    }

    .ramon-chat-messages {
        scroll-behavior: auto;
    }
}
