/* AI Chat Button */
.ai-chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #232323;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(35, 35, 35, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 998;
    color: #fff;
}

.ai-chat-button:hover {
    background: #1a1a1a;
    box-shadow: 0 6px 16px rgba(35, 35, 35, 0.6);
    transform: scale(1.1);
}

.ai-chat-button:active {
    transform: scale(0.95);
}

/* AI Chat Window */
.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
}

.ai-chat-window.active {
    display: flex;
}

/* Chat Header */
.ai-chat-header {
    background: #232323;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.ai-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ai-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.ai-chat-close:hover {
    transform: scale(1.2);
}

/* Chat Messages Container */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

/* Message Styles */
.ai-message {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
}

.ai-message-text {
    background: #e0e0e0;
    color: #333;
    padding: 12px 16px;
    border-radius: 12px;
    border-radius: 12px 12px 12px 4px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.user-message {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.user-message-text {
    background: #232323;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    border-radius: 12px 12px 4px 12px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

/* Welcome Message */
.ai-welcome {
    text-align: center;
    padding: 20px;
    color: #666;
}

.ai-welcome-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.ai-welcome h4 {
    margin: 10px 0;
    color: #333;
    font-size: 16px;
}

.ai-welcome p {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #999;
}

/* Chat Input */
.ai-chat-input-wrapper {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
}

.ai-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.ai-chat-input:focus {
    border-color: #232323;
}

.ai-chat-input::placeholder {
    color: #999;
}

.ai-send-button {
    background: #232323;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}

.ai-send-button:hover {
    background: #1a1a1a;
}

.ai-send-button:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-chat-window {
        width: calc(100% - 60px);
        height: 450px;
        bottom: 100px;
        right: 30px;
        left: 30px;
    }

    .ai-message-text,
    .user-message-text {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .ai-chat-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .ai-chat-window {
        width: calc(100% - 40px);
        height: 400px;
        bottom: 80px;
        right: 20px;
        left: 20px;
        border-radius: 8px;
    }

    .ai-chat-messages {
        padding: 16px;
    }

    .ai-chat-input-wrapper {
        padding: 12px;
    }
}
