.all-email-template-wrapper {

}

.all-email-template-wrapper .page-title{
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    padding: 32px 0;
    color: black;
}

.all-email-template-wrapper .page-templates-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
}

.all-email-template-wrapper .template-item-wrap {
    position: relative;
    border: 1px solid #a5bbc5;
    border-radius: 8px;
    padding: 16px;
}

.all-email-template-wrapper .template-item-wrap:hover {
    border: 1px solid #0073aa;

    .overlay {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

.all-email-template-wrapper .overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    background: rgba(0, 115, 170, 0.27);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;

    /* animation */
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.all-email-template-wrapper .btn-preview-template {
    cursor: pointer;
    background: #0073aa;
    border-radius: 100px;
    color: #FFF;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 24px;
    transform: translateY(10px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.all-email-template-wrapper .template-item-wrap:hover .btn-preview-template {
    transform: translateY(0);
}

.all-email-template-wrapper .btn-preview-template:hover {
    background: #005f8d;
}

.all-email-template-wrapper .template-item-wrap .thumbnail {
    width: 100%;
    height: 235px;
    object-fit: cover;
}

.all-email-template-wrapper .template-item-wrap .title {
    margin-top: 16px;
    color: black;
}

/* Preview modal */
#previewTemplateModal {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.template-modal-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.template-modal-title {
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    padding: 16px;
    color: black;
}

.btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
}

.template-modal-content {
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    width: 600px;
    height: fit-content;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.template-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    cursor: pointer;
    font-size: 20px;
}

#previewTemplateModal .btn-create-mail {
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    z-index: 1;
    border-radius: 2em;
    padding-right: 2.5rem;
    line-height: 2rem;
    text-decoration: none;
    transition: color .15s ease-in-out, transform .3s;
    display: inline-block;
    position: relative;
    transform: translate(0);
    color: black;
}

#previewTemplateModal .btn-create-mail:before {
    content: "";
    z-index: -1;
    background-color: #32b0ec;
    background-image: url(../images/right.svg);
    background-position: calc(100% - .4375rem) calc(100% - .4375rem);
    background-repeat: no-repeat;
    background-size: 1.125rem;
    border-radius: 1rem;
    height: 2rem;
    transition: left .3s cubic-bezier(.34, 1.2, .64, 1), right .3s, background-position .3s;
    display: block;
    position: absolute;
    bottom: 0;
    left: calc(100% - 2rem);
    right: 0;
}

.preview-wrap {
    margin-top: 16px;
    overflow-y: auto;
    width: 100%;
    height: 470px;
}