.ticket-diagnostic {
    margin-block: .65rem;
    min-width: 0;
}

.tracker-workspace .detail form.composer .ticket-diagnostic-toolbar,
.bug-editor.tiptap-ready .ticket-diagnostic-toolbar,
.bug-editor .ticket-diagnostic-toolbar {
    position: relative;
    flex-wrap: nowrap;
    overflow: visible;
}

.ticket-diagnostic-formatting {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
    gap: inherit;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.ticket-diagnostic-formatting > span {
    flex: 0 0 1px;
    height: 18px;
    margin-inline: 3px;
    background: var(--editor-border, #493514);
}

.ticket-diagnostic-toolbar > .ticket-diagnostic-trigger {
    align-self: center;
}

.ticket-diagnostic-toolbar > .ticket-diagnostic-trigger[hidden] {
    display: none;
}

.ticket-diagnostic-toolbar > a.ticket-diagnostic-trigger {
    text-decoration: none;
}

.ticket-diagnostic-hint {
    position: absolute;
    z-index: 2;
    inset-block-start: calc(100% + 5px);
    inset-inline-end: 5px;
    box-sizing: border-box;
    width: max-content;
    max-width: min(17rem, calc(100% - 10px));
    padding: 6px 9px;
    border: 1px solid var(--editor-border, #69532c);
    border-radius: 4px;
    background: #201a12;
    color: #eee2cb;
    font-size: .8125rem;
    line-height: 1.35;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
}

.ticket-diagnostic-trigger:is(:hover, :focus) + .ticket-diagnostic-hint {
    opacity: 1;
}

.ticket-diagnostic summary {
    width: fit-content;
    cursor: pointer;
}

.ticket-diagnostic pre {
    max-height: 16rem;
    margin-block: .4rem;
    padding: .65rem;
    border: 1px solid currentColor;
    border-radius: .25rem;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: .85rem;
}
