/* AI Assistant specific styles */
.ai-container {
    display: flex;
    gap: 20px;
    height: 600px;
    margin-top: 20px;
}

.ai-input-panel {
    flex: 1;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.ai-chat-panel {
    flex: 2;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background-color: #6B3744;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
}

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

.chat-input-area {
    padding: 20px;
    border-top: 1px solid #ddd;
    background-color: white;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 40px;
    font-family: Arial, sans-serif;
}

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.4;
}

.user-message {
    background-color: #6B3744;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.ai-message {
    background-color: #fef5f1;
    color: #333;
    border: 1px solid #D4A574;
    border-bottom-left-radius: 4px;
}

.ai-message pre {
    background-color: #f1f3f4;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
}

.typing-indicator {
    display: none;
    padding: 12px 16px;
    background-color: #fef5f1;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    max-width: 80%;
    border: 1px solid #D4A574;
}

.typing-dots {
    display: inline-flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: #666;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

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

@keyframes typing {
    0%, 80%, 100% {
        opacity: 0.3;
    }
    40% {
        opacity: 1;
    }
}

.sample-questions {
    margin-top: 20px;
}

.sample-questions h4 {
    margin-bottom: 15px;
    color: #6B3744;
}

.sample-question {
    background-color: white;
    border: 1px solid #ddd;
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.sample-question:hover {
    background-color: #fef5f1;
    border-color: #6B3744;
}

.api-settings {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.api-settings h4 {
    margin: 0 0 10px 0;
    color: #6B3744;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    max-width: 80%;
    border: 1px solid #f5c6cb;
    margin-bottom: 15px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .ai-input-panel {
        order: 2;
        margin-top: 20px;
        padding: 15px;
    }

    .ai-chat-panel {
        order: 1;
        height: 500px;
        min-height: 500px;
    }

    .chat-messages {
        padding: 15px;
    }

    .chat-input-area {
        padding: 15px;
    }

    .chat-input {
        flex-direction: column;
        gap: 10px;
    }

    .chat-input textarea {
        min-height: 60px;
    }

    .chat-input .btn {
        width: 100%;
    }

    .sample-questions {
        margin-top: 15px;
    }

    .sample-question {
        padding: 12px;
        font-size: 13px;
    }

    .user-message,
    .ai-message,
    .typing-indicator {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .ai-chat-panel {
        height: 450px;
        min-height: 450px;
    }

    .chat-header {
        padding: 12px 15px;
        font-size: 0.95em;
    }

    .chat-messages {
        padding: 10px;
    }

    .chat-input-area {
        padding: 12px;
    }

    .sample-question {
        padding: 10px;
        font-size: 12px;
    }

    .user-message,
    .ai-message {
        padding: 10px 12px;
        font-size: 0.9em;
    }
}
