/**
 * Kooshanic AI Chat Styles
 * File: inc/ksn-ai-chat/ksn-ai-chat.css
 */

#ai-chat-widget-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
    font-size: 14px;
}

#ai-toggle-btn {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: bold;
    transition: background 0.2s ease;
}

#ai-toggle-btn:hover {
    background-color: #005177;
}

#ai-chat-box {
    display: none;
    flex-direction: column;
    width: 350px;
    height: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 1px solid #ddd;
}

.ai-chat-header {
    background: #0073aa;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

#ai-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.ai-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f9f9f9;
}

.ai-user-message,
.ai-assistant-message,
.ai-loading-message,
.ai-error-message {
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 85%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.ai-user-message {
    background: #0073aa;
    color: #fff;
    align-self: flex-end;
    border-bottom-left-radius: 2px;
}

.ai-assistant-message,
.ai-loading-message {
    background: #e2e2e2;
    color: #333;
    align-self: flex-start;
    border-bottom-right-radius: 2px;
}

.ai-error-message {
    background: #ffdddd;
    color: #900;
    align-self: flex-start;
}

.ai-chat-input-area {
    display: flex;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #eee;
    gap: 8px;
}

#ai-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
}

#ai-input:focus {
    border-color: #0073aa;
}

#ai-send-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 0 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s ease;
}

#ai-send-btn:hover {
    background: #005177;
}

#ai-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    #ai-chat-box {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        left: 0;
        border-radius: 0;
    }
}
