/* Basic styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar styling */
.sidebar {
    min-height: 100vh;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sidebar .nav-link.active {
    color: #2470dc;
    background-color: rgba(36, 112, 220, 0.1);
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Email list styling */
.email-list-item {
    transition: all 0.2s ease;
}

.email-list-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.email-list-item.unread {
    font-weight: bold;
}

/* Conversation styling */
.conversation-thread {
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 1.5rem;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.message.sender .message-bubble {
    background-color: #f0f0f0;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

.message.me .message-bubble {
    background-color: #2470dc;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

/* Tag styling */
.email-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Avatars */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2470dc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.avatar.sm {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* Email view styles */
.email-view-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.email-view-body {
    padding: 1rem;
    background-color: white;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 300px;
}

/* Email thread styles */
.email-thread-item {
    padding: 1rem;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #dee2e6;
}

.email-thread-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.email-thread-item.active {
    border-left-color: #2470dc;
    background-color: rgba(36, 112, 220, 0.05);
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 100;
        padding: 0;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
        transition: all 0.3s ease-in-out;
    }

    .sidebar.collapse:not(.show) {
        margin-left: -100%;
    }
}

/* Email content isolation */
.email-content-isolated {
    all: revert;
}

.email-content-isolated * {
    max-width: 100%;
    font-family: inherit;
}

.email-content-isolated a {
    color: #0d6efd;
    text-decoration: underline;
}

.email-content-isolated img {
    max-width: 100%;
    height: auto;
}

.email-content-isolated table {
    max-width: 100%;
    border-collapse: collapse;
}

/* Remote content toggle button */
.remote-content-toggle {
    margin: 10px 0;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remote-content-toggle button {
    padding: 5px 10px;
    font-size: 14px;
} 