#nexa-template-button {
    color: #ffffff;
    background: #b8a48d;
}

/* ===== MODAL OVERLAY ===== */
.nexa-template-library-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 999999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== MAIN WRAPPER ===== */
.nexa-template-library-wrapper {
    width: 90%;
    height: 90%;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: nexaFade .3s ease;
}

/* TITLE */
.nexa-template-library-wrapper h2 {
    margin: 0 0 10px;
}

/* CLOSE BUTTON */
#nexa-template-library-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    color: #000;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 30px;
    font-weight: 500;
}

/* ===== toolbar ===== */
.nexa-library-toolbar {
    display: flex;
    justify-content: space-between;
}

#nexa-template-library-category {
    position: relative;
    width: 200px;
    border-radius: 5px;
    padding: 6px;
    height: 36px;
    margin-bottom: 15px;
}

/* SEARCH */
#nexa-template-library-search {
    position: relative;
    width: 200px;
    padding: 0 8px;
    line-height: 36px;
    height: 36px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    outline: none;
}


/* ===== BODY ===== */
.nexa-template-library-body {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ===== CONTENT ===== */
.nexa-template-library-content {
    width: 100%;
    overflow-y: auto;
}

/* GRID */
#nexa-template-library-grid {
    column-count: 4;
    column-gap: 20px;
}

@media (max-width: 1024px) {
    #nexa-template-library-grid {
        column-count: 4;
    }
}

@media (max-width: 767px) {
    #nexa-template-library-grid {
        column-count: 1;
    }
}

/* CARD */
.nexa-template-library-card {
    width: 90%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
    break-inside: avoid;
    text-align: center;
    transition: 0.2s;
}

.nexa-template-library-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* IMAGE */
.nexa-template-library-card img {
    width: 100%;
    display: block;
    border-radius: 5px;
}
/* TITLE */
.nexa-template-library-card h4 {
    margin: 8px 0;
    font-size: 14px;
}

/* BUTTON */
.nexa-template-library-card button {
    width: 48%;
    padding: 4px 8px;
    margin-top: 5px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    height: 30px;
}

/* PREVIEW */
.nexa-template-library-preview {
    background: #0984e3;
    color: #fff;
}

/* INSERT */
.nexa-insert {
    background: #00b894;
    color: #fff;
}

/* ===== ANIMATION ===== */
@keyframes nexaFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .nexa-template-library-card {
        width: 48%;
    }
}

@media (max-width: 600px) {
    .nexa-template-library-body {
        flex-direction: column;
    }

    .nexa-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .nexa-template-library-content {
        width: 100%;
    }

    .nexa-template-library-card {
        width: 100%;
    }
}


/* =========================
   PREVIEW MODAL
========================= */

#nexa-template-library-preview {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 999999999;
    display: none;
}

/* MAIN WRAPPER */
.nexa-template-library-preview-wrap {
    display: flex;
    width: 100%;
    height: 100%;
}

/* IFRAME */
#nexa-template-library-frame {
    width: 80%;
    height: 100%;
    border: none;
    background: #fff;
}

/* SIDEBAR */
.nexa-template-library-preview-sidebar {
    width: 20%;
    background: #111;
    color: #fff;
    padding: 20px;
    box-sizing: border-box;
}

/* BUTTONS */
.nexa-template-library-btn {
    width: 100%;
    padding: 10px;
    border: none;
    cursor: pointer;
    margin-bottom: 10px;
    border-radius: 5px;
}

.nexa-template-library-insert-btn {
    background: #00b894;
    color: #fff;
}

.nexa-template-library-close-btn {
    background: red;
    color: #fff;
}





/* ================================
   MAIN BUTTON
================================ */
.nexa-template-library-save {
    -webkit-tap-highlight-color: transparent;
    background-color: transparent;
    outline: 0px;
    border: 0px;
    margin: 0px;
    border-radius: 0px;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    appearance: none;
    color: inherit;
    font-family: Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.43;
    letter-spacing: 0.01071em;
    display: flex;
    -webkit-box-pack: start;
    justify-content: flex-start;
    -webkit-box-align: center;
    align-items: center;
    position: relative;
    text-decoration: none;
    min-height: 32px;
    padding: 4px 16px;
    box-sizing: border-box;
    white-space: nowrap;
}

.nexa-template-library-save .MuiListItemIcon-root:not(:last-child) {
    margin-right: 8px;
}


/* ================================
   MODAL OVERLAY
================================ */
.nexa-template-library-save-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none; /* JS দিয়ে flex করবা */
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
}


/* ================================
   MODAL BOX
================================ */
.nexa-template-library-save-modal-box {
    width: 600px;
    max-width: 95%;
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 22px;
    margin: 0 auto;
    margin-top: 8%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: nexaFadeIn 0.25s ease;
}


/* ================================
   TITLE
================================ */
.nexa-template-library-save-modal-box h3 {
    margin-bottom: 18px;
    font-size: 30px;
    font-weight: 600;
    color: #111;
}


/* ================================
   LABEL
================================ */
.nexa-template-library-save-modal-box label {
    display: block;
    margin-top: 12px;
    margin-bottom: 5px;
    font-size: 13px;
    color: #555;
}


/* ================================
   INPUT & SELECT
================================ */
.nexa-template-library-save-modal-box input,
.nexa-template-library-save-modal-box select {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.2s;
    height: 40px;
}

.nexa-template-library-save-modal-box input:focus,
.nexa-template-library-save-modal-box select:focus {
    border-color: #5b7cff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(91,124,255,0.15);
}


/* ================================
   FILE INPUT
================================ */
#nexa-image-url {
    padding: 6px;
    background: #fafafa;
    cursor: pointer;
}


/* ================================
   BUTTONS
================================ */
#nexa-template-library-save-btn {
    width: 100%;
    margin-top: 18px;
    padding: 11px;
    background: #454545;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

#nexa-template-library-save-btn:hover {
    background: #4a68e0;
}


#nexa-template-library-save-close-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #eee;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

#nexa-template-library-save-close-btn:hover {
    background: #ddd;
}


/* ================================
   LOADING STATE
================================ */
#nexa-template-library-save-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}


/* ================================
   ANIMATION
================================ */
@keyframes nexaFadeIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}





