/* MailmAIte Custom Styles - Compatible with Reback Theme */

/* Email specific styles */
.email-item {
    border-bottom: 1px solid #dee2e6;
    padding: 15px;
    transition: background-color 0.2s;
}

.email-item:hover {
    background-color: #f8f9fa;
}

.email-item.unread {
    background-color: #e3f2fd;
    font-weight: bold;
}

.email-subject {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.email-preview {
    color: #6c757d;
    font-size: 0.9rem;
}

.email-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Draft editor */
.draft-editor {
    min-height: 300px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 15px;
}

/* Connection status indicator */
#connection-status {
    transition: all 0.3s ease;
}

#connection-status.connected {
    background-color: #198754 !important;
}

#connection-status.disconnected {
    background-color: #dc3545 !important;
}

#connection-status.connecting {
    background-color: #ffc107 !important;
    color: #000 !important;
}

/* Notification badges */
.inbox-count-badge,
.drafts-count-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Custom button styles for MailmAIte */
.btn-mailmaite {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-mailmaite:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* AI-specific styling */
.ai-feature {
    position: relative;
}

.ai-feature::before {
    content: "🤖";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Priority email styling */
.priority-high {
    border-left: 4px solid #dc3545;
}

.priority-medium {
    border-left: 4px solid #ffc107;
}

.priority-low {
    border-left: 4px solid #198754;
}

/* Sentiment indicators */
.sentiment-positive {
    color: #198754;
}

.sentiment-negative {
    color: #dc3545;
}

.sentiment-neutral {
    color: #6c757d;
}

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Responsive adjustments for Reback theme */
@media (max-width: 768px) {
    .page-content {
        padding: 1rem;
    }
    
    .container-xxl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Custom scrollbar for email lists */
.email-list {
    max-height: 500px;
    overflow-y: auto;
}

.email-list::-webkit-scrollbar {
    width: 6px;
}

.email-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.email-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.email-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for new emails */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.email-item.new-email {
    animation: slideIn 0.3s ease-out;
}

/* Dark mode compatibility */
[data-bs-theme="dark"] .email-item.unread {
    background-color: rgba(13, 110, 253, 0.1);
}

[data-bs-theme="dark"] .email-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}