#livechat-bubble-root {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
}
.livechat-bubble-btn {
    background: #2870f4;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    box-shadow: 0 4px 16px rgba(20,60,120,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    outline: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    padding: 0;
}
.livechat-bubble-btn svg {
    width: 38px;
    height: 38px;
    display: block;
}



.livechat-bubble-btn:hover {
    box-shadow: 0 8px 28px rgba(24,119,242,0.21);
}

.livechat-bubble-btn svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.livechat-bubble-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 340px;
    max-width: 98vw;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.18);
    overflow: hidden;
    border: 1px solid #e5e8ee;
    z-index: 100000;
    animation: fadein 0.23s;
}
@keyframes fadein {
    from { opacity: 0; transform: translateY(35px);}
    to { opacity: 1; transform: translateY(0);}
}

/* Chat form fields */
#livechat-bubble-window input.chat-field,
#livechat-bubble-window textarea.chat-field {
    font-size: 15px;
    margin-bottom: 10px;
    padding: 7px 9px;
    border-radius: 7px;
    border: 1px solid #e0e5ee;
    width: 100%;
    box-sizing: border-box;
}
#livechat-bubble-window button {
    cursor: pointer;
    font-size: 15px;
}

#livechat-chatbox {
    background: #fff;
    border-radius: 8px;
    box-shadow: none;
}

#livechat-history {
    font-size: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 0;
    min-height: 90px;
    max-height: 190px;
    overflow-y: auto;
}
#livechat-history::-webkit-scrollbar {
    width: 7px;
    background: #e5e8ee;
}
#livechat-history::-webkit-scrollbar-thumb {
    background: #dde6fa;
    border-radius: 6px;
}

/* Bubble message alignment */
#livechat-history .from-admin,
#livechat-history .admin {
    float: right;
    background: #d2f7e4 !important;
    color: #206c4d !important;
}

#livechat-history .from-user,
#livechat-history .user {
    float: left;
    background: #f2f4fc !important;
    color: #1a2351 !important;
}

#livechat-history .bubble {
    display: inline-block;
    padding: 7px 13px;
    margin: 5px 0;
    border-radius: 11px;
    max-width: 80%;
    word-break: break-word;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

/* Chat input row */
#livechat-msg-form {
    border-top: 1px solid #e9ecf4;
    background: #fafcff;
    padding: 8px 8px 8px 12px;
}
#livechat-msg-inp {
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    padding: 7px;
    width: 100%;
    font-size: 15px;
}

#livechat-msg-form button {
    background: #1877f2;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 0 19px;
    font-weight: 600;
    margin-left: 8px;
}
#livechat-msg-form button:active {
    background: #155cc1;
}

@media (max-width: 480px) {
    .livechat-bubble-window {
        right: 3vw;
        left: 3vw;
        width: 94vw;
        min-width: 0;
    }
}
@media (max-width: 480px) {
  .livechat-bubble-window {
    /* stick to the viewport, not its container */
    position: fixed !important;
    /* sit above the bubble button (80px high) + some breathing room */
    bottom: calc(80px + 16px + env(safe-area-inset-bottom, 0px)) !important;
    /* center horizontally with side‑margins */
    left: 3vw !important;
    right: 3vw !important;
    /* full width minus the 3vw margins each side */
    width: auto !important;
    max-width: 94vw !important;
    /* let it scroll if it’s taller than the available height */
    max-height: calc(100vh - (80px + 32px)) !important;
    overflow-y: auto !important;
    z-index: 100000 !important;
  }
}

