#uia-chatbot-root, #uia-chatbot-root * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#uia-chatbot-root {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
}

.uia-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--uia-color, #e30613);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
    border: none;
}
.uia-bubble:hover {
    transform: scale(1.08);
}
.uia-bubble svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.uia-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 340px;
    max-width: 92vw;
    height: 460px;
    max-height: 75vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: uia-fade-in 0.15s ease;
}
.uia-window.uia-open {
    display: flex;
}
@keyframes uia-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.uia-header {
    background: var(--uia-color, #e30613);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.uia-header-title {
    font-weight: 600;
    font-size: 15px;
}
.uia-header-sub {
    font-size: 11px;
    opacity: 0.85;
}
.uia-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

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

.uia-msg {
    max-width: 85%;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.uia-msg a {
    color: inherit;
    text-decoration: underline;
}
.uia-msg-bot {
    background: #fff;
    color: #222;
    border: 1px solid #ececec;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
}
.uia-msg-user {
    background: var(--uia-color, #e30613);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}
.uia-msg-typing {
    display: inline-flex;
    gap: 4px;
    padding: 4px 0;
}
.uia-msg-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: uia-blink 1.2s infinite ease-in-out;
}
.uia-msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.uia-msg-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes uia-blink {
    0%, 80%, 100% { opacity: 0.25; }
    40% { opacity: 1; }
}

.uia-input-row {
    display: flex;
    border-top: 1px solid #ececec;
    padding: 10px;
    gap: 8px;
    background: #fff;
}
.uia-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 13.5px;
    outline: none;
}
.uia-input:focus {
    border-color: var(--uia-color, #e30613);
}
.uia-send-btn {
    background: var(--uia-color, #e30613);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.uia-send-btn svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}
.uia-send-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 480px) {
    .uia-window {
        width: 90vw;
        right: 5vw;
    }
}
