.v5a {
    --v5a-teal: #0f766e;
    --v5a-navy: #17345f;
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    font-family: inherit;
}

.v5a * {
    box-sizing: border-box;
}

.v5a [hidden] {
    display: none !important;
}

.v5a-launcher {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 18px;
    padding: 8px 15px 8px 8px;
    background: #fff;
    color: #173742;
    box-shadow: 0 14px 45px #08242f35;
    cursor: pointer;
    text-align: left;
}

.v5a-launcher img,
.v5a-profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.v5a-launcher strong,
.v5a-launcher small {
    display: block;
}

.v5a-launcher small {
    font-size: 11px;
    color: #647a81;
}

.v5a-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: min(420px, calc(100vw - 28px));
    height: min(680px, calc(100vh - 100px));
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #d8e2e4;
    border-radius: 24px;
    box-shadow: 0 24px 75px #071f2938;
    overflow: hidden;
}

.v5a-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--v5a-teal);
    color: #fff;
}

.v5a-header[data-assistant="selma"] {
    background: var(--v5a-navy);
}

.v5a-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v5a-profile small {
    display: block;
    opacity: .82;
    font-size: 12px;
}

.v5a-close {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
}

.v5a-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    background: #f5f8f8;
}

.v5a-picker button {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    text-align: left;
    border: 1px solid #d7e2e3;
    border-radius: 14px;
    background: #fff;
    padding: 7px 9px;
    font-weight: 700;
    cursor: pointer;
}

.v5a-picker button.active {
    outline: 2px solid #8bc7c1;
}

.v5a-picker img {
    grid-row: 1 / 3;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

.v5a-picker small {
    font-weight: 400;
    color: #667b82;
}

.v5a-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    background: #f6f9f9;
}

.v5a-message-row {
    display: flex;
    gap: 7px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.v5a-message-row.user {
    justify-content: flex-end;
}

.v5a-message-row img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.v5a-message-wrap {
    max-width: 82%;
}

.v5a-message {
    padding: 11px 13px;
    border-radius: 16px;
    line-height: 1.48;
    font-size: 14px;
    white-space: pre-wrap;
}

.v5a-bot {
    background: #fff;
    border: 1px solid #dbe5e7;
    border-bottom-left-radius: 5px;
}

.v5a-user {
    max-width: 82%;
    background: #153f4f;
    color: #fff;
    border-bottom-right-radius: 5px;
}

.v5a-handover {
    margin: 4px 34px 12px;
    padding: 9px 11px;
    border-radius: 11px;
    background: #eef1f8;
    color: #455677;
    font-size: 12px;
}

.v5a-feedback {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    color: #718188;
    font-size: 11px;
}

.v5a-feedback button {
    border: 1px solid #d3dfe1;
    border-radius: 999px;
    background: #fff;
    padding: 3px 8px;
    cursor: pointer;
}

.v5a-feedback.is-complete button {
    display: none;
}

.v5a-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 9px 12px;
    border-top: 1px solid #edf1f2;
}

.v5a-suggestions button {
    border: 1px solid #b9cacc;
    background: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.v5a-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 11px 12px;
    border-top: 1px solid #edf1f2;
}

.v5a-form textarea {
    flex: 1;
    min-width: 0;
    resize: none;
    border: 1px solid #c6d3d5;
    border-radius: 14px;
    padding: 11px 12px;
    font: inherit;
}

.v5a-form button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    background: #153f4f;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.v5a-panel footer {
    padding: 0 13px 12px;
    color: #6a7f86;
    font-size: 10px;
}

.v5a-proactive {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(340px, calc(100vw - 28px));
    display: grid;
    gap: 8px;
}

.v5a-card {
    position: relative;
    background: #fff;
    border: 1px solid #d8e2e4;
    border-radius: 16px;
    padding: 12px 40px 12px 12px;
    box-shadow: 0 12px 35px #0a283335;
}

.v5a-card strong,
.v5a-card span {
    display: block;
}

.v5a-card span {
    margin-top: 3px;
    font-size: 12px;
    color: #60747b;
}

.v5a-card button {
    margin-top: 8px;
    border: 0;
    border-radius: 999px;
    padding: 7px 10px;
    background: #edf6f4;
    color: #15564f;
    cursor: pointer;
}

.v5a-card .dismiss {
    position: absolute;
    right: 9px;
    top: 7px;
    margin: 0;
    background: none;
    padding: 3px;
    color: #667;
}

.v5a-typing {
    opacity: .7;
    font-style: italic;
}

@media (max-width: 600px) {
    .v5a {
        right: 12px;
        bottom: 12px;
    }

    .v5a-panel {
        position: fixed;
        inset: 8px;
        width: auto;
        height: auto;
    }

    .v5a-launcher small {
        display: none;
    }

    .v5a-proactive {
        position: fixed;
        right: 12px;
        bottom: 78px;
    }
}

/* VALU5_PRIORITY_A_COMPACT_ASSISTANT_V1 */
.v5a-launcher[aria-expanded="false"] {
    box-sizing: border-box !important;
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    padding: 6px !important;
    gap: 0 !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.v5a-launcher[aria-expanded="false"] > img {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.v5a-launcher[aria-expanded="false"] > span {
    display: none !important;
}

@media (max-width: 650px) {
    .v5a-launcher[aria-expanded="false"] {
        width: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
        height: 52px !important;
        min-height: 52px !important;
        max-height: 52px !important;
        padding: 5px !important;
    }

    .v5a-launcher[aria-expanded="false"] > img {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
    }
}

/* VALU5_ASSISTANT_LIVE_MODE_V12 */
.v5a-launcher > img,
.v5a-profile img,
.v5a-picker img,
.v5a-message-row.bot > img {
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        opacity .22s ease;
}

.v5a[data-assistant-state="idle"] .v5a-launcher > img {
    animation: v5a-avatar-breathe 4.8s ease-in-out infinite;
}

.v5a[data-assistant-state="active"] .v5a-profile img {
    box-shadow: 0 0 0 3px rgba(139, 199, 193, .34);
}

.v5a[data-assistant-state="thinking"] .v5a-profile img,
.v5a[data-assistant-state="thinking"] .v5a-launcher > img {
    animation: v5a-avatar-think 1.15s ease-in-out infinite;
    box-shadow: 0 0 0 4px rgba(139, 199, 193, .22);
}

.v5a[data-assistant-state="answering"] .v5a-profile img {
    animation: v5a-avatar-answer .72s ease-out 1;
}

.v5a[data-assistant-state="handover"] .v5a-profile img {
    animation: v5a-avatar-handover .62s ease-out 1;
}

@keyframes v5a-avatar-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}

@keyframes v5a-avatar-think {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.07); }
}

@keyframes v5a-avatar-answer {
    0% { transform: scale(.96); }
    55% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes v5a-avatar-handover {
    0% {
        transform: translateX(-4px) scale(.96);
        opacity: .72;
    }
    60% {
        transform: translateX(2px) scale(1.06);
        opacity: 1;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .v5a-launcher > img,
    .v5a-profile img,
    .v5a-picker img,
    .v5a-message-row.bot > img {
        animation: none !important;
        transition: none !important;
    }
}
