#ce-chatbot-root {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#ce-chatbot-toggle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #1565c0, #1a237e);
    color: #fff;
    font-size: 26px;
    box-shadow: 0 10px 30px rgba(21, 101, 192, 0.45);
    cursor: pointer;
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease;
}

#ce-chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(21, 101, 192, 0.55);
}

.ce-chatbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #00c853;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
}

#ce-chatbot-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: min(380px, calc(100vw - 24px));
    height: 560px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: ceChatSlideIn .25s ease;
}

#ce-chatbot-panel.ce-hidden {
    display: none;
}

@keyframes ceChatSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ce-chatbot-header {
    background: linear-gradient(135deg, #1565c0, #1a237e);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ce-chatbot-sub {
    font-size: 11px;
    opacity: .85;
    margin-top: 2px;
}

#ce-chatbot-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

#ce-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f7f9fc;
}

.ce-msg {
    display: flex;
    margin-bottom: 8px;
}

.ce-msg-bot { justify-content: flex-start; }
.ce-msg-user { justify-content: flex-end; }

.ce-msg-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.ce-msg-bot .ce-msg-bubble {
    background: #fff;
    border: 1px solid #e3e8f0;
    border-bottom-left-radius: 4px;
}

.ce-msg-user .ce-msg-bubble {
    background: #1565c0;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ce-msg-typing .ce-msg-bubble {
    color: #666;
    font-style: italic;
}

.ce-chatbot-quick {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    border-top: 1px solid #eef1f6;
    background: #fff;
}

.ce-quick-btn {
    border: 1px solid #d7e3f4;
    background: #f3f8ff;
    color: #1565c0;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}

.ce-chatbot-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #eef1f6;
    background: #fff;
}

#ce-chatbot-input {
    flex: 1;
    border: 1px solid #d7dce5;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
}

#ce-chatbot-input:focus {
    border-color: #1565c0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
}

#ce-chatbot-send {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #1565c0;
    color: #fff;
    cursor: pointer;
}

#ce-chatbot-send:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.ce-chatbot-footer {
    font-size: 10px;
    color: #6c757d;
    text-align: center;
    padding: 8px 12px 12px;
    background: #fff;
}

@media (max-width: 480px) {
    #ce-chatbot-panel {
        width: calc(100vw - 16px);
        right: -6px;
        height: calc(100vh - 100px);
    }
}
