#nexa-template-button {
    color: #ffffff;
    background: #b8a48d;
}

/* ===== MODAL OVERLAY ===== */
.nexa-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-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-wrapper h2 {
    margin: 0 0 10px;
}

/* CLOSE BUTTON */
#nexa-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: 600;
}

/* ===== toolbar ===== */
.nexa-library-toolbar {
    display: flex;
    justify-content: space-between;
}

#nexa-category {
    position: relative;
    width: 200px;
    border-radius: 5px;
    padding: 6px;
    height: 36px;
    margin-bottom: 15px;
}

/* SEARCH */
#nexa-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-body {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ===== CONTENT ===== */
.nexa-content {
    width: 100%;
    overflow-y: auto;
}

/* GRID */
#nexa-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.nexa-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* CARD */
.nexa-card {
    width: 90%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: 0.2s;
}

.nexa-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* IMAGE */
.nexa-card img {
    width: 100%;
    border-radius: 5px;
}

/* TITLE */
.nexa-card h4 {
    margin: 8px 0;
    font-size: 14px;
}

/* BUTTON */
.nexa-card button {
    width: 48%;
    padding: 4px 8px;
    margin-top: 5px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
}

/* PREVIEW */
.nexa-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-card {
        width: 48%;
    }
}

@media (max-width: 600px) {
    .nexa-body {
        flex-direction: column;
    }

    .nexa-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .nexa-content {
        width: 100%;
    }

    .nexa-card {
        width: 100%;
    }
}





/* =========================
   PREVIEW MODAL
========================= */

#nexa-preview {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 999999999;
    display: none;
}

/* MAIN WRAPPER */
.nexa-preview-wrap {
    display: flex;
    width: 100%;
    height: 100%;
}

/* IFRAME */
#nexa-frame {
    width: 80%;
    height: 100%;
    border: none;
    background: #fff;
}

/* SIDEBAR */
.nexa-preview-sidebar {
    width: 20%;
    background: #111;
    color: #fff;
    padding: 20px;
    box-sizing: border-box;
}

/* BUTTONS */
.nexa-btn {
    width: 100%;
    padding: 10px;
    border: none;
    cursor: pointer;
    margin-bottom: 10px;
    border-radius: 5px;
}

.nexa-insert-btn {
    background: #00b894;
    color: #fff;
}

.nexa-close-btn {
    background: red;
    color: #fff;
}

