.guestbook-editor {
    position: relative;
    min-width: 0;
    border: 1px solid #96a4b7;
    border-radius: .65rem;
    color: #192c49;
    background: #fff;
}

.guestbook-editor:has(> textarea:not([hidden])) { border: 0; }
.guestbook-editor :where([hidden]) { display: none !important; }

.guestbook-editor:focus-within {
    outline: 2px solid #eab447;
    outline-offset: 2px;
}

.guestbook-editor__bar,
.guestbook-editor__palette {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    padding: .35rem .42rem;
    border-bottom: 1px solid #d8e0eb;
    background: #edf2f8;
}

.guestbook-editor__bar { border-radius: .62rem .62rem 0 0; }
.guestbook-editor__palette { background: #fff8e9; }

.guestbook-editor :is(.guestbook-editor__bar, .guestbook-editor__palette) button {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    min-height: 2.25rem;
    margin: 0;
    padding: .15rem;
    border: 1px solid transparent;
    border-radius: .35rem;
    color: #183d65;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.guestbook-editor .guestbook-editor__bar button[data-command="bold"] { font-weight: 800; }
.guestbook-editor .guestbook-editor__bar button[data-command="italic"] { font-style: italic; }
.guestbook-editor .guestbook-editor__bar button[data-command="underline"] { text-decoration: underline; }
.guestbook-editor .guestbook-editor__bar button[aria-expanded] { font-size: 1.25rem; }
.guestbook-editor .guestbook-editor__palette button { font-size: 1.15rem; }

.guestbook-editor :is(.guestbook-editor__bar, .guestbook-editor__palette) button:hover,
.guestbook-editor :is(.guestbook-editor__bar, .guestbook-editor__palette) button[aria-pressed="true"],
.guestbook-editor :is(.guestbook-editor__bar, .guestbook-editor__palette) button[aria-expanded="true"] {
    border-color: #a8bdd4;
    background: #dce9f7;
}

.guestbook-editor__surface {
    min-height: 7rem;
    max-height: 19rem;
    padding: .65rem .75rem;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    outline: none;
}

.guestbook-editor__error {
    padding: .4rem .75rem;
    color: #84283a;
    background: #fcebee;
    font-size: .9rem;
}
