.jsm-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f5a623;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 9998;
    transition: transform 0.15s ease;
}
.jsm-chat-bubble:hover {
    transform: scale(1.05);
}

/* Proactive teaser bubble */
.jsm-chat-teaser {
    position: fixed;
    bottom: 90px;
    right: 24px;
    max-width: 240px;
    background: #fff;
    color: #202124;
    padding: 12px 32px 12px 16px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    z-index: 9997;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.jsm-chat-teaser.jsm-chat-teaser-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.jsm-chat-teaser:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}
.jsm-chat-teaser-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.jsm-chat-teaser-close:hover {
    color: #555;
}

.jsm-chat-panel {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 460px;
    max-height: calc(100vh - 140px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.jsm-chat-panel.jsm-chat-open {
    display: flex;
}

.jsm-chat-header {
    background: #f5a623;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
}
.jsm-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.jsm-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f7f8fa;
}

.jsm-chat-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 14px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}
.jsm-chat-msg-visitor {
    background: #f5a623;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.jsm-chat-msg-other {
    background: #e8eaed;
    color: #202124;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.jsm-chat-input-row {
    display: flex;
    border-top: 1px solid #e0e0e0;
    padding: 8px;
    gap: 8px;
}
.jsm-chat-input {
    flex: 1;
    border: 1px solid #dcdcdc;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
}
.jsm-chat-send {
    background: #f5a623;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
}
.jsm-chat-send:hover {
    background: #d88f1a;
}

@media (max-width: 400px) {
    .jsm-chat-panel {
        right: 16px;
        left: 16px;
        width: auto;
    }
    .jsm-chat-teaser {
        right: 16px;
        max-width: calc(100vw - 90px);
    }
}
