.aicb-widget-root {
    position: fixed;
    bottom: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.aicb-position-right { right: 24px; }
.aicb-position-left { left: 24px; }

.aicb-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    transition: transform 0.15s ease;
}

.aicb-bubble:hover {
    transform: scale(1.06);
}

.aicb-bubble-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.aicb-chat-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aicb-chat-title-group {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.aicb-chat-brand {
    font-size: 10.5px;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.2px;
}

.aicb-brand-icon {
    flex-shrink: 0;
}

.aicb-header-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.aicb-chat-window {
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 360px;
    max-width: 90vw;
    height: 480px;
    max-height: 70vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.22);
    overflow: hidden;
}

.aicb-position-left .aicb-chat-window {
    right: auto;
    left: 0;
}

.aicb-widget-root.aicb-open .aicb-chat-window {
    display: flex;
}

.aicb-chat-window.aicb-inline-window {
    display: flex;
    position: static;
    width: 100%;
    max-width: 480px;
    height: 520px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.aicb-chat-header {
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.aicb-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.aicb-chat-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7f8fa;
}

.aicb-msg {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.aicb-msg-bot {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    border-bottom-left-radius: 4px;
}

.aicb-msg-user {
    align-self: flex-end;
    background: #2563eb;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.aicb-msg-typing {
    align-self: flex-start;
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

.aicb-msg-error {
    align-self: center;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
}

.aicb-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #eee;
    background: #fff;
}

.aicb-chat-input {
    flex: 1;
    resize: none;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    max-height: 90px;
}

.aicb-chat-input:focus {
    outline: none;
    border-color: #2563eb;
}

.aicb-send-btn {
    border: none;
    color: #fff;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.aicb-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .aicb-chat-window {
        width: 92vw;
        height: 75vh;
    }
}
