/* Configs / Threads */

.configs-page-shell,
.configs-page-shell * {
    min-width: 0;
}

.configs-page-shell {
    display: grid;
    text-transform: none;
}

.configs-page-shell h1,
.configs-page-shell h2,
.configs-page-shell h3,
.configs-page-shell p,
.configs-page-shell input,
.configs-page-shell textarea,
.configs-page-shell button,
.configs-page-shell a,
.configs-page-shell span,
.configs-page-shell small {
    text-transform: none;
}

/* Top navigation */

.configs-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.config-alert-card {
    padding-top: 14px;
    padding-bottom: 14px;
}

.config-alert-card p {
    margin: 0;
}

/* User colors */

.config-user-admin {
    color: var(--orange2) !important;
    font-weight: 900;
}

.config-user-normal {
    color: #b8ad99 !important;
    font-weight: 800;
}

a.config-user-admin:hover,
a.config-user-normal:hover {
    color: var(--yellow) !important;
    text-decoration: underline;
}

/* Shared headings */

.configs-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.configs-card-heading h2 {
    margin: 0;
}

.configs-card-heading span {
    min-width: 38px;
    padding: 6px 9px;
    color: #1b1003;
    text-align: center;
    background:
        linear-gradient(180deg, #ffd27a, #d9942f);
    border: 1px solid #f0c15a;
    box-shadow: 1px 1px 0 #000;
    font-size: 12px;
    font-weight: 900;
}

/* Avatars */

.config-user-avatar-link {
    display: block;
    flex: 0 0 auto;
    text-decoration: none !important;
}

.config-user-avatar-link:hover,
.config-user-avatar-link:focus {
    text-decoration: none !important;
}

.config-user-avatar {
    display: grid;
    place-items: center;
    object-fit: cover;
    color: var(--orange2);
    background:
        linear-gradient(180deg, #111111, #070707);
    border: 1px solid var(--line2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        1px 1px 0 #000;
    font-weight: 900;
    user-select: none;
    -webkit-user-select: none;
}

.config-user-avatar-link:hover .config-user-avatar {
    border-color: var(--orange);
    color: var(--yellow);
}

.config-user-avatar-large {
    width: 86px;
    height: 86px;
    font-size: 30px;
}

.config-user-avatar-reply {
    width: 42px;
    height: 42px;
    font-size: 17px;
}

.config-user-avatar-empty {
    text-transform: uppercase;
}

/* Thread list */

.configs-index-card {
    width: 100%;
    min-width: 0;
}

.config-thread-list {
    display: grid;
    gap: 10px;
}

.config-thread-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 15px;
    color: var(--text);
    border: 1px solid #2e271c;
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.035), transparent 90px),
        #0b0b0b;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        1px 1px 0 #000;
}

.config-thread-row:hover {
    color: var(--text);
    text-decoration: none;
    border-color: var(--orange);
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.08), transparent 90px),
        #0d0d0d;
}

.config-thread-row-main {
    min-width: 0;
}

.config-thread-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff1c9;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.config-thread-title-link {
    color: #fff1c9;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.config-thread-row:hover .config-thread-title-link {
    color: var(--yellow);
}

.config-thread-row-meta {
    margin-top: 6px;
    color: var(--faint);
    font-size: 12px;
    line-height: 1.45;
}

