.woo-ai-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.woo-ai-chat-toggle {
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a84ff, #4c6fff);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(10, 132, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.woo-ai-chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(10, 132, 255, 0.4);
}

.woo-ai-chat-toggle svg {
    width: 28px;
    height: 28px;
}

.woo-ai-chat-window {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 22px 48px rgba(10, 22, 70, 0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.woo-ai-chat-window.is-open {
    display: flex;
}

.woo-ai-chat-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, #0a84ff, #4c6fff);
    color: #fff;
}

.woo-ai-chat-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.woo-ai-chat-subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

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

.woo-ai-chat-message {
    max-width: 88%;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.woo-ai-chat-message--user {
    align-self: flex-end;
    color: #fff;
    background: #0a84ff;
    border-bottom-right-radius: 5px;
}

.woo-ai-chat-message--ai {
    align-self: flex-start;
    color: #1e2430;
    background: #fff;
    border: 1px solid #e4e8f0;
    border-bottom-left-radius: 5px;
}

.woo-ai-chat-typing {
    align-self: flex-start;
    color: #5e6b7d;
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 14px;
    border-bottom-left-radius: 5px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.woo-ai-chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8a95a8;
    animation: woo-ai-typing 1.2s infinite ease-in-out;
}

.woo-ai-chat-typing span:nth-child(2) {
    animation-delay: 0.16s;
}

.woo-ai-chat-typing span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes woo-ai-typing {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.55;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.woo-ai-chat-input-wrap {
    border-top: 1px solid #e4e8f0;
    padding: 12px;
    display: flex;
    gap: 8px;
    background: #fff;
}

.woo-ai-chat-input {
    flex: 1;
    border: 1px solid #d7ddea;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}

.woo-ai-chat-input:focus {
    border-color: #0a84ff;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
}

.woo-ai-chat-send {
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    color: #fff;
    background: #0a84ff;
    font-weight: 600;
    cursor: pointer;
}

.woo-ai-chat-send:disabled {
    opacity: 0.65;
    cursor: default;
}

@media (max-width: 480px) {
    .woo-ai-chat-widget {
        right: 12px;
        bottom: 12px;
    }

    .woo-ai-chat-window {
        right: 0;
        bottom: 70px;
        width: min(360px, calc(100vw - 24px));
        height: min(520px, calc(100vh - 96px));
    }
}
