
.live-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    font-family: Arial, Helvetica, sans-serif;
}

.live-chat-toggle {
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: #0878e8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 22px rgba(0, 90, 200, .3);
    transition: .2s;
}

.live-chat-toggle:hover {
    background: #0564c5;
    transform: scale(1.06);
}

.live-chat-toggle svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.live-chat-toggle-label {
    display: none;
}

.live-chat-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 350px;
    height: 470px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border: 1px solid #e1e9f3;
    border-radius: 15px;
    box-shadow: 0 12px 40px rgba(20, 50, 90, .2);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.live-chat-panel.open {
    display: flex;
    animation: liveChatAppear .2s ease;
}

@keyframes liveChatAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-chat-header {
    height: 65px;
    min-height: 65px;
    padding: 10px 14px;
    background: #0878e8;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-chat-avatar {
    width: 39px;
    height: 39px;
    border-radius: 50%;
    background: #fff;
    color: #0878e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.live-chat-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.live-chat-header-info strong {
    font-size: 13px;
}

.live-chat-header-info span {
    font-size: 10px;
    color: #e5f2ff;
}

.live-chat-header-info i {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #43e69b;
    border-radius: 50%;
    margin-right: 4px;
}

.live-chat-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 27px;
    cursor: pointer;
    line-height: 1;
}

.live-chat-auth {
    flex: 1;
    padding: 17px 20px;
    overflow-y: auto;
}

.live-chat-intro {
    text-align: center;
    margin-bottom: 15px;
}

.live-chat-intro h2 {
    font-size: 19px;
    color: #17243a;
    margin-bottom: 5px;
}

.live-chat-intro p {
    font-size: 11px;
    color: #65748b;
    line-height: 1.5;
}

.live-chat-tabs {
    display: flex;
    padding: 3px;
    background: #edf4fc;
    border-radius: 8px;
    margin-bottom: 13px;
}

.live-chat-tabs button {
    flex: 1;
    padding: 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #65748b;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.live-chat-tabs button.active {
    background: #fff;
    color: #0878e8;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .06);
}

.live-chat-form {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.live-chat-form label {
    font-size: 11px;
    font-weight: bold;
    color: #34445a;
}

.live-chat-form input {
    width: 100%;
    height: 37px;
    padding: 0 10px;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    outline: none;
    font-size: 12px;
    margin-bottom: 5px;
}

.live-chat-form input:focus {
    border-color: #0878e8;
}

.live-chat-primary {
    height: 39px;
    margin-top: 5px;
    border: 0;
    border-radius: 7px;
    background: #0878e8;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
}

.live-chat-primary:hover {
    background: #0564c5;
}

.live-chat-feedback {
    min-height: 16px;
    margin: 5px 0;
    text-align: center;
    font-size: 11px;
    color: #c03939;
}

.live-chat-application {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.live-chat-user {
    padding: 9px 13px;
    background: #f5f8fc;
    border-bottom: 1px solid #e9eef5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #34445a;
}

.live-chat-secure {
    color: #16834b;
    font-size: 10px;
    font-weight: normal;
}

.live-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    background: #f8fafd;
}

.live-chat-empty {
    margin: auto;
    text-align: center;
    color: #8996a8;
    font-size: 12px;
}

.live-chat-message {
    max-width: 83%;
    padding: 9px 11px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.live-chat-message.user {
    align-self: flex-end;
    background: #0878e8;
    color: #fff;
    border-bottom-right-radius: 3px;
}

.live-chat-message.admin {
    align-self: flex-start;
    background: #fff;
    color: #34445a;
    border: 1px solid #e5ebf3;
    border-bottom-left-radius: 3px;
}

.live-chat-message-time {
    display: block;
    margin-top: 4px;
    text-align: right;
    font-size: 9px;
    opacity: .7;
}

.live-chat-send {
    display: flex;
    gap: 8px;
    padding: 9px;
    background: #fff;
    border-top: 1px solid #e9eef5;
}

.live-chat-send input {
    flex: 1;
    min-width: 0;
    height: 37px;
    padding: 0 12px;
    border: 1px solid #dce5ef;
    border-radius: 20px;
    outline: none;
    font-size: 12px;
}

.live-chat-send input:focus {
    border-color: #0878e8;
}

.live-chat-send button {
    width: 37px;
    height: 37px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: #0878e8;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.live-chat-bottom {
    padding: 7px 11px;
    border-top: 1px solid #edf1f6;
    display: flex;
    justify-content: space-between;
    color: #8996a8;
    font-size: 10px;
}

.live-chat-bottom button {
    border: 0;
    background: transparent;
    color: #d04444;
    font-size: 10px;
    cursor: pointer;
}

.live-chat-widget .hidden {
    display: none !important;
}

@media (max-width: 480px) {
    .live-chat-widget {
        right: 15px;
        bottom: 15px;
    }

    .live-chat-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 85px;
        width: auto;
        height: min(500px, calc(100dvh - 110px));
        max-height: calc(100dvh - 110px);
    }

    .live-chat-toggle {
        width: 55px;
        height: 55px;
    }
}