.config-thread-open {
    min-width: 78px;
    padding: 8px 10px;
    color: #f0dfbd;
    text-align: center;
    background:
        linear-gradient(180deg, #242017, #101010);
    border: 1px solid #4a3a22;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        1px 1px 0 #000;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.config-thread-row:hover .config-thread-open {
    color: #fff0c9;
    border-color: var(--orange);
}

/* Pills / badges */

.config-pin,
.config-pill,
.config-muted-pill {
    width: fit-content;
    display: inline-block;
    padding: 4px 7px;
    border: 1px solid #4a3a22;
    box-shadow: 1px 1px 0 #000;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.config-pin,
.config-pill-pinned {
    color: #1b1003;
    background:
        linear-gradient(180deg, #ffd27a, #d9942f);
    border-color: #f0c15a;
}

.config-pin {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 22px;
    padding: 0;
}

.config-pin i {
    font-size: 12px;
}

.config-pill {
    color: #f0dfbd;
    background:
        linear-gradient(180deg, #242017, #101010);
}

.config-muted-pill {
    color: var(--muted);
    background:
        linear-gradient(180deg, #171717, #0b0b0b);
}

/* Single thread */

.config-thread-card {
    width: 100%;
    min-width: 0;
    padding: 24px;
}

.config-thread-header {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.config-thread-header-with-avatar {
    align-items: stretch;
}

.config-thread-author-block {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 14px;
    min-width: 0;
}

.config-thread-title-box {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    min-height: 86px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 14px;
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.04), transparent),
        #090909;
    border: 1px solid rgba(217, 148, 47, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        1px 1px 0 #000;
}

.config-thread-title-box h1 {
    margin: 0;
    color: #fff1c9;
    font-size: 34px;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.config-thread-meta-line {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 9px;
    color: #8b8173;
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.config-thread-meta-line .username {
    font-size: 12px;
}

.config-thread-mini-badge {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 18px;
    color: #1b1003;
    background:
        linear-gradient(180deg, #ffd27a, #d9942f);
    border: 1px solid #f0c15a;
    box-shadow: 1px 1px 0 #000;
    font-size: 10px;
}

.config-thread-mini-badge i {
    font-size: 10px;
}

.config-thread-actions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.config-thread-actions form {
    margin: 0;
}

.config-thread-body {
    padding-top: 18px;
}

.config-meta {
    color: var(--faint);
    font-size: 12px;
    line-height: 1.55;
}

/* Edited note */

.config-edit-note {
    width: fit-content;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 6px 8px;
    color: #8b8173;
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.025), transparent),
        #090909;
    border: 1px solid rgba(217, 148, 47, 0.16);
    box-shadow: 1px 1px 0 #000;
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.config-edit-note i {
    color: var(--faint);
    font-size: 11px;
}

.config-edit-note-reply {
    margin-top: 12px;
}

/* Likes */

.config-like-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(217, 148, 47, 0.13);
}

.config-like-area form {
    margin: 0 0 0 auto;
    flex: 0 0 auto;
    order: 2;
}

.config-like-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    color: #f0dfbd;
    background:
        linear-gradient(180deg, #242017, #101010);
    border: 1px solid #4a3a22;
    font-size: 12px;
    white-space: nowrap;
}

.config-like-button i {
    font-size: 13px;
}

.config-like-button-active,
.config-like-button-active:hover {
    color: #1b1003;
    background:
        linear-gradient(180deg, #ffd27a, #d9942f 55%, #9d5e16);
    border-color: #f0c15a;
}

.config-like-button-active i {
    color: #1b1003;
}

.config-liked-by {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin: 0;
    padding: 7px 9px;
    color: var(--faint);
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.025), transparent),
        rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(217, 148, 47, 0.14);
    box-shadow: 1px 1px 0 #000;
    font-size: 12px;
    line-height: 1.55;
    order: 1;
}

.config-liked-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8f8576;
    font-weight: 800;
}

.config-liked-label i {
    color: var(--orange);
    font-size: 11px;
}

.config-liked-users {
    display: inline;
    overflow-wrap: anywhere;
}

.config-liked-users a,
.config-liked-users span {
    display: inline;
}

/* Reply toggle */

.config-show-reply-button {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.config-show-reply-button i {
    font-size: 13px;
}

/* Replies */

.config-replies-card {
    width: 100%;
    min-width: 0;
}

.config-replies-list {
    display: grid;
    gap: 12px;
}

.config-reply {
    padding: 14px;
    border: 1px solid #2e271c;
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.025), transparent),
        #080808;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        1px 1px 0 #000;
}

.config-reply-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.config-reply-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.config-reply-header .username {
    display: inline-block;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.config-reply-header small {
    display: block;
    margin-top: 3px;
    color: var(--faint);
}

.config-reply-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.config-reply-actions form {
    margin: 0;
}

.config-reply-actions button,
.config-reply-actions .button {
    min-height: 31px;
    padding: 7px 10px;
    font-size: 12px;
}

.config-quote-button {
    min-height: 31px;
    padding: 7px 10px;
    font-size: 12px;
}

/* Reply quotes */

.config-reply-quote,
.config-reply-quote-preview {
    margin-bottom: 12px;
    padding: 8px 9px;
    color: #8b8173;
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.025), transparent),
        #090909;
    border: 1px solid rgba(217, 148, 47, 0.16);
    box-shadow: 1px 1px 0 #000;
    font-size: 11px;
    line-height: 1.45;
}

.config-reply-quote-title {
    margin-bottom: 4px;
    color: var(--orange2);
    font-weight: 900;
}

.config-reply-quote-body {
    color: #b8ad99;
    overflow-wrap: anywhere;
}

.config-reply-quote-preview {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.config-reply-quote-preview strong {
    display: block;
    margin-bottom: 4px;
    color: var(--orange2);
    font-size: 11px;
}

.config-reply-quote-preview p {
    margin: 0;
    color: #b8ad99;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.config-reply-quote-preview button {
    flex: 0 0 auto;
    min-height: 29px;
    padding: 6px 9px;
    font-size: 11px;
}

/* Embeds */

.config-image-embed {
    max-width: 100%;
    margin: 14px 0;
    overflow: hidden;
}

.config-image-embed img {
    display: block;
    max-width: 100%;
    max-height: 700px;
    object-fit: contain;
    border: 1px solid #3a2c18;
    background: #070707;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        1px 1px 0 #000;
}

.config-youtube-embed {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    margin: 14px 0;
    border: 1px solid #3a2c18;
    background: #070707;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        1px 1px 0 #000;
    overflow: hidden;
}

.config-youtube-embed iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.config-embed-blocked {
    width: fit-content;
    max-width: 100%;
    display: inline-block;
    margin: 8px 0;
    padding: 6px 8px;
    color: #d3a06a;
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.025), transparent),
        #090909;
    border: 1px solid rgba(217, 148, 47, 0.16);
    box-shadow: 1px 1px 0 #000;
    font-size: 11px;
    font-weight: 900;
}

/* Compose / edit */

.config-compose-card {
    width: 100%;
    min-width: 0;
    position: static;
}

.config-post-form {
    min-width: 0;
}

.config-post-form input {
    max-width: none;
    text-transform: none;
}

.config-post-form textarea {
    max-width: none;
    min-height: 180px;
    text-transform: none;
}

.config-edit-box {
    min-width: 0;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #2e271c;
    background:
        linear-gradient(180deg, rgba(255, 179, 71, 0.035), transparent),
        #0b0b0b;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        1px 1px 0 #000;
    overflow: hidden;
    text-transform: none;
}

.config-edit-box * {
    text-transform: none;
}

.config-action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.config-action-row form {
    margin: 0;
}

/* Formatting toolbar */

.config-format-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 9px;
    border: 1px solid #2e271c;
    border-bottom: 0;
    background:
        linear-gradient(180deg, #1a1510, #0d0d0d);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        1px 1px 0 #000;
}

.config-format-toolbar button {
    min-height: 32px;
    padding: 7px 10px;
    color: #f0dfbd;
    background:
        linear-gradient(180deg, #242017, #101010);
    border: 1px solid #4a3a22;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        1px 1px 0 #000;
    font-size: 12px;
    font-weight: 800;
    text-transform: none;
}

.config-format-toolbar button:hover {
    color: #fff0c9;
    border-color: var(--orange);
}

/* Rendered formatting */

.config-format-content {
    max-width: 100%;
    min-width: 0;
    color: var(--muted);
    line-height: 1.7;
    text-transform: none;
    overflow-wrap: anywhere;
    word-break: normal;
    overflow: hidden;
}

.config-format-content * {
    text-transform: none;
}

.config-format-content strong {
    color: var(--text);
}

.config-format-content a {
    color: var(--orange2);
    overflow-wrap: anywhere;
}

.config-format-content blockquote {
    max-width: 100%;
    margin: 14px 0;
    padding: 8px 0 8px 14px;
    color: #d2c6b4;
    border-left: 3px solid var(--orange);
    background: rgba(0, 0, 0, 0.18);
    overflow-wrap: anywhere;
}

.config-format-heading {
    max-width: 100%;
    margin: 14px 0 8px;
    color: #fff1c9;
    overflow-wrap: anywhere;
    text-transform: none;
}

.config-format-list {
    max-width: 100%;
    margin: 12px 0;
    padding-left: 24px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.config-format-list li {
    margin-bottom: 5px;
}

/* Code blocks */

.config-code-block {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 14px 0;
    border: 1px solid #3a2c18;
    background: #070707;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        1px 1px 0 #000;
    overflow: hidden;
}

.config-code-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 100%;
    border-bottom: 1px solid #3a2c18;
    background:
        linear-gradient(180deg, #201a11, #0e0e0e);
}

.config-code-label {
    min-width: 0;
    padding: 6px 9px;
    color: var(--orange2);
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
    text-transform: none;
}

.config-code-copy {
    min-height: 28px;
    margin: 5px;
    padding: 5px 9px;
    color: #f0dfbd;
    background:
        linear-gradient(180deg, #242017, #101010);
    border: 1px solid #4a3a22;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        1px 1px 0 #000;
    font-size: 12px;
    font-weight: 800;
    text-transform: none;
}

.config-code-copy:hover {
    color: #fff0c9;
    border-color: var(--orange);
}

.config-code-block pre {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    color: #ffd982;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1.55;
    text-transform: none;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
}

.config-code-block pre::-webkit-scrollbar {
    height: 10px;
}

.config-code-block pre::-webkit-scrollbar-track {
    background: #070707;
    border-top: 1px solid #2e271c;
}

.config-code-block pre::-webkit-scrollbar-thumb {
    background:
        linear-gradient(90deg, #4a3a22, #201a11);
    border: 1px solid #6f542c;
}

.config-code-block code {
    display: block;
    width: max-content;
    min-width: 100%;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
    text-transform: none;
}

.config-format-content code {
    max-width: 100%;
    text-transform: none;
}

/* Responsive */

@media (max-width: 620px) {
    .configs-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .configs-topbar .button {
        width: 100%;
    }

    .config-thread-header {
        flex-direction: column;
    }

    .config-thread-author-block {
        width: 100%;
        gap: 11px;
        align-items: stretch;
    }

    .config-thread-title-box {
        width: 100%;
        min-height: 72px;
    }

    .config-thread-title-box h1 {
        font-size: 27px;
    }

    .config-thread-actions {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
    }

    .config-thread-actions form,
    .config-thread-actions button,
    .config-thread-actions .button {
        width: 100%;
    }

    .config-thread-row {
        grid-template-columns: 1fr;
    }

    .config-thread-open {
        width: 100%;
        text-align: center;
    }

    .config-like-area {
        align-items: stretch;
        flex-direction: column;
    }

    .config-like-area form {
        margin: 0;
        order: 1;
    }

    .config-liked-by {
        order: 2;
    }

    .config-like-button {
        width: 100%;
        justify-content: center;
    }

    .config-show-reply-button {
        width: 100%;
    }

    .config-user-avatar-large {
        width: 72px;
        height: 72px;
        font-size: 24px;
    }

    .config-user-avatar-reply {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .config-reply-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .config-reply-actions {
        width: 100%;
        align-items: stretch;
    }

    .config-reply-actions form,
    .config-reply-actions button,
    .config-reply-actions .button {
        width: 100%;
    }

    .config-reply-quote-preview {
        flex-direction: column;
    }

    .config-reply-quote-preview button {
        width: 100%;
    }

    .config-format-toolbar button {
        flex: 1 1 auto;
        min-width: 92px;
    }

    .config-action-row {
        align-items: stretch;
    }

    .config-action-row button,
    .config-action-row .button,
    .config-action-row form {
        width: 100%;
    }
}