/* Bot Messages Styles */
/* Version: 1.0.0 */
/* Compatible with Telegram Bot Manager plugin */

.bot-messages-wrapper {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sort-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
    transition: background-color 0.2s ease;
}

.sort-button:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.sort-button:active {
    transform: translateY(0);
}

#message-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
}

.message-box {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.message-box:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.message-box:last-child {
    margin-bottom: 0;
}

.message-header {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
}

.message-content {
    color: #212529;
    line-height: 1.5;
    font-size: 15px;
}

.message-time {
    color: #6c757d;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

.message-source {
    color: #007cba;
    font-size: 13px;
    font-weight: 500;
    margin-top: 5px;
}

/* Scrollbar styling for webkit browsers */
#message-container::-webkit-scrollbar {
    width: 8px;
}

#message-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#message-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#message-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 768px) {
    .bot-messages-wrapper {
        margin: 10px 0;
    }

    #message-container {
        padding: 10px;
        max-height: 400px;
    }

    .message-box {
        padding: 10px;
    }

    .sort-button {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Animation for new messages */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-box.new-message {
    animation: fadeIn 0.3s ease-out;
}

/* Status indicators */
.message-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.message-status.unread {
    background: #28a745;
}

.message-status.read {
    background: #6c757d;
}

.message-status.error {
    background: #dc3545;
}

/* Message type styling */
.message-box.urgent {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

.message-box.info {
    border-left: 4px solid #007cba;
    background: #f0f8ff;
}

.message-box.success {
    border-left: 4px solid #28a745;
    background: #f8fff8;
}

.message-box.warning {
    border-left: 4px solid #ffc107;
    background: #fffdf0;
}