.rich-text-editor {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    overflow: hidden;
}

.rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.rich-text-toolbar button,
.rich-text-toolbar label.rte-color-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: #fff;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.rich-text-toolbar button:hover,
.rich-text-toolbar label.rte-color-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.rich-text-toolbar button.is-active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.rich-text-toolbar .rte-separator {
    width: 1px;
    height: 1.5rem;
    background: #e5e7eb;
    margin: 0 0.15rem;
    align-self: center;
}

.rich-text-toolbar input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.rich-text-content {
    min-height: 120px;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1f2937;
    outline: none;
}

.rich-text-content:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}

.rich-text-content ul,
.rich-text-readonly ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.rich-text-content ol,
.rich-text-readonly ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.rich-text-content p,
.rich-text-readonly p {
    margin: 0.25rem 0;
}

.rich-text-readonly {
    min-height: 80px;
}
