.wysiwyg-editor-container
{
    position: relative;
    width: 100%;
}

.wysiwyg-toolbar
{
    position: absolute;
    top: -65px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.wysiwyg-toolbar:after
{
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 11px solid #1a1a1a;
}

.wysiwyg-toolbar i
{
    margin: 0;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    background-color: #2c2c2c;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.wysiwyg-toolbar i:hover
{
    background-color: #444;
}

.wysiwyg-editor
{
    width: 100%;
    height: 200px;
    padding: 10px;
    font-size: 16px;
    outline: none;
    overflow-y: auto;
    resize: vertical;
    padding: 13px !important;
}

.wysiwyg-editor div { margin-bottom: 10px; }
.wysiwyg-editor p { margin-bottom: 10px; }
.wysiwyg-editor:focus { box-shadow: 0 0 0px 1px #52a3ff !important; }

.wysiwyg-editor table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.wysiwyg-editor table th, .wysiwyg-editor table td { padding: 8px; border: 1px solid #ccc; text-align: left; }
.wysiwyg-editor table th { background-color: #f4f4f4; font-weight: bold; }

.wysiwyg-editor font[size="1"] { font-size: 13px; }
.wysiwyg-editor font[size="2"] { font-size: 16px; }
.wysiwyg-editor font[size="3"] { font-size: calc(16px * 1.25); }
.wysiwyg-editor font[size="4"] { font-size: calc(16px * 1.25 * 1.25); }
.wysiwyg-editor font[size="5"] { font-size: calc(16px * 1.25 * 1.25 * 1.25); }
.wysiwyg-editor font[size="6"] { font-size: calc(16px * 1.25 * 1.25 * 1.25 * 1.25); }
.wysiwyg-editor font[size="7"] { font-size: calc(16px * 1.25 * 1.25 * 1.25 * 1.25 * 1.25); }

li::marker { font-size: inherit; padding: 40px; }
li:has(> font[size="1"]) { font-size: 12px; }
li:has(> font[size="2"]) { font-size: 16px; }
li:has(> font[size="3"]) { font-size: calc(16px * 1.25); }
li:has(> font[size="4"]) { font-size: calc(16px * 1.25 * 1.25); }
li:has(> font[size="5"]) { font-size: calc(16px * 1.25 * 1.25 * 1.25); }
li:has(> font[size="6"]) { font-size: calc(16px * 1.25 * 1.25 * 1.25 * 1.25); }
li:has(> font[size="7"]) { font-size: calc(16px * 1.25 * 1.25 * 1.25 * 1.25 * 1.25); }

.wysiwyg-editor[data-placeholder]:empty::before
{
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none;
}

.wysiwyg-overlay
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
}

.wysiwyg-color-dialog
{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1100;
    display: none;
}

.wysiwyg-color-dialog .color-grid
{
    display: grid;
    grid-template-columns: repeat(4, 40px);
    gap: 10px;
}

.wysiwyg-color-dialog .color-grid div
{
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.wysiwyg-color-dialog .color-grid div:hover
{
    transform: scale(1.2);
}

.wysiwyg-color-dialog .close-btn
{
    display: block;
    margin: 10px auto 0;
    padding: 8px 16px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.wysiwyg-color-dialog .close-btn:hover
{
    background: #444;
}
