
/* ============================================= */
/* == CSS FOR DOCUMENT & IMAGE UPLOAD MESSAGE == */
/* ============================================= */

/* Main container for the document message bubble sent by the user */
.message.user .document-message {
    background-color: #e2ffc7; /* A light, WhatsApp-like green for user messages */
    padding: 8px 10px;
    border-radius: 12px;
    width: 250px;       /* Ek fixed width de rahe hain */
    max-width: 70%;     /* Screen ke 70% se zyada bada na ho */
    word-wrap: break-word;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column; /* Items ko upar-neeche stack karega */
}

/* Container for the image preview inside the message bubble */
.document-preview-image {
    margin-bottom: 6px; /* Image aur file name ke beech mein space */
    cursor: pointer;
}

/* THE MOST IMPORTANT PART - Styling for the image itself */
.document-preview-image img {
    width: 100%;             /* Image ko container ki poori width dega */
    height: 140px;           /* Image ki height fix kar dega */
    object-fit: cover;       /* Sabse zaroori: Image stretch nahi hogi, crop hokar fit ho jayegi */
    border-radius: 8px;      /* Image ke corners ko round karega */
    display: block;          /* Image ke neeche extra space hatata hai */
    background-color: #f0f0f0; /* Image load hone tak background color */
}

/* Styling for the PDF/other file icon */
.document-message .document-icon {
    font-size: 32px;
    color: #555;
    margin-bottom: 8px;
    text-align: center;
}
/* Styling for the new multi-select feature */
.multi-select-container .message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    background-color: #f1f1f1;
    padding: 10px 15px;
    border-radius: 20px;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

.checkbox-label:hover {
    background-color: #e0e0e0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.confirm-btn {
    background-color: #007bff;
    color: white;
    margin-top: 10px;
    align-self: center; /* Center the confirm button */
}

.confirm-btn:hover {
    background-color: #0056b3;
}

/* Styling for the file name text */
.document-message .document-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

/* Styling for the status text (Uploading..., Complete, etc.) */
.document-message .document-status {
    font-size: 12px;
    color: #555;
    text-align: right; /* Status ko right side mein rakhega */
    margin-top: 4px;
}


/* Bansal Hospital Chatbot Styles */
* {
    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%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Header Styles */
.chat-header {
    background: linear-gradient(135deg, #2E8B57, #228B22);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hospital-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.info h3 {
    font-size: 20px;
    margin-bottom: 2px;
}

.info p {
    font-size: 14px;
    opacity: 0.9;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.online-indicator {
    width: 10px;
    height: 10px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.welcome-message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    animation: slideIn 0.5s ease-out;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2E8B57, #228B22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.message-content {
    background: white;
    padding: 20px;
    border-radius: 15px 15px 15px 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.message-content h4 {
    color: #2E8B57;
    margin-bottom: 10px;
    font-size: 18px;
}

.message-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.message-content ul {
    list-style: none;
    margin: 15px 0;
}

.message-content li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #666;
}

.message-content li i {
    color: #2E8B57;
    width: 20px;
}

/* Individual Messages */
.message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    animation: messageSlide 0.3s ease-out;
}

.message.user {
    flex-direction: row-reverse;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px 15px 5px 15px;
}

.message.bot .message-content {
    background: white;
    border-radius: 15px 15px 15px 5px;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* File Preview */
.file-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.preview-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 500px;
    max-height: 600px;
    text-align: center;
}

#previewImage {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.preview-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-send, .btn-cancel {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-send {
    background: linear-gradient(135deg, #2E8B57, #228B22);
    color: white;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
}

.btn-send:hover, .btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Chat Input */
.chat-input {
    background: white;
    padding: 20px;
    border-top: 1px solid #eee;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
    margin-bottom: 15px;
}

.attach-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    padding: 12px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.attach-btn:hover {
    background: #e9ecef;
    color: #2E8B57;
}

#messageInput {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px;
    font-size: 16px;
    background: transparent;
}

.send-btn {
    background: linear-gradient(135deg, #2E8B57, #228B22);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1);
}

.send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-btn {
    background: white;
    border: 2px solid #2E8B57;
    color: #2E8B57;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: #2E8B57;
    color: white;
    transform: translateY(-2px);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    /* background: white; */
    margin: 0 20px 20px;
    border-radius: 15px 15px 15px 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-out;
}

.typing-animation {
    display: flex;
    gap: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2E8B57;
    animation: bounce 1.4s infinite both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
/* 
/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .chat-container {
        height: 95vh;
        border-radius: 15px;
    }

    .chat-header {
        padding: 15px;
    }

    .hospital-info {
        gap: 10px;
    }

    .logo {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .info h3 {
        font-size: 18px;
    }

    .message-content {
        max-width: 85%;
        padding: 15px;
    }

    .quick-actions {
        justify-content: center;
    }

    .quick-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Document Message Styles */
.document-message {
    background: #f8f9fa;
    border: 2px dashed #2E8B57;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    text-align: center;
}

.document-icon {
    font-size: 30px;
    color: #2E8B57;
    margin-bottom: 10px;
}

.document-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.document-status {
    color: #666;
    font-size: 14px;
}

/* Success/Error Messages */
.success-message {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}