.ai-chat-widget {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ai-chat-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.ai-chat-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.ai-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0073aa;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ai-chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.ai-chat-container {
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-chat-header {
    background-color: #0073aa;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ai-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.ai-chat-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.ai-chat-message {
    margin-bottom: 16px;
    display: flex;
}

.ai-chat-user {
    justify-content: flex-end;
}

.ai-chat-assistant {
    justify-content: flex-start;
}

.ai-chat-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.ai-chat-user .ai-chat-message-content {
    background-color: #e9ecef;
    color: #212529;
}

.ai-chat-assistant .ai-chat-message-content {
    background-color: #0073aa;
    color: white;
}

.ai-chat-input-container {
    display: flex;
    padding: 16px;
    background: white;
    border-top: 1px solid #e5e5e5;
}

.ai-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.ai-chat-input:focus {
    border-color: #0073aa;
}

.ai-chat-send {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: #0073aa;
    color: white;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.ai-chat-send:hover {
    background-color: #005a87;
}

.ai-chat-typing .ai-chat-message-content {
    padding: 16px 20px;
}

.ai-chat-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

.ai-chat-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-chat-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .ai-chat-container {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        max-height: 600px;
    }
}
