﻿
.mail-list-wrapper {
    max-width: 600px;
    margin: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.mail-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mail-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    position: relative;
}

    .mail-item:last-child {
        border-bottom: none;
    }

/* Skeleton loader */
.skeleton {
    background: #eee;
    border-radius: 4px;
    height: 16px;
    width: 80%;
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
}

    .skeleton::after {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        height: 100%;
        width: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
        animation: loading 1.2s infinite;
    }

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.mail-top-row {
    font-weight: bold;
    margin-bottom: 4px;
}

.mail-bottom-row {
    font-size: 13px;
    color: #555;
}

#loadEmailsBtn {
    margin: 20px auto;
    display: block;
    padding: 10px 20px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

    #loadEmailsBtn:hover {
        background: #0056b3;
    }

.skeleton {
    background: #eee;
    border-radius: 4px;
    height: 16px;
    width: 80%;
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
}

    .skeleton::after {
        content: "";
        position: absolute;
        top: 0;
        left: -100%;
        height: 100%;
        width: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
        animation: loading 1.2s infinite;
    }

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attachment-item {
    background: #f1f3f4;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .attachment-item i {
        color: #666;
    }

.attachment-remove {
    cursor: pointer;
    color: red;
    font-weight: bold;
}

.email-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 4px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.email-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    margin: 3px;
    border-radius: 16px;
    font-size: 13px;
}

    .email-chip.valid {
        background: #e8f0fe;
        border: 1px solid #1a73e8;
    }

    .email-chip.invalid {
        background: #fdecea;
        border: 1px solid #d93025;
    }

.email-remove {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
}

    .email-remove:hover {
        color: red;
    }


.email-chip {
    background: #e9f2ff;
    border: 1px solid #0d6efd;
    border-radius: 12px;
    padding: 2px 8px;
    margin: 2px;
    font-size: 13px;
}

.email-input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 150px;
}

.email-chip.valid {
    background: #e9f2ff;
    border: 1px solid #0d6efd;
    color: #0d6efd;
}

.email-chip.invalid {
    background: #ffe9e9;
    border: 1px solid #dc3545;
    color: #dc3545;
}

.mail-compose a {
    color: #fff !important;
}

/*     .mail-compose a:hover {
        color: #fff!important;
    } */
.e-title {
    font-size: 16px;
}

#dBody {
    overflow: auto;
}
/* ایمیل نخوانده */
.mail-list li.unread {
    background-color: #f3f6fb;
    font-weight: 600;
}

    .mail-list li.unread .mail-bottom-row p {
        font-weight: 600;
        color: #000;
    }

    /* نقطه آبی کنار ایمیل نخوانده */
    .mail-list li.unread::before {
        content: '';
        width: 8px;
        height: 8px;
        background: #3b82f6;
        border-radius: 50%;
        position: absolute;
        left: 8px;
        top: 22px;
    }

/* ایمیل خوانده */
.mail-list li.read {
    background-color: #fff;
    font-weight: normal;
}

    .mail-list li.read .mail-bottom-row p {
        font-weight: normal;
        color: #555;
    }

.detail-header {
    padding: 10px 5px;
    margin-bottom: 10px;
}

    .detail-header .media-body p {
        font-size: 14px;
        line-height: 1.5;
    }

.mail-inbox {
    display: flex;
    width: 100%;
}

.mail-right ul {
    overflow: auto;
}

.mail-left {
    width: 250px;
    border-right: 1px solid #e1e1e1;
   /* background: #fafafa;*/
}

.mail-right {
    flex: 1;
    padding: 20px;
 /*   background-color: #fff;*/
    min-height: 500px;
}

/* ---- MAIL LIST ITEMS ---- */
.mail-list ul {
    padding: 0;
    margin: 0;
}

.mail-list li {
    padding: 14px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    transition: background .2s ease;
    position: relative;
}

    .mail-list li:hover {
        background: #f5f7fb;
    }

.mail-detail-left {
    width: 40px;
    text-align: center;
    padding-top: 5px;
}

.mail-detail-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mail-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .mail-top-row h6 {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
    }

    .mail-top-row .time {
        font-size: 13px;
        color: #888;
        white-space: nowrap;
        margin-left: 15px;
    }

.mail-bottom-row {
    margin-top: 3px;
}

    .mail-bottom-row p {
        margin: 0;
        color: #555;
        font-size: 14px;
    }

.hover-action {
    display: none;
    position: absolute;
    right: 15px;
    top: 14px;
}

.mail-list li:hover .hover-action {
    display: inline-flex;
    gap: 5px;
}

/* badge style */
.badge {
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 11px;
    margin-left: 6px;
}


