/**
 * OCS Group Chatbot Styles
 * Additional styles for integration with existing website
 */

/* Reset and base styles for chatbot */
.ocs-chatbot-container * {
    box-sizing: border-box;
}

/* Custom scrollbar for messages */
.ocs-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

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

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

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

/* Enhanced message styling */
.ocs-chatbot-message-content {
    position: relative;
}

.ocs-chatbot-message-content::selection {
    background: rgba(255, 107, 53, 0.2);
}

/* Link styling within messages */
.ocs-chatbot-message-content a {
    color: inherit;
    text-decoration: underline;
}

.ocs-chatbot-message.bot .ocs-chatbot-message-content a {
    color: #FF6B35;
}

.ocs-chatbot-message.user .ocs-chatbot-message-content a {
    color: rgba(255, 255, 255, 0.9);
}

/* Message timestamp (if needed) */
.ocs-chatbot-message-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

.ocs-chatbot-message.bot .ocs-chatbot-message-time {
    text-align: left;
}

/* Notification badge for new messages when chat is closed */
.ocs-chatbot-notification {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: ocsChatbotPulse 2s infinite;
}

@keyframes ocsChatbotPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Error message styling */
.ocs-chatbot-error {
    background: #ffebee !important;
    color: #c62828 !important;
    border-left: 4px solid #c62828;
}

/* Success message styling */
.ocs-chatbot-success {
    background: #e8f5e8 !important;
    color: #2e7d32 !important;
    border-left: 4px solid #2e7d32;
}

/* Quick replies styling */
.ocs-chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ocs-chatbot-quick-reply {
    background: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
    border: 1px solid #FF6B35;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ocs-chatbot-quick-reply:hover {
    background: #FF6B35;
    color: white;
}

/* Loading state for the entire widget */
.ocs-chatbot-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .ocs-chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        max-height: 600px;
        right: 10px !important;
        bottom: 70px !important;
    }
    
    .ocs-chatbot-messages {
        padding: 15px;
    }
    
    .ocs-chatbot-input-container {
        padding: 15px;
    }
    
    .ocs-chatbot-message-content {
        max-width: 85%;
        font-size: 13px;
    }
}

/* Dark theme support (if website has dark mode) */
@media (prefers-color-scheme: dark) {
    .ocs-chatbot-window {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .ocs-chatbot-messages {
        background: #1e1e1e;
    }
    
    .ocs-chatbot-message.bot .ocs-chatbot-message-content {
        background: #3a3a3a;
        color: #ffffff;
    }
    
    .ocs-chatbot-input {
        background: #3a3a3a;
        color: #ffffff;
        border-color: #555;
    }
    
    .ocs-chatbot-input-container {
        background: #2d2d2d;
        border-color: #555;
    }
    
    .ocs-chatbot-typing {
        background: #3a3a3a;
    }
}

/* Print styles */
@media print {
    .ocs-chatbot-container {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ocs-chatbot-toggle {
        border: 2px solid #000;
    }
    
    .ocs-chatbot-window {
        border: 2px solid #000;
    }
    
    .ocs-chatbot-message.bot .ocs-chatbot-message-content {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ocs-chatbot-toggle,
    .ocs-chatbot-window,
    .ocs-chatbot-send,
    .ocs-chatbot-input {
        transition: none;
    }
    
    .ocs-chatbot-notification {
        animation: none;
    }
    
    @keyframes ocsChatbotTyping {
        0%, 100% {
            opacity: 0.6;
        }
        50% {
            opacity: 1;
        }
    }
}
