/* Chatbot Specific Styles */

.chat-window {
    display: flex;
    flex-direction: column;
    height: 520px;
    border: 1px solid #eee;
    border-radius: 14px;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 18px 22px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fafafa;
    font-size: 15px;
    line-height: 1.5;
}

.message {
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in;
}

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

.user {
    text-align: right;
}

.user-bubble {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    display: inline-block;
    max-width: 80%;
    text-align: left;
}

.bot {
    text-align: left;
}

.bot-bubble {
    background: white;
    color: #333;
    padding: 14px 18px;
    border-radius: 18px 18px 18px 4px;
    display: inline-block;
    max-width: 85%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
}

.bot-bubble h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #333;
    font-size: 1.1rem;
}

.bot-bubble h4 {
    margin-top: 15px;
    margin-bottom: 8px;
    color: #444;
    font-size: 1rem;
}

.bot-bubble ul,
.bot-bubble ol {
    margin: 10px 0 10px 20px;
    padding: 0;
}

.bot-bubble li {
    margin-bottom: 8px;
}

.bot-bubble strong {
    color: #667eea;
    font-weight: 700;
}

.chat-input {
    display: flex;
    border-top: 1px solid #eee;
    background: white;
}

.chat-input input {
    flex: 1;
    padding: 16px;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

.chat-input button {
    padding: 0 24px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.chat-input button:hover {
    opacity: 0.9;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.suggestion-btn {
    background: #f0f2ff;
    color: #667eea;
    border: 1px solid #d1d9ff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.suggestion-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.case-study {
    background: linear-gradient(135deg, #f8f9ff, #eef1ff);
    border-left: 4px solid #764ba2;
    padding: 16px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.case-study h4 {
    color: #764ba2;
    margin: 0 0 8px 0;
    font-size: 15px;
}

.case-study p {
    margin: 0;
    color: #555;
    font-size: 14px;
}

.example-box {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 14px;
    margin: 12px 0;
    border-radius: 10px;
    font-size: 14px;
}

.example-box strong {
    color: #667eea;
}

.teaching-point {
    background: #f0f7ff;
    border-left: 3px solid #667eea;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
}

.typing-indicator {
    display: inline-flex;
    gap: 4px;
    padding: 12px 18px;
    background: white;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

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

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

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

.resource-link {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    transition: transform 0.3s;
    font-size: 14px;
}

.resource-link:hover {
    transform: translateY(-2px);
}

/* Responsive for Chatbot */
@media (max-width: 768px) {
    .chat-window {
        height: 500px;
    }
    
    .chat-header {
        padding: 14px 18px;
        font-size: 1rem;
    }
    
    .chat-body {
        padding: 15px;
    }
    
    .bot-bubble,
    .user-bubble {
        max-width: 90%;
    }
    
    .suggestions {
        gap: 8px;
    }
    
    .suggestion-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}