/* Modern Insurance Chatbot Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Chat Container */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    max-height: 400px;
    margin-bottom: 20px;
}

/* Messages */
.message {
    margin-bottom: 16px;
    display: flex;
    animation: slideIn 0.3s ease-out;
}

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

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-message .message-content {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.message-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-content li {
    margin: 5px 0;
}

/* Sample Queries */
.sample-queries {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.sample-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.sample-btn {
    display: inline-block;
    margin: 4px 6px 4px 0;
    padding: 8px 12px;
    background: white;
    border: 2px solid #3498db;
    border-radius: 20px;
    color: #3498db;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sample-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
}

/* Input Container */
.input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 25px;
    border: 1px solid #e9ecef;
}

#messageInput {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 20px;
    background: white;
    outline: none;
    font-size: 14px;
}

#messageInput:focus {
    box-shadow: 0 0 0 2px #3498db33;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

#sendButton {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-width: 70px;
}

#sendButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#sendButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#clearButton {
    background: #e9ecef;
    color: #6c757d;
    min-width: 70px;
}

#clearButton:hover {
    background: #dc3545;
    color: white;
}

/* Stats Container */
.stats-container {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.stats-content {
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
    color: #6c757d;
}

.stats-content span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        min-height: 95vh;
        border-radius: 0;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .input-container {
        flex-direction: column;
        gap: 8px;
    }
    
    #sendButton, #clearButton {
        min-width: auto;
        width: 100%;
    }
    
    .sample-btn {
        display: block;
        width: 100%;
        margin: 4px 0;
        text-align: center;
    }
    
    .stats-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Status indicators */
.message-metadata {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
}

.user-message .message-metadata {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
}

.bot-message .message-metadata {
    color: #6c757d;
}

/* Success/Error states */
.success-indicator {
    color: #28a745;
}

.error-indicator {
    color: #dc3545;
}

.warning-indicator {
    color: #ffc107;
}