:root{
    --ezead-editor-purple:#272343;
    --ezead-editor-blue:#007fae;
    --ezead-editor-orange:#f38521;
    --ezead-editor-line:#d7dfe6;
    --ezead-editor-soft:#f8fbfd;
    --ezead-editor-ink:#2f3342;
    --ezead-editor-muted:#6a7482;
}

.ezead-editor{
    border:1px solid var(--ezead-editor-line);
    border-radius:16px;
    overflow:visible;
    background:#fff;
    box-shadow:0 10px 28px rgba(39,35,67,.045);
}

.ezead-editor__toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:3px;
    align-items:center;
    padding:9px 12px;
    border-bottom:1px solid #e7edf2;
    background:linear-gradient(180deg,#fff 0%,#fbfcfd 100%);
    border-radius:16px 16px 0 0;
}

.ezead-editor__divider{
    width:1px;
    height:28px;
    margin:0 7px;
    background:#e0e7ec;
}

.ezead-editor__btn{
    display:inline-grid;
    width:38px;
    height:38px;
    place-items:center;
    padding:0;
    border:1px solid transparent;
    border-radius:7px;
    background:transparent;
    color:var(--ezead-editor-ink);
    font-size:15px;
    font-weight:800;
    line-height:1;
    cursor:pointer;
    transition:.16s ease;
}

.ezead-editor__btn:hover,
.ezead-editor__btn.is-active{
    background:#fff1e4;
    color:#d96708;
    border-color:#ffd6ae;
}

.ezead-editor__btn svg,
.ezead-editor__quick svg{
    width:20px;
    height:20px;
    fill:none;
    stroke:currentColor;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
    pointer-events:none;
}

.ezead-editor__btn[data-command="format"]{
    width:44px;
    font-size:15px;
}

.ezead-editor__btn[data-command="format"]::after,
.ezead-editor__btn[data-command="align"]::after{
    content:"";
    margin-left:2px;
    border:4px solid transparent;
    border-top-color:currentColor;
    transform:translateY(2px);
}

.ezead-editor__ai{
    display:flex;
    gap:16px;
    align-items:center;
    justify-content:space-between;
    padding:14px 18px;
    border-bottom:1px solid #e7edf2;
    background:linear-gradient(135deg,#f8fbfd 0%,#eef8fc 100%);
    transition:background .2s ease,border-color .2s ease;
}

.ezead-editor__ai.is-success{
    background:linear-gradient(135deg,#f2fbf7 0%,#e7f7ef 100%);
    border-bottom-color:#bfe6d1;
}

.ezead-editor__ai.is-error{
    background:linear-gradient(135deg,#fff8f3 0%,#fff0e7 100%);
    border-bottom-color:#f2c5a4;
}

.ezead-editor__ai-copy{
    display:grid;
    gap:4px;
}

.ezead-editor__ai-copy strong{
    color:var(--ezead-editor-purple);
    font-size:15px;
}

.ezead-editor__ai-copy span{
    color:var(--ezead-editor-muted);
    font-size:13px;
    line-height:1.45;
}

.ezead-editor__ai.is-success .ezead-editor__ai-copy strong{color:#126749}
.ezead-editor__ai.is-success .ezead-editor__ai-copy span{color:#39725a}
.ezead-editor__ai.is-error .ezead-editor__ai-copy strong{color:#9d3f12}
.ezead-editor__ai.is-error .ezead-editor__ai-copy span{color:#8a5338}

.ezead-editor__ai-btn{
    min-height:42px;
    padding:0 18px;
    border:0;
    border-radius:11px;
    background:linear-gradient(135deg,var(--ezead-editor-orange),#ff9a34);
    color:#fff;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 10px 22px rgba(243,133,33,.22);
}

.ezead-editor__ai-btn:disabled{
    opacity:.7;
    cursor:wait;
}

.ezead-editor__body{
    position:relative;
    background:#fff;
}

.ezead-editor__editable,
.ezead-editor__source{
    width:100%;
    padding:20px 22px 28px;
    border:0;
    color:var(--ezead-editor-ink);
    font:inherit;
    line-height:1.72;
}

.ezead-editor__editable{
    min-height:260px;
    outline:none;
}

.ezead-editor__source{
    min-height:260px;
    resize:vertical;
}

.ezead-editor__quick{
    position:absolute;
    top:18px;
    left:-18px;
    z-index:3;
}

.ezead-editor__quick-menu[hidden]{
    display:none!important;
}

.ezead-editor__quick-toggle,
.ezead-editor__quick-menu button{
    display:grid;
    width:34px;
    height:34px;
    place-items:center;
    border:1px solid #dbe5eb;
    border-radius:50%;
    background:#fff;
    color:var(--ezead-editor-ink);
    cursor:pointer;
    box-shadow:0 3px 10px rgba(39,35,67,.12);
    transition:.16s ease;
}

.ezead-editor__quick-toggle{
    color:#fff;
    border-color:var(--ezead-editor-orange);
    background:var(--ezead-editor-orange);
}

.ezead-editor__quick-toggle:hover,
.ezead-editor__quick-toggle.is-open{
    background:#d96e11;
    border-color:#d96e11;
    transform:rotate(45deg);
}

.ezead-editor__quick-menu{
    position:absolute;
    top:-4px;
    left:43px;
    display:flex;
    gap:7px;
    align-items:center;
    min-width:max-content;
    padding:7px;
    border:1px solid #e2e8ec;
    border-radius:22px;
    background:#fff;
    box-shadow:0 10px 26px rgba(39,35,67,.17);
}

.ezead-editor__quick-menu button:hover{
    color:#d96708;
    border-color:#ffd6ae;
    background:#fff1e4;
}

.ezead-editor__editable:focus{
    outline:none;
}

.ezead-editor__editable.is-empty:before{
    content:attr(data-placeholder);
    color:#a7afb8;
    pointer-events:none;
}

.ezead-editor__editable p,
.fr-view p{
    margin:0 0 1em;
}

.ezead-editor__editable h1,
.ezead-editor__editable h2,
.ezead-editor__editable h3,
.ezead-editor__editable h4,
.ezead-editor__editable h5,
.ezead-editor__editable h6,
.fr-view h1,
.fr-view h2,
.fr-view h3,
.fr-view h4,
.fr-view h5,
.fr-view h6{
    margin:1.25em 0 .55em;
    line-height:1.2;
    color:var(--ezead-editor-purple);
}

.ezead-editor__editable ul,
.ezead-editor__editable ol,
.fr-view ul,
.fr-view ol{
    padding-left:1.35em;
    margin:0 0 1em;
}

.ezead-editor__editable blockquote,
.fr-view blockquote{
    margin:0 0 1em;
    padding:12px 16px;
    border-left:4px solid var(--ezead-editor-orange);
    background:#fff7ef;
    color:#714114;
    border-radius:0 10px 10px 0;
}

.ezead-editor__editable table,
.fr-view table{
    width:100%;
    border-collapse:collapse;
    margin:0 0 1em;
    overflow:hidden;
    border:1px solid #dbe4eb;
    border-radius:10px;
}

.ezead-editor__editable th,
.ezead-editor__editable td,
.fr-view th,
.fr-view td{
    padding:10px 12px;
    border:1px solid #dbe4eb;
    vertical-align:top;
}

.ezead-editor__editable img,
.fr-view img{
    max-width:100%;
    height:auto;
    border-radius:12px;
}

.ezead-editor__editable video,
.fr-view video,
.ezead-editor__editable iframe,
.fr-view iframe{
    max-width:100%;
    width:100%;
    min-height:240px;
    border:0;
    border-radius:14px;
    background:#0d1117;
}

.ezead-media{
    margin:0 0 1em;
}

.ezead-media figcaption{
    margin-top:8px;
    color:var(--ezead-editor-muted);
    font-size:13px;
}

.ezead-attachment a{
    display:inline-flex;
    gap:8px;
    align-items:center;
    padding:10px 12px;
    border:1px solid #d7e0e7;
    border-radius:10px;
    background:var(--ezead-editor-soft);
    color:var(--ezead-editor-purple);
    font-weight:700;
    word-break:break-word;
}

.ezead-editor__footer{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
    padding:11px 16px;
    border-top:1px solid #e7edf2;
    background:#fbfcfd;
    color:var(--ezead-editor-muted);
    font-size:12px;
    border-radius:0 0 16px 16px;
}

.ezead-editor__brand{
    font-weight:800;
    color:var(--ezead-editor-orange);
}

.fr-view{
    color:var(--ezead-editor-ink);
    line-height:1.78;
}

.fr-view img{
    display:block;
}

.fr-view .align-left{
    text-align:left;
}

.fr-view .align-center{
    text-align:center;
}

.fr-view .align-right{
    text-align:right;
}

.fr-view .align-justify{
    text-align:justify;
}

@media (max-width: 720px){
    .ezead-editor__toolbar{
        gap:6px;
    }

    .ezead-editor__btn{
        width:35px;
        height:35px;
    }

    .ezead-editor__divider{
        margin:0 3px;
    }

    .ezead-editor__quick-menu{
        top:40px;
        left:0;
        flex-wrap:wrap;
        width:175px;
        border-radius:16px;
    }

    .ezead-editor__quick{
        left:10px;
    }

    .ezead-editor__ai,
    .ezead-editor__footer{
        flex-direction:column;
        align-items:flex-start;
    }

    .ezead-editor__ai-btn{
        width:100%;
    }
}
