/**
 * Mail Module Styles
 * 
 * @license MIT
 * @copyright (c) 2025 Universal AI Cloud Development Team
 * @version 1.0.0
 * 
 * Version History:
 * - 1.0.0 (2025-12-02): Initial extraction from dashboard.css
 *   - Email table and list styles
 *   - Email viewer and meta section
 *   - Score display components
 *   - Mobile email list
 *   - Email action buttons and reaction area
 */

/* Email Table Styles */
.table-cell-from {
    font-weight: 500;
}

.email-row-group {
    border-bottom: 1px solid #e0e0e0;
}

.email-row-group:last-child {
    border-bottom: none;
}

.email-row-group:hover tr {
    background-color: #f8f9fa;
}

.table-row-main {
    border-bottom: none;
}

.table-row-subject {
    border-bottom: none;
}

.table-cell-subject {
    font-weight: 500;
    padding-top: 0 !important;
    padding-bottom: 15px !important;
    color: #555;
    font-size: 0.9rem;
}

.table-cell-date {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.table-cell-score {
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

.table-cell-actions {
    display: flex;
    gap: 8px;
}

/* Email Meta Section */
.email-meta-section {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin: 20px 0;
}

.email-body-section {
    margin-top: 30px;
}

.email-body-section h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.email-body-content {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
    line-height: 1.6;
}

.email-body-content p {
    margin-bottom: 15px;
}

.email-body-content p:last-child {
    margin-bottom: 0;
}

/* Email Modal Badges */
.person-badge {
    display: inline-block;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
    font-size: 0.85rem;
}

.label-badge {
    display: inline-block;
    background: #f3e5f5;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
    font-size: 0.85rem;
}

/* Score Display */
.score-display {
    display: flex;
    gap: 20px;
    border-radius: 6px;
}

.score-item-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.score-value {
    font-weight: 700;
    color: #667eea;
    font-size: 1rem;
}

/* Email Action Status */
.email-action-status {
    color: #999;
    font-style: italic;
}

.email-action-processing {
    color: #666;
    font-style: italic;
}

/* Mobile Email List Styles */
.mobile-email-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.mobile-email-card {
    display: flex;
    flex-direction: column;
}

.mobile-email-content {
    cursor: pointer;
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.mobile-email-content:last-child {
    border-bottom: none;
}

.mobile-email-content:hover,
.mobile-email-content:active {
    background-color: #f8f9fa;
}

.mobile-email-sender {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    margin: 0 0 8px 0;
    padding: 0;
    line-height: 1.4;
}

.mobile-email-subject {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
    margin: 0 0 8px 0;
    padding: 0;
    line-height: 1.4;
}

.mobile-email-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.mobile-email-date {
    color: #7f8c8d;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-left: 8px;
    padding: 0;
}

.mobile-email-score {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.mobile-email-actions {}

/* Clickable email rows */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Floating Toolbar Spacer */
.floating-toolbar-spacer {
    height: 80px;
}

/* Floating Toolbar */
.floating-toolbar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.floating-toolbar:empty {
    display: none;
}

/* Toolbar button animations */
.toolbar-btn, .toolbar-text {
    animation: toolbar-item-in 0.2s ease-out;
}

.toolbar-btn.removing, .toolbar-text.removing {
    animation: toolbar-item-out 0.2s ease-in forwards;
}

@keyframes toolbar-item-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes toolbar-item-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.toolbar-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    user-select: none;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background-color: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.toolbar-btn:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

.toolbar-btn:active {
    background-color: rgba(0, 0, 0, 0.15);
}

.toolbar-btn img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.toolbar-btn:hover img {
    opacity: 1;
}

.toolbar-btn.loading img {
    animation: spinner-rotate 0.8s linear infinite;
    opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .floating-toolbar {
        bottom: 16px;
        right: 16px;
        gap: 8px;
        padding: 8px 12px;
    }

    .toolbar-text {
        font-size: 12px;
    }

    .toolbar-btn {
        width: 32px;
        height: 32px;
    }

    .toolbar-btn img {
        width: 18px;
        height: 18px;
    }
}