/* Private Chatbot Widget Styles */
:root {
    --chatbot-primary: #007bff;
    --chatbot-secondary: #6c757d;
    --chatbot-success: #28a745;
    --chatbot-danger: #dc3545;
    --chatbot-warning: #ffc107;
    --chatbot-info: #17a2b8;
    --chatbot-light: #f8f9fa;
    --chatbot-dark: #343a40;
    --chatbot-white: #ffffff;
    --chatbot-border: #dee2e6;
}

/* Chatbot Container */
.private-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    background: var(--chatbot-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
}

.chatbot-icon {
    font-size: 24px;
    color: var(--chatbot-white);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--chatbot-danger);
    color: var(--chatbot-white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 500px;
    background: var(--chatbot-white);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--chatbot-border);
}

/* Chatbot Header */
.chatbot-header {
    background: var(--chatbot-primary);
    color: var(--chatbot-white);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-title {
    font-weight: 600;
    font-size: 16px;
}

.chatbot-controls {
    display: flex;
    gap: 8px;
}

.chatbot-upload-btn,
.chatbot-close-btn {
    background: none;
    border: none;
    color: var(--chatbot-white);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.chatbot-upload-btn:hover,
.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f8f9fa;
    height: 0;
    min-height: 300px;
    max-height: 400px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.chatbot-message {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

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

.chatbot-message--user .message-content {
    background: var(--chatbot-primary);
    color: var(--chatbot-white);
    border-radius: 18px 18px 4px 18px;
}

.chatbot-message--bot .message-content {
    background: var(--chatbot-white);
    color: var(--chatbot-dark);
    border-radius: 18px 18px 18px 4px;
    border: 1px solid var(--chatbot-border);
}

.chatbot-message--system .message-content {
    background: var(--chatbot-info);
    color: var(--chatbot-white);
    border-radius: 12px;
    font-size: 13px;
    font-style: italic;
}

.chatbot-message--error .message-content {
    background: var(--chatbot-danger);
    color: var(--chatbot-white);
    border-radius: 12px;
}

.chatbot-message--typing .message-content {
    background: var(--chatbot-white);
    color: var(--chatbot-secondary);
    border-radius: 18px 18px 18px 4px;
    border: 1px solid var(--chatbot-border);
    font-style: italic;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 14px;
}

/* Input Area */
.chatbot-input-area {
    padding: 16px;
    border-top: 1px solid var(--chatbot-border);
    background: var(--chatbot-white);
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chatbot-input-area textarea {
    flex: 1;
    border: 1px solid var(--chatbot-border);
    border-radius: 20px;
    padding: 10px 16px;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    min-height: 40px;
    max-height: 120px;
}

.chatbot-input-area textarea:focus {
    border-color: var(--chatbot-primary);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.chatbot-send-btn {
    background: var(--chatbot-primary);
    color: var(--chatbot-white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.chatbot-send-btn:hover {
    background: #0056b3;
}

.chatbot-send-btn:disabled {
    background: var(--chatbot-secondary);
    cursor: not-allowed;
}

/* File Upload Area */
.chatbot-file-area {
    padding: 16px;
    border-top: 1px solid var(--chatbot-border);
    background: var(--chatbot-light);
}

.file-drop-zone {
    border: 2px dashed var(--chatbot-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--chatbot-white);
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: var(--chatbot-primary);
    background: rgba(0, 123, 255, 0.05);
}

.file-drop-zone p {
    margin: 0 0 4px 0;
    font-weight: 500;
    color: var(--chatbot-dark);
    font-size: 14px;
}

.file-drop-zone small {
    color: var(--chatbot-secondary);
    font-size: 12px;
}

/* File Progress */
.file-progress {
    margin-top: 12px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--chatbot-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--chatbot-primary);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    font-size: 12px;
    color: var(--chatbot-secondary);
}

/* Notifications */
.chatbot-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: var(--chatbot-white);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    max-width: 300px;
    word-wrap: break-word;
}

.chatbot-notification--success {
    background: var(--chatbot-success);
}

.chatbot-notification--error {
    background: var(--chatbot-danger);
}

.chatbot-notification--info {
    background: var(--chatbot-info);
}

/* Loader Animation */
.loader {
    display: inline-block;
}

.loader .dot {
    animation: loading 1.4s infinite ease-in-out both;
    fill: var(--chatbot-secondary);
}

.loader .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loader .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loading {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .private-chatbot-container {
        bottom: 10px;
        right: 10px;
    }
    
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: 0;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chatbot-icon {
        font-size: 20px;
    }
} 
/* Enhanced scrollbar styling for better UX */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Enhanced mobile responsiveness */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 160px);
        max-height: calc(100vh - 160px);
        bottom: 70px;
        right: 10px;
    }
    
    .chatbot-messages {
        min-height: 200px;
        max-height: calc(100vh - 300px);
    }
}
