﻿ 
 

.email-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.email-header {
    text-align: center;
    margin-bottom: 30px;
}

    .email-header h1 {
        color : antiquewhite;
        font-size: 2.5rem;
        font-weight: 700;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 10px;
    }

    .email-header p {
        color: #666;
        font-size: 1.1rem;
    }

.email-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.email-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .email-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }

    .email-item[open] {
        transform: none;
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
    }

    .email-item summary {
        padding: 20px;
        cursor: pointer;
        list-style: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 600;
        color: #2d3748;
        position: relative;
        transition: all 0.2s ease;
    }

        .email-item summary::-webkit-details-marker {
            display: none;
        }

        .email-item summary::after {
            content: '';
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s ease;
            flex-shrink: 0;
            position: relative;
        }

        .email-item summary::before {
            content: '';
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            width: 8px;
            height: 8px;
            border-top: 2px solid white;
            border-right: 2px solid white;
            transform: translateY(-50%) rotate(135deg);
            transition: transform 0.3s ease;
        }

    .email-item[open] summary::before {
        transform: translateY(-50%) rotate(-45deg);
    }

.email-subject {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.4;
}

.email-date {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
    margin-left: 15px;
    margin-right: 35px;
}

.email-body {
    padding: 0 20px 20px 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0 20px 0;
}

.email-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.email-meta-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.email-meta-value {
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 500;
}

.email-message-content {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    padding: 16px;
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95rem;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 20px 0;
}

    .pagination button {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(226, 232, 240, 0.6);
        border-radius: 10px;
        padding: 10px 16px;
        color: #4a5568;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        backdrop-filter: blur(10px);
        font-size: 0.9rem;
        min-width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .pagination button:hover:not(:disabled) {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        .pagination button:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            transform: none;
        }

        .pagination button.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

.pagination-info {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 12px 20px;
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(226, 232, 240, 0.6);
    backdrop-filter: blur(10px);
    margin: 0 20px;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-state {
    background: rgba(254, 226, 226, 0.9);
    border: 1px solid rgba(252, 165, 165, 0.5);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #c53030;
    margin: 20px 0;
}

.retry-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 16px;
    transition: transform 0.2s ease;
}

    .retry-button:hover {
        transform: translateY(-1px);
    }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

    .empty-state-icon svg {
        width: 40px;
        height: 40px;
        fill: white;
    }

@media (max-width: 768px) {
    .email-header h1 {
        font-size: 2rem;
    }

    .email-item summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px;
    }

    .email-date {
        margin: 0;
        order: -1;
        font-size: 0.85rem;
    }

    .email-item summary::after,
    .email-item summary::before {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .email-meta {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pagination {
        gap: 4px;
    }

        .pagination button {
            padding: 8px 12px;
            min-width: 40px;
            height: 40px;
            font-size: 0.85rem;
        }

    .pagination-info {
        margin: 10px 0;
        order: -1;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .email-item summary {
        padding: 12px;
    }

    .email-body {
        padding: 0 12px 12px 12px;
    }

    .pagination button {
        padding: 6px 10px;
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
}
