.np-rich-editor {
    overflow: hidden;
    border: 1px solid #d7e3f1;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31,65,112,.05);
}

.np-rich-editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px;
    border-bottom: 1px solid #e1e9f3;
    background: #f7faff;
}

.np-rich-editor-toolbar button {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid #d4e0ef;
    border-radius: 9px;
    background: #fff;
    color: #405875;
    font: inherit;
    font-size: .76rem;
    cursor: pointer;
    transition:
        transform .15s ease,
        color .15s ease,
        background-color .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

.np-rich-editor-toolbar button:hover {
    transform: translateY(-1px);
    color: #1d4ed8;
    border-color: #aac5e8;
    background: #eef5ff;
    box-shadow: 0 6px 14px rgba(37,99,235,.08);
}

.np-rich-editor-toolbar button:active {
    transform: scale(.97);
}

.np-rich-editor-status {
    min-height: 0;
    padding: 0 14px;
    color: #53708f;
    font-size: .72rem;
    background: #f9fbff;
}

.np-rich-editor-status:not(:empty) {
    padding-top: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8eef6;
}

.np-rich-editor-status.is-error {
    color: #b42318;
    background: #fff4f3;
}

.np-rich-editor-status.is-success {
    color: #067647;
    background: #ecfdf3;
}

.np-rich-editor-surface {
    min-height: 340px;
    padding: 22px;
    outline: none;
    color: #273e5a;
    font-size: .94rem;
    line-height: 2;
}

.np-rich-editor-surface:focus {
    box-shadow: inset 0 0 0 2px rgba(37,99,235,.10);
}

.np-rich-editor-surface:empty::before {
    content: "متن صفحه را اینجا بنویسید…";
    color: #a0aec0;
    pointer-events: none;
}

.np-rich-editor-surface h2 {
    margin: 1.4em 0 .6em;
    color: #10213a;
    font-size: 1.5rem;
}

.np-rich-editor-surface h3 {
    margin: 1.25em 0 .5em;
    color: #17345a;
    font-size: 1.18rem;
}

.np-rich-editor-surface blockquote {
    margin: 18px 0;
    padding: 15px 17px;
    border-right: 4px solid #2563eb;
    border-radius: 10px;
    background: #edf4ff;
}

.np-rich-editor-surface img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 18px auto;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(31,65,112,.08);
}

.np-rich-editor-surface .np-aparat-embed {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 20px 0;
    padding-top: 56.25%;
    border-radius: 16px;
    background: #0f2748;
}

.np-rich-editor-surface .np-aparat-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.np-rich-editor-source {
    display: none;
    min-height: 340px;
    border: 0 !important;
    border-radius: 0 !important;
    font-family: Consolas, monospace;
    direction: ltr;
    text-align: left;
}

.np-rich-editor.is-source .np-rich-editor-surface {
    display: none;
}

.np-rich-editor.is-source .np-rich-editor-source {
    display: block;
}

@media (max-width: 700px) {
    .np-rich-editor-toolbar {
        gap: 5px;
    }

    .np-rich-editor-toolbar button {
        min-height: 34px;
        padding-inline: 8px;
        font-size: .7rem;
    }

    .np-rich-editor-surface {
        min-height: 280px;
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .np-rich-editor-toolbar button {
        transition: none !important;
    }
}
.np-rich-editor-toolbar select,.np-rich-editor-toolbar input[type=color]{min-height:36px;border:1px solid #d4e0ef;border-radius:9px;background:#fff;color:#405875;padding:0 8px;font:inherit;font-size:.76rem}.np-rich-editor-toolbar input[type=color]{width:42px;padding:3px}.np-rich-editor-surface img.is-selected{outline:3px solid #14b8a6;outline-offset:3px}.np-rich-content img{max-width:100%;height:auto}.np-rich-content .np-aparat-embed{position:relative;width:100%;padding-top:56.25%;border-radius:16px;overflow:hidden;background:#111}.np-rich-content .np-aparat-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
