/* AI Chat Widget */
.ai-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: inherit;
}
.ai-chat-toggle {
    width: 60px;
    height: 60px;
    background: var(--accent-02);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    transition: .3s;
    border: none;
    outline: none;
}
.ai-chat-toggle:hover {
    transform: scale(1.1);
}
.ai-chat-window {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
    flex-direction: column;
    overflow: hidden;
}
.ai-chat-window.open {
    display: flex;
}
.ai-chat-header {
    background: var(--accent-02);
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}
.ai-chat-close {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    opacity: .8;
    background: none;
    border: none;
    color: #fff;
}
.ai-chat-close:hover {
    opacity: 1;
}
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f8f9fb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}
.ai-chat-msg--bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-bottom-left-radius: 4px;
}
.ai-chat-msg--user {
    align-self: flex-end;
    background: var(--accent-02);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ai-chat-msg a {
    color: var(--accent-02);
    text-decoration: underline;
}
.ai-chat-msg--user a {
    color: #fff;
}
.ai-chat-input {
    display: flex;
    padding: 10px;
    gap: 8px;
    border-top: 1px solid #eee;
    background: #fff;
}
.ai-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}
.ai-chat-input input:focus {
    border-color: var(--accent-02);
}
.ai-chat-input button {
    background: var(--accent-02);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-chat-input button:hover {
    opacity: .85;
}

@media (max-width: 480px) {
    .ai-chat-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        position: fixed;
        border-radius: 0;
    }
    .ai-chat-toggle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}
.ai-chat-clear {
    cursor: pointer;
    font-size: 16px;
    background: none;
    border: none;
    color: #fff;
    opacity: .7;
    margin-right: 8px;
    padding: 0;
    line-height: 1;
}
.ai-chat-clear:hover {
    opacity: 1;
}