.live-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1040;
    font-family: inherit;
}

.live-chat-launcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 18px 0 12px;
    border: 0;
    border-radius: 999px;
    background: #005bbb;
    color: #fff;
    box-shadow: 0 16px 40px rgba(0, 31, 77, 0.24);
    font-weight: 800;
    letter-spacing: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.live-chat-launcher:hover {
    background: #004a99;
    transform: translateY(-1px);
    box-shadow: 0 18px 46px rgba(0, 31, 77, 0.3);
}

.live-chat-launcher-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.live-chat-launcher em {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f97316;
    color: #fff;
    font-style: normal;
    font-size: 0.76rem;
}

.live-chat-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: min(380px, calc(100vw - 28px));
    overflow: hidden;
    border: 1px solid #cfd8e4;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(2, 22, 49, 0.24);
    transform-origin: bottom right;
    animation: live-chat-in 0.2s ease both;
}

@keyframes live-chat-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.live-chat-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #063f84;
    color: #fff;
}

.live-chat-panel-head strong {
    display: block;
    font-size: 1rem;
}

.live-chat-panel-head span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
}

.live-chat-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.live-chat-start,
.live-chat-conversation {
    padding: 16px 18px 18px;
}

.live-chat-start p {
    margin: 0 0 12px;
    color: #40516a;
    font-size: 0.9rem;
}

.live-chat-start label {
    display: block;
    margin-bottom: 10px;
    color: #10243f;
    font-size: 0.84rem;
    font-weight: 800;
}

.live-chat-start input,
.live-chat-start textarea,
.live-chat-composer textarea {
    display: block;
    width: 100%;
    margin-top: 5px;
    border: 1px solid #cfd8e4;
    border-radius: 5px;
    padding: 10px 11px;
    color: #10243f;
    font: inherit;
    resize: none;
}

.live-chat-start input:focus,
.live-chat-start textarea:focus,
.live-chat-composer textarea:focus {
    outline: 2px solid rgba(0, 91, 187, 0.18);
    border-color: #005bbb;
}

.live-chat-primary,
.live-chat-composer button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 5px;
    background: #005bbb;
    color: #fff;
    font-weight: 800;
}

.live-chat-primary {
    width: 100%;
}

.live-chat-status-line {
    margin-bottom: 12px;
    padding: 9px 10px;
    border-radius: 5px;
    background: #edf5ff;
    color: #0b4d91;
    font-size: 0.86rem;
    font-weight: 800;
}

.live-chat-messages {
    height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.live-chat-user-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
}

.live-chat-user-message--visitor {
    align-items: flex-end;
}

.live-chat-user-message span {
    margin-bottom: 3px;
    color: #66758c;
    font-size: 0.72rem;
    font-weight: 700;
}

.live-chat-user-message p {
    max-width: 82%;
    margin: 0;
    padding: 9px 11px;
    border-radius: 8px;
    background: #eef2f8;
    color: #10243f;
    font-size: 0.9rem;
    line-height: 1.35;
    white-space: pre-wrap;
}

.live-chat-user-message--visitor p {
    background: #005bbb;
    color: #fff;
}

.live-chat-user-message--system p {
    background: transparent;
    color: #66758c;
    padding: 0;
    font-size: 0.8rem;
}

.live-chat-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #dde5ef;
}

.live-chat-composer textarea {
    margin-top: 0;
}

.live-chat-end {
    width: 100%;
    margin-top: 10px;
    min-height: 36px;
    border: 1px solid #cfd8e4;
    border-radius: 5px;
    background: #fff;
    color: #40516a;
    font-weight: 800;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.live-chat-end:hover,
.live-chat-end:focus {
    background: #fff5f5;
    border-color: #f2b8b8;
    color: #b42318;
}

@media (max-width: 640px) {
    .live-chat-widget {
        right: 14px;
        bottom: 14px;
    }

    .live-chat-launcher {
        min-height: 48px;
        padding-right: 15px;
    }

    .live-chat-panel {
        position: fixed;
        inset: auto 10px 74px 10px;
        width: auto;
    }
}
