/* Expanded task form, rich-text input, validation feedback, and long-title layout. */
.task-editor {
    display: grid;
    gap: 0.9rem;
}

.task__title-input {
    max-height: calc(5.6em + 0.6rem);
    font: inherit;
    line-height: 1.4;
    overflow-y: auto;
    resize: none;
    white-space: pre-wrap;
}

.task-editor__metadata {
    display: grid;
    gap: 0.1rem;
}

.task-editor__metadata-line {
    color: #9a958b;
    font-size: 0.72rem;
}

.task-editor label {
    display: grid;
    gap: 0.35rem;
    color: #777268;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.task-editor input {
    width: 100%;
    padding: 0.7rem 0.8rem;
    color: #24231f;
    background: #fff;
    border: 1px solid #d7d1c5;
    border-radius: 8px;
    outline: none;
    letter-spacing: normal;
    text-transform: none;
}

.task-editor input:focus {
    border-color: #787167;
    box-shadow: 0 0 0 3px rgb(73 68 60 / 10%);
}

.rich-editor {
    overflow: hidden;
    background: #fff;
    border: 1px solid #d7d1c5;
    border-radius: 8px;
}

.rich-editor:focus-within {
    border-color: #787167;
    box-shadow: 0 0 0 3px rgb(73 68 60 / 10%);
}

.rich-editor__content {
    min-height: 9rem;
    padding: 0.75rem 0.8rem;
    color: #24231f;
    background: #fff;
    outline: none;
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.5;
    text-transform: none;
}

.rich-editor__content:empty::before {
    color: #9a958b;
    content: attr(data-placeholder);
    pointer-events: none;
}

.rich-editor__content p,
.rich-editor__content ul,
.rich-editor__content ol {
    margin: 0 0 0.5rem;
}

.rich-editor__content ul,
.rich-editor__content ol {
    padding-left: 1.4rem;
}

.task-editor__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.task-editor__destructive-actions {
    display: flex;
    gap: 0.55rem;
    margin-right: auto;
}

.save-status {
    align-self: center;
    color: #4d6952;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0;
}

.save-status--visible {
    opacity: 1;
}

.button {
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 650;
}

.button--quiet {
    background: transparent;
    border-color: #d7d1c5;
}

.button--primary {
    color: #fff;
    background: #3f5142;
}

.button--danger {
    color: #9f433a;
    background: transparent;
    border-color: #d7d1c5;
}

.button:hover,
.button:focus-visible {
    filter: brightness(0.95);
    outline: 2px solid rgb(73 68 60 / 20%);
    outline-offset: 2px;
}
