/**
 * MailCenter Styles
 * Джесс makes it pretty 💅
 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Email Item */
.email-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.email-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.email-item.unread {
    border-left: 4px solid var(--primary-color);
    background-color: #f8f9ff;
    font-weight: 500;
}

.email-item.read {
    opacity: 0.85;
}

.email-domain-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-right: 5px;
}

.email-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.email-from {
    font-weight: 600;
    color: #212529;
}

.email-from-email {
    font-size: 0.85rem;
    color: #6c757d;
    margin-left: 5px;
}

.email-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.email-subject {
    font-size: 1rem;
    color: #212529;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-preview {
    font-size: 0.875rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-badges {
    margin-top: 8px;
}

.email-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-right: 5px;
}

.badge-attachment {
    background-color: #e7f5ff;
    color: #1971c2;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

/* Email Modal */
.email-modal-meta {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.email-modal-meta-item {
    margin-bottom: 8px;
}

.email-modal-meta-label {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
    display: inline-block;
}

.email-modal-body {
    padding: 20px;
    line-height: 1.6;
}

.email-modal-body img {
    max-width: 100%;
    height: auto;
}

/* Sidebar */
.card-header {
    font-weight: 600;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .email-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .email-date {
        margin-top: 5px;
    }

    .email-from-email {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Unread indicator */
.unread-indicator {
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}