botui/ui/suite/mail/mail.css
Rodrigo Rodriguez (Pragmatismo) b8f1053575 feat(mail): add email tracking UI to Suite mail app
- Add Tracking folder to sidebar with 📊 icon
- Display tracking stats panel (sent, opened, rate, avg time)
- Show read status indicators (✓✓ green=read, gray=sent)
- Add read count badges for multiple opens
- Implement tracking item details view
- Add CSS for read indicators, stats panel, tooltips
2025-12-04 18:15:31 -03:00

533 lines
9.3 KiB
CSS

/* Mail Layout */
.mail-layout {
display: grid;
grid-template-columns: 250px 350px 1fr;
gap: 1rem;
padding: 1rem;
height: 100%;
width: 100%;
background: #ffffff;
color: #202124;
}
[data-theme="dark"] .mail-layout {
background: #1a1a1a;
color: #e8eaed;
}
.mail-sidebar,
.mail-list,
.mail-content {
background: #f8f9fa;
border: 1px solid #e0e0e0;
border-radius: 12px;
overflow: hidden;
}
[data-theme="dark"] .mail-sidebar,
[data-theme="dark"] .mail-list,
[data-theme="dark"] .mail-content {
background: #202124;
border-color: #3c4043;
}
.mail-sidebar {
overflow-y: auto;
}
.mail-list {
display: flex;
flex-direction: column;
overflow-y: auto;
}
.mail-content {
overflow-y: auto;
}
/* Folder Navigation */
.nav-item {
padding: 0.75rem 1rem;
display: flex;
align-items: center;
gap: 0.75rem;
cursor: pointer;
border-radius: 0.5rem;
margin: 0.25rem 0.5rem;
transition: all 0.2s;
color: #5f6368;
}
[data-theme="dark"] .nav-item {
color: #9aa0a6;
}
.nav-item:hover {
background: rgba(26, 115, 232, 0.08);
color: #1a73e8;
}
[data-theme="dark"] .nav-item:hover {
background: rgba(138, 180, 248, 0.08);
color: #8ab4f8;
}
.nav-item.active {
background: #e8f0fe;
color: #1a73e8;
font-weight: 500;
}
[data-theme="dark"] .nav-item.active {
background: #1e3a5f;
color: #8ab4f8;
}
.nav-item .count {
margin-left: auto;
background: #1a73e8;
color: white;
padding: 0.125rem 0.5rem;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 500;
}
[data-theme="dark"] .nav-item .count {
background: #8ab4f8;
color: #202124;
}
/* Mail Items */
.mail-item {
padding: 1rem;
cursor: pointer;
border-bottom: 1px solid #e0e0e0;
transition: all 0.2s;
position: relative;
}
[data-theme="dark"] .mail-item {
border-bottom-color: #3c4043;
}
.mail-item:hover {
background: rgba(26, 115, 232, 0.08);
}
[data-theme="dark"] .mail-item:hover {
background: rgba(138, 180, 248, 0.08);
}
.mail-item.unread {
background: #f8f9fa;
font-weight: 500;
}
[data-theme="dark"] .mail-item.unread {
background: #292a2d;
}
.mail-item.selected {
background: #e8f0fe;
border-left: 3px solid #1a73e8;
}
[data-theme="dark"] .mail-item.selected {
background: #1e3a5f;
border-left-color: #8ab4f8;
}
.mail-item-from {
font-size: 0.875rem;
margin-bottom: 0.25rem;
color: #202124;
}
[data-theme="dark"] .mail-item-from {
color: #e8eaed;
}
.mail-item.unread .mail-item-from {
font-weight: 600;
}
.mail-item-subject {
font-size: 0.875rem;
margin-bottom: 0.25rem;
color: #202124;
}
[data-theme="dark"] .mail-item-subject {
color: #e8eaed;
}
.mail-item-preview {
font-size: 0.75rem;
color: #5f6368;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 0.25rem;
}
[data-theme="dark"] .mail-item-preview {
color: #9aa0a6;
}
.mail-item-time {
font-size: 0.75rem;
color: #5f6368;
}
[data-theme="dark"] .mail-item-time {
color: #9aa0a6;
}
/* Email Read Status Indicator */
.mail-item-status {
display: flex;
align-items: center;
gap: 0.25rem;
font-size: 0.75rem;
margin-top: 0.25rem;
}
.mail-read-indicator {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.125rem 0.5rem;
border-radius: 12px;
font-size: 0.625rem;
font-weight: 500;
text-transform: uppercase;
}
.mail-read-indicator.read {
background: #e6f4ea;
color: #137333;
}
[data-theme="dark"] .mail-read-indicator.read {
background: #1e3a2f;
color: #81c995;
}
.mail-read-indicator.unread {
background: #fce8e6;
color: #c5221f;
}
[data-theme="dark"] .mail-read-indicator.unread {
background: #3c2020;
color: #f28b82;
}
.mail-read-indicator.pending {
background: #fef7e0;
color: #b06000;
}
[data-theme="dark"] .mail-read-indicator.pending {
background: #3c3020;
color: #fdd663;
}
.mail-read-indicator .icon {
font-size: 0.75rem;
}
/* Read count badge */
.mail-read-count {
font-size: 0.625rem;
color: #5f6368;
margin-left: 0.25rem;
}
[data-theme="dark"] .mail-read-count {
color: #9aa0a6;
}
/* Sent folder specific styling */
.mail-item.sent .mail-item-status {
justify-content: flex-start;
}
/* Tracking stats panel */
.tracking-stats {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1rem;
padding: 1rem;
background: #f8f9fa;
border-radius: 8px;
margin-bottom: 1rem;
}
[data-theme="dark"] .tracking-stats {
background: #292a2d;
}
.tracking-stat {
text-align: center;
padding: 0.75rem;
}
.tracking-stat-value {
font-size: 1.5rem;
font-weight: 600;
color: #1a73e8;
}
[data-theme="dark"] .tracking-stat-value {
color: #8ab4f8;
}
.tracking-stat-label {
font-size: 0.75rem;
color: #5f6368;
margin-top: 0.25rem;
}
[data-theme="dark"] .tracking-stat-label {
color: #9aa0a6;
}
/* Read status tooltip */
.mail-item[data-read-at]:hover::after {
content: attr(data-read-at);
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
padding: 0.5rem 0.75rem;
background: #202124;
color: white;
font-size: 0.75rem;
border-radius: 4px;
white-space: nowrap;
z-index: 100;
pointer-events: none;
}
[data-theme="dark"] .mail-item[data-read-at]:hover::after {
background: #e8eaed;
color: #202124;
}
/* Double check mark icon for read emails */
.checkmark-double {
position: relative;
display: inline-block;
width: 1rem;
height: 0.75rem;
}
.checkmark-double::before,
.checkmark-double::after {
content: "✓";
position: absolute;
font-size: 0.75rem;
line-height: 1;
}
.checkmark-double::before {
left: 0;
}
.checkmark-double::after {
left: 0.25rem;
}
.checkmark-double.read::before,
.checkmark-double.read::after {
color: #137333;
}
[data-theme="dark"] .checkmark-double.read::before,
[data-theme="dark"] .checkmark-double.read::after {
color: #81c995;
}
.checkmark-double.sent::before,
.checkmark-double.sent::after {
color: #5f6368;
}
[data-theme="dark"] .checkmark-double.sent::before,
[data-theme="dark"] .checkmark-double.sent::after {
color: #9aa0a6;
}
/* Mail Content View */
.mail-content-view {
padding: 2rem;
}
.mail-content-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: #5f6368;
text-align: center;
}
[data-theme="dark"] .mail-content-empty {
color: #9aa0a6;
}
.mail-content-empty .icon {
font-size: 4rem;
margin-bottom: 1rem;
}
/* Mail Header */
.mail-header {
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid #e0e0e0;
}
[data-theme="dark"] .mail-header {
border-bottom-color: #3c4043;
}
.mail-subject {
font-size: 1.5rem;
font-weight: 500;
margin-bottom: 1rem;
color: #202124;
}
[data-theme="dark"] .mail-subject {
color: #e8eaed;
}
.mail-meta {
display: flex;
align-items: center;
gap: 1rem;
font-size: 0.875rem;
color: #5f6368;
}
[data-theme="dark"] .mail-meta {
color: #9aa0a6;
}
.mail-from {
font-weight: 500;
color: #202124;
}
[data-theme="dark"] .mail-from {
color: #e8eaed;
}
.mail-to {
font-size: 0.75rem;
}
.mail-date {
margin-left: auto;
}
/* Mail Body */
.mail-body {
line-height: 1.7;
color: #202124;
}
[data-theme="dark"] .mail-body {
color: #e8eaed;
}
.mail-body p {
margin-bottom: 1rem;
}
.mail-body p:last-child {
margin-bottom: 0;
}
/* Headers */
h2,
h3 {
margin: 0;
padding: 0;
font-weight: 500;
}
/* Scrollbar Styles */
.mail-sidebar::-webkit-scrollbar,
.mail-list::-webkit-scrollbar,
.mail-content::-webkit-scrollbar {
width: 8px;
}
.mail-sidebar::-webkit-scrollbar-track,
.mail-list::-webkit-scrollbar-track,
.mail-content::-webkit-scrollbar-track {
background: transparent;
}
.mail-sidebar::-webkit-scrollbar-thumb,
.mail-list::-webkit-scrollbar-thumb,
.mail-content::-webkit-scrollbar-thumb {
background: rgba(128, 128, 128, 0.3);
border-radius: 4px;
}
.mail-sidebar::-webkit-scrollbar-thumb:hover,
.mail-list::-webkit-scrollbar-thumb:hover,
.mail-content::-webkit-scrollbar-thumb:hover {
background: rgba(128, 128, 128, 0.5);
}
[data-theme="dark"] .mail-sidebar::-webkit-scrollbar-thumb,
[data-theme="dark"] .mail-list::-webkit-scrollbar-thumb,
[data-theme="dark"] .mail-content::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
}
[data-theme="dark"] .mail-sidebar::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .mail-list::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] .mail-content::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}
/* Alpine.js cloak */
[x-cloak] {
display: none !important;
}
/* Responsive */
@media (max-width: 1024px) {
.mail-layout {
grid-template-columns: 200px 300px 1fr;
gap: 0.5rem;
padding: 0.5rem;
}
}
@media (max-width: 768px) {
.mail-layout {
grid-template-columns: 1fr;
grid-template-rows: auto 1fr;
}
.mail-sidebar {
max-height: 200px;
}
.mail-content {
display: none;
}
.mail-item.selected + .mail-content {
display: block;
}
}