/* Change details section to use a grid. This keeps values on the right side when wrapping. */
.issue-details {
    display: grid;
    align-self: start;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 0.5rem;
}
/* Style field links. I use status badges for these. */
a.status-badge {
    text-decoration: none;
}
a.status-badge:hover {
    text-decoration: underline;
}
.field-value-labels {
    font-family: monospace;
}
/* Display collapsible section titles inline. */
summary > * {
    display: inline-block;
}
summary {
    cursor: pointer;
}
/* Make attachments larger. */
.attachments {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
/* Change the attachment class name to avoid the img rule that affects profile images. */
.attachment-block {
    color: var(--gray-950);
    background-color: var(--gray-200);
    border-radius: 0.25rem;
    text-decoration: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
/* Styling for the preview. */
.attachment-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 16/9;
}
.attachment-icon {
    width: 64px;
    height: 64px;
    margin: 1rem;
    image-rendering: pixelated;
}
/* Styling for the added details. */
.attachment-details {
    display: flex;
    flex-direction: column;
    margin: 0.2rem;
    gap: 0.1rem;
    text-align: center;
}
.attachment-block a {
    text-decoration: none;
}
.attachment-block a:hover {
    text-decoration: underline;
}
/* Extra items added to comment time (visibility lock and name). */
.comment-time img {
    display: inline;
}
.comment-visibility-name {
    font-weight: bold;
}



/* Fix small scrollbar caused by the special user backgrounds. */
.issue-description,
.comment-body {
    overflow-y: hidden;
    overflow-x: scroll;
}
/* Enable wordwrap in code blocks. */
.adf pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}
/* Make links smaller in history section. */
.issue-history-section .issue-link {
    max-width: 30rem;
}

.broken-attachment img {
    display: inline-block;
    margin-right: 0.25rem;
}

.small-issue-link img {
    display: inline;
    margin-right: 0.25rem;
}

.priority-badge img {
    display: inline;
    margin-right: 0.25rem;
}

.history-label {
    font-weight: bold;
}

.status-badge {
    white-space: nowrap;
}


diff\:delete:not([diff\:delete] diff\:delete),
[diff\:delete]:not([diff\:delete] [diff\:delete]) {
    background-color: #e69c9c60;
    color: #661c1c;
    text-decoration: line-through;
}

diff\:insert:not([diff\:insert] diff\:insert),
[diff\:insert]:not([diff\:insert] [diff\:insert]) {
    background-color: #9ce69c60;
    color: #1c661c;
}



.diff-panel-side {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.diff-panel-top {
    display: flex;
    flex-direction: column;
}

.diff-panel-side > *, .diff-panel-top > * {
    flex: 1
}

.adf .panel {
    display: block;
    padding: 0;
}

.adf .panelContent, .adf .panelHeader {
    padding: 0.5rem;
}

.history-quote {
    padding: 0.5rem 1rem;
    border-left: 2px solid var(--gray-300);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* History/comment tabs using radio button hack. */
.issue-tabs {
    margin: 20px auto;
    width: 100%;
}

.issue-tabs > input[type="radio"] {
    display: none;
}

.issue-tabs > label {
    display: inline-block;
    padding: 10px 20px;
    background: #ddd;
    cursor: pointer;
    border: 1px solid #bbb;
    border-bottom: none;
}

.issue-tabs > input:checked + label {
    background: white;
    font-weight: bold;
}

.issue-tab-content {
    display: none;
    border: 1px solid #bbb;
    padding: 20px;
}

#issue-tab-comments:checked ~ .issue-tabs-content #issue-tab-content-comments,
#issue-tab-history:checked ~ .issue-tabs-content #issue-tab-content-history {
    display: block;
}

.history-entry {
    padding: 0.25rem;
}

footer a {
    display: inline;
    text-decoration: underline;
}

.adf .emoticon {
    display: inline;
}
