/* Wrapper around toolbar + editor + hidden textarea */
.wysiwyg-wrapper {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #ffffff;
    margin-bottom: 1rem;
    overflow: hidden;
}

/* Toolbar row */
.wysiwyg-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-bottom: 1px solid #e0e0e0;
    background: #f6f7f8;
}

.wysiwyg-toolbar button,
.wysiwyg-toolbar select {
    font-size: 0.85rem;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid #c0c0c0;
    background: #ffffff;
    cursor: pointer;
    box-sizing: border-box;
}

/* Make dropdowns compact so they sit side-by-side */
.wysiwyg-toolbar select {
    display: inline-block;
    width: auto !important;      /* override any global width:100% */
    max-width: 130px;
    flex: 0 0 auto;              /* do not stretch in the flex row */
    font-size: 0.85rem;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid #c0c0c0;
    background: #ffffff;
    cursor: pointer;
    box-sizing: border-box;
}
/* Colour input */
.wysiwyg-toolbar input[type="color"][data-fontcolor] {
    width: 34px;
    height: 26px;
    padding: 0;
    border-radius: 3px;
    border: 1px solid #c0c0c0;
    background: #ffffff;
    cursor: pointer;
 flex: 0 0 auto;
}

/* Hover states */
.wysiwyg-toolbar button:hover,
.wysiwyg-toolbar select:hover,
.wysiwyg-toolbar input[type="color"][data-fontcolor]:hover {
    background: #f0f0f0;
}

/* Active toggle buttons (bold/italic/etc.) */
.wysiwyg-toolbar button.active {
    background: #ffd6f0;
    border-color: #ff9fd4;
    color: #7a2454;
}

/* Tiny separator line between groups */
.wysiwyg-toolbar .separator {
    width: 1px;
    height: 20px;
    background: #d0d0d0;
    margin: 0 4px;
}

/* The editable area */
.wysiwyg-editor {
    min-height: 160px;
    max-height: 600px;
    padding: 8px 10px;
    overflow: auto;
    line-height: 1.4;
    font-size: 0.95rem;
}

.wysiwyg-editor:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px #cde4ff;
}

/* Keep things responsive */
@media (max-width: 768px) {
    .wysiwyg-editor {
        min-height: 120px;
    }
}
