﻿.chat-launcher {
    position: fixed;
    right: 18px;
    bottom: 86px;
    z-index: 1056;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .28s ease, transform .28s ease;
}

.chat-launcher.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.chat-launcher__button {
    position: relative;
    order: 2;
    width: 68px;
    height: 90px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    /* overflow: hidden; */
    background: #ffffff00 !important;
    box-shadow: 0 16px 34px rgba(6, 28, 63, .26);
    cursor: pointer;
}
.chat-launcher__button:focus {
    outline: 0 !important;
}

.chat-launcher__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-launcher__pulse {
    position: absolute;
    inset: -6px;
    border: 2px solid rgba(var(--rm-orange-rgb), .55);
    border-radius: 50%;
    animation: redy-pulse 2.2s infinite;
}

.chat-launcher__label {
    order: 1;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--rm-blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(6, 28, 63, .2);
    transition: opacity .2s ease, transform .2s ease;
}

.chat-launcher__label.is-hidden {
    opacity: 0;
    transform: translateX(4px);
    pointer-events: none;
}

.chat-popper {
    position: fixed;
    right: 20px;
    bottom: 170px;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    border: 1px solid rgba(var(--rm-blue-rgb), .12);
    border-radius: 22px;
    box-shadow: 0 24px 48px rgba(6, 28, 63, .24);
    z-index: 1055;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(18px) scale(.98);
    opacity: 0;
    transition: transform .28s ease, opacity .28s ease;
}

.chat-popper.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--rm-blue) 0%, var(--rm-blue-light) 100%);
    color: #ffffff;
}

.chat-header__identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .72);
    background: #ffffff;
    object-fit: cover;
    flex: 0 0 42px;
}

.chat-header h5 {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.1;
    margin: 0 0 2px;
}

.chat-header small {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, .82);
}

.close-chat {
    background: rgba(255, 255, 255, .12);
    border: 0;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.chat-body {
    padding: 14px;
    min-height: 280px;
    max-height: 360px;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--rm-bg-light) 0%, #ffffff 100%);
    display: flex;
    flex-direction: column;
}

.chat-message {
    margin-bottom: 10px;
    padding: 11px 13px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.55;
    max-width: 92%;
    word-break: break-word;
}

.bot-message {
    background: var(--rm-bg-light);
    color: #23405f;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.user-message {
    background: linear-gradient(135deg, var(--rm-blue) 0%, var(--rm-blue-light) 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 2px 0 8px;
}

.chat-chip,
.chat-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(var(--rm-blue-rgb), .14);
    background: #ffffff;
    color: var(--rm-blue);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.chat-chip:hover,
.chat-chip:focus,
.chat-action-link:hover,
.chat-action-link:focus {
    background: var(--rm-blue);
    border-color: var(--rm-blue);
    color: #ffffff;
    outline: 0;
    transform: translateY(-1px);
}

.chat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -2px 0 10px;
}

.chat-footer {
    padding: 12px 14px 14px;
    background: #ffffff;
    border-top: 1px solid rgba(var(--rm-blue-rgb), .08);
    display: flex;
    gap: 8px;
}

.chat-footer input {
    border-radius: 999px;
    font-size: 13px;
    min-height: 42px;
    border-color: rgba(var(--rm-blue-rgb), .18);
}

.chat-footer input:focus {
    border-color: var(--rm-blue);
    box-shadow: 0 0 0 .18rem rgba(10, 78, 163, .14);
}

.chat-footer button {
    border-radius: 50%;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes redy-pulse {
    0% {
        transform: scale(.92);
        opacity: .9;
    }
    70% {
        transform: scale(1.08);
        opacity: 0;
    }
    100% {
        transform: scale(1.08);
        opacity: 0;
    }
}

@media (max-width: 575.98px) {
    .chat-launcher {
        right: 14px;
        bottom: 72px;
    }

    .chat-launcher__button {
        width: 60px;
        height: 80px;
    }

    .chat-launcher__label {
        font-size: 11px;
        padding: 5px 9px;
    }

    .chat-popper {
        right: 12px;
        left: 12px;
        bottom: 146px;
        width: auto;
        max-width: none;
    }

    .chat-body {
        min-height: 240px;
        max-height: 320px;
    }

    .chat-message {
        max-width: 96%;
    }
}