/* Custom styles for the chatbot */
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.container-fluid {
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.chatbot-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 15px;
    border-radius: 0;
    text-align: center;
    flex-shrink: 0;
}

.chatbot-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px); /* Adjust based on header height */
}

.message-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    height: calc(100% - 120px); /* Adjust for header and input area */
}

.message-item {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in;
}

.message-item.user {
    background: linear-gradient(135deg, #86a7dd 0%, #6483d8 100%) !important;
    color: white !important;
    margin-left: auto;
    text-align: right;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    position: relative;
    transform: scale(1.02);
    transition: all 0.3s ease;
    z-index: 10;
}
/* 
.message-item.user:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
} */

.message-item.user .message-content strong {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
}

.message-item.assistant {
    background: white;
    border: 1px solid #e9ecef;
    margin-right: auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.typing-dots {
    display: inline-block;
}

.typing-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: typing 1.4s infinite;
}

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

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

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

.input-group-custom {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.input-group-custom .form-control {
    border: none;
    padding: 15px 20px;
}

.input-group-custom .btn {
    border: none;
    padding: 15px 25px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.stats-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .chatbot-container {
        margin: 0;
    }

    .message-list {
        height: calc(100vh - 200px);
        padding: 15px;
    }

    .message-item {
        max-width: 95%;
        padding: 10px 12px;
    }

    .chatbot-header {
        padding: 12px;
    }

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

/* Markdown styling for message content */
.message-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.message-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-content li {
    margin-bottom: 4px;
    line-height: 1.4;
}

.message-content strong, .message-content b {
    font-weight: 600;
    color: inherit;
}

.message-content em, .message-content i {
    font-style: italic;
}

.message-content p {
    margin: 8px 0;
    line-height: 1.5;
}

.message-content code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.message-content pre {
    background: rgba(0, 0, 0, 0.1);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.message-content blockquote {
    border-left: 3px solid rgba(0, 0, 0, 0.2);
    padding-left: 12px;
    margin: 8px 0;
    font-style: italic;
    color: rgba(0, 0, 0, 0.7);
}

.message-content h1, .message-content h2, .message-content h3,
.message-content h4, .message-content h5, .message-content h6 {
    margin: 12px 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
}

.message-content h1 { font-size: 1.4em; }
.message-content h2 { font-size: 1.3em; }
.message-content h3 { font-size: 1.2em; }
.message-content h4 { font-size: 1.1em; }
.message-content h5, .message-content h6 { font-size: 1em; }

/* Typing indicator styling */
.typing-indicator {
    display: none;
    padding: 15px;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}