.sv-rich-text {
    width: 100%;
}

.sv-rich-text__toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 7px;
    border: 1px solid #dfe3eb;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #f8f9fb;
}

.sv-rich-text__group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding-right: 5px;
    border-right: 1px solid #dfe3eb;
}

.sv-rich-text__group:last-child {
    padding-right: 0;
    border-right: 0;
}

.sv-rich-text__toolbar .btn {
    display: inline-flex;
    width: 34px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 7px;
}

.sv-rich-text__toolbar .btn.is-active {
    border-color: var(--sv-primary, #222);
    background: var(--sv-primary, #222);
    color: var(--sv-text, #fff);
}

.sv-rich-text__format {
    width: auto;
    min-width: 118px;
    height: 32px;
    padding-block: 3px;
    border-radius: 7px;
    font-size: .84rem;
}

.sv-rich-text__surface,
.sv-rich-text__source {
    min-height: 150px;
    width: 100%;
    border-radius: 0 0 10px 10px !important;
}

.sv-rich-text__surface {
    padding: .75rem;
    border: 1px solid #dfe3eb;
    background: #fff;
    color: #212529;
    line-height: 1.55;
    overflow-wrap: anywhere;
    outline: 0;
}

.sv-rich-text__surface:focus {
    border-color: color-mix(in srgb, var(--sv-primary, #0d6efd) 58%, #b8c2cc);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--sv-primary, #0d6efd) 18%, transparent);
}

.sv-rich-text__surface[contenteditable="false"] {
    background: #f8f9fa;
}

.sv-rich-text__surface[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: #6c757d;
    pointer-events: none;
}

.sv-rich-text__surface h1,
.project-description-revision-text h1 {
    margin: .35em 0 .45em;
    font-size: 1.55rem;
    line-height: 1.22;
}

.sv-rich-text__surface h2,
.project-description-revision-text h2 {
    margin: .35em 0 .45em;
    font-size: 1.3rem;
    line-height: 1.25;
}

.sv-rich-text__surface h3,
.project-description-revision-text h3 {
    margin: .35em 0 .45em;
    font-size: 1.1rem;
    line-height: 1.3;
}

.sv-rich-text__surface p,
.project-description-revision-text p {
    margin: 0 0 .65em;
}

.sv-rich-text__surface p:last-child,
.project-description-revision-text p:last-child {
    margin-bottom: 0;
}

.sv-rich-text__surface ul,
.sv-rich-text__surface ol,
.project-description-revision-text ul,
.project-description-revision-text ol {
    margin: .4em 0 .7em;
    padding-left: 1.6rem;
}

.sv-rich-text__source {
    display: block;
    padding: .75rem;
    overflow: hidden;
    resize: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .84rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.sv-rich-text:not(.is-source) .sv-rich-text__source,
.sv-rich-text.is-source .sv-rich-text__surface {
    display: none;
}

.sv-rich-text.is-invalid .sv-rich-text__surface,
.sv-rich-text.is-invalid .sv-rich-text__source {
    border-color: #dc3545;
}

.sv-rich-text.is-source [data-rich-command],
.sv-rich-text.is-source [data-rich-format] {
    opacity: .45;
    pointer-events: none;
}

@media (max-width: 575.98px) {
    .sv-rich-text__toolbar {
        gap: 4px;
        padding: 6px;
    }

    .sv-rich-text__group {
        padding-right: 4px;
    }

    .sv-rich-text__format {
        min-width: 106px;
    }
}
