﻿.pe-root {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.pe-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

/* icon toolbar buttons */
.pe-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
}

    .pe-btn svg {
        width: 18px;
        height: 18px;
        display: block;
        pointer-events: none; /* فقط svg کلیک نگیرد */
    }

    .pe-btn:hover {
        background: #f4f6f8;
    }

    .pe-btn.active {
        border-color: #6366f1;
        background: #eef2ff;
        color: #4338ca;
    }

.pe-select {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 10px;
}

.pe-editable {
    min-height: 260px;
    padding: 14px;
    outline: none;
    line-height: 1.8;
}

    .pe-editable img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }

.pe-source {
    width: 100%;
    min-height: 260px;
    padding: 14px;
    border: none;
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.5;
}

/* ✅ Upload overlay (TinyMCE-like) */
.pe-upload {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(2px);
    z-index: 20;
}

.pe-upload-box {
    width: min(360px, 92%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.pe-upload-text {
    font-size: 14px;
    margin-bottom: 10px;
}

.pe-upload-bar {
    height: 10px;
    background: #eee;
    border-radius: 999px;
    overflow: hidden;
}

.pe-upload-bar-fill {
    height: 100%;
    background: #6366f1;
    width: 0%;
    transition: width .12s linear;
}
