/* Letter Card Styles (Mail Envelope Theme) */
.letter-wrapper {
    display: flex;
    gap: 16px;
    width: 100%;
    margin-top: 20px;
    padding: 20px 20px 40px;
    /* Matching previous spacing */
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Avatar (Matches Bubble Style) */
.letter-avatar-container {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    /* Removed yellow background and box-shadow */
}

.letter-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Main Card */
.letter-card {
    flex: 1;
    max-width: 450px;
    /* Air Mail Border Effect */
    background:
        linear-gradient(#fff, #fff) padding-box,
        repeating-linear-gradient(45deg,
            #ef4444 0, #ef4444 12px,
            #ffffff 12px, #ffffff 24px,
            #3b82f6 24px, #3b82f6 36px,
            #ffffff 36px, #ffffff 48px) border-box;
    border: 4px solid transparent;
    /* Width of the border */
    border-radius: 12px;

    /* Inner spacing */
    padding: 24px 32px;

    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.letter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

/* Content Area */
.letter-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.letter-content {
    flex: 1;
}

.letter-title {
    font-size: 1.125rem;
    /* 18px */
    font-weight: 600;
    color: #111;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.letter-preview {
    font-size: 0.9375rem;
    /* 15px */
    color: #52525B;
    /* Zinc-600 */
    line-height: 1.6;
    margin: 0;
}

/* Stamp Style */
.letter-stamp {
    flex-shrink: 0;
    width: 80px;
    height: 100px;
}

.letter-stamp img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Footer info */
.letter-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    /* 12px */
    color: #71717A;
    /* Zinc-500 */
    font-weight: 500;
}

.letter-footer-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 480px) {
    .letter-wrapper {
        padding: 0 10px 30px;
        gap: 10px;
    }

    .letter-avatar-container {
        width: 36px;
        height: 36px;
    }

    .letter-card {
        padding: 16px 20px;
    }

    .letter-stamp {
        width: 60px;
        height: 75px;
    }
}