/* Inline reply editor. Scope its layout and controls so the reply action
   styles do not turn the form into a row or hide its submit button. */
.tc-reply__meta .tc-reply-edit {
    display: block;
    min-width: 0;
}

.tc-reply__meta .tc-reply-edit[open] {
    flex: 0 0 100%;
    order: 10;
    width: 100%;
}

.tc-reply__meta .tc-reply-edit > summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    color: #746963;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    list-style: none;
}

.tc-reply-edit > summary::-webkit-details-marker { display: none; }
.tc-reply-edit > summary:hover { color: #ff4b39; }
.tc-reply-edit > summary:focus-visible {
    outline: 2px solid #ff4b39;
    outline-offset: 3px;
    border-radius: 3px;
}

.tc-reply__meta .tc-reply-edit > summary .tc-icon {
    display: block;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    margin: 0;
}

.tc-reply__meta .tc-reply-edit > form[data-tc-reply-form] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 9px 0 0;
    padding: 12px;
    border: 1px solid #eee2dc;
    border-radius: 8px;
    background: #fff;
}

.tc-reply-edit .tc-reply-editor,
.tc-reply-edit .tc-native-toolbar,
.tc-reply-edit .tc-quill-editor {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.tc-reply-edit textarea[name="body"] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 110px;
    padding: 10px;
    border: 1px solid #e6dad4;
    border-radius: 8px;
    font: inherit;
}

.tc-reply-edit textarea[name="body"][hidden] { display: none; }
.tc-reply-edit .tc-quill-editor { min-height: 110px; }

.tc-reply__meta .tc-reply-edit__actions {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.tc-reply__meta .tc-reply-edit__actions > .tc-icon-button {
    display: inline-flex;
    box-sizing: border-box;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    margin-right: auto;
    border: 1px solid #e6ddd8;
    border-radius: 8px;
    background: #fff;
    color: #746963;
    cursor: pointer;
}

.tc-reply__meta .tc-reply-edit__actions > .tc-icon-button:hover {
    border-color: #ff4b39;
    color: #ff4b39;
}

.tc-reply__meta .tc-reply-edit__actions > .tc-icon-button .tc-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.tc-reply__meta .tc-reply-edit__actions > button.tc-reply-edit__cancel {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #746963;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.tc-reply__meta .tc-reply-edit__actions > button.tc-button {
    display: inline-flex;
    box-sizing: border-box;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid #ff4b39;
    border-radius: 8px;
    background: #ff4b39;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}

.tc-reply__meta .tc-reply-edit__actions > button.tc-button:hover {
    border-color: #db3e2d;
    background: #db3e2d;
    color: #fff;
}

.tc-reply-edit [data-tc-image-preview]:empty { display: none; }
.tc-reply-edit [data-tc-image-preview]:not(:empty) { margin-top: 12px; }

@media (max-width: 640px) {
    .tc-reply__meta .tc-reply-edit > form[data-tc-reply-form] { padding: 10px; }
}
