/* =====================================================================
   Webmail Main CSS - Polished Gmail Interaction Styles
   ===================================================================== */

:root {
    --bg-main: #f9fafb;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
}

.dark {
    --bg-main: #111827;
    --bg-card: #1f2937;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: #374151;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.8);
}

/* Message List Items */
.message-row {
    transition: background-color 0.12s ease;
}
.message-row:hover {
    box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    z-index: 2;
}
.message-row.unread {
    background-color: #ffffff;
    font-weight: 600;
}
.message-row.unread .sender-text,
.message-row.unread .subject-text {
    font-weight: 700;
    color: #111827;
}
.message-row.read {
    background-color: #f8fafc;
}

/* Starred state */
.star-btn.starred {
    color: #f59e0b !important;
}
.star-btn:hover {
    transform: scale(1.15);
}

/* Sidebar Active Folder */
.folder-nav-btn.active {
    background-color: #dbeafe !important;
    color: #1d4ed8 !important;
    font-weight: 600;
}
.folder-nav-btn.active i {
    color: #1d4ed8 !important;
}

/* Blocked Remote Images */
.blocked-remote-img {
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    min-width: 24px;
    min-height: 24px;
    display: inline-block;
}

/* Email Viewer Body Styling Isolation */
.email-content-wrapper {
    line-height: 1.6;
    color: #1f2937;
    font-size: 14px;
    word-break: break-word;
}
.email-content-wrapper img {
    max-width: 100%;
    height: auto;
}
.email-content-wrapper a {
    color: #2563eb;
    text-decoration: underline;
}
.email-content-wrapper blockquote {
    margin: 12px 0;
    padding-left: 12px;
    border-left: 2px solid #cbd5e1;
    color: #64748b;
}

/* Toast Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.toast-item {
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
