.theblacklist-page {
    --theblacklist-panel-bg: rgba(9, 9, 11, 0.74);
    --theblacklist-card-bg: rgba(24, 24, 27, 0.48);
    --theblacklist-blue-soft: rgba(56, 189, 248, 0.12);
    --theblacklist-green-soft: rgba(34, 197, 94, 0.13);
    --theblacklist-yellow-soft: rgba(250, 204, 21, 0.12);
}

.theblacklist-container {
    max-width: 1480px;
    margin-inline: auto;
}

.theblacklist-header {
    position: sticky;
    top: 12px;
    z-index: 1100;
    border-color: rgba(63, 63, 70, 0.76);
    background: rgba(9, 9, 11, 0.9);
}

.theblacklist-content {
    display: grid;
    align-content: start;
    gap: 16px;
    min-height: 0;
    padding-top: 16px;
}

.theblacklist-toolbar,
.theblacklist-nav,
.theblacklist-actions {
    flex-wrap: wrap;
}

.theblacklist-nav-active {
    color: var(--spt-accent) !important;
    background: var(--theblacklist-yellow-soft) !important;
}

.theblacklist-hero {
    border-color: #1f2937;
    background:
        linear-gradient(135deg, rgba(31, 41, 55, 0.92), rgba(3, 7, 18, 0.95) 52%, rgba(9, 9, 11, 0.98)),
        var(--theblacklist-panel-bg);
}

.theblacklist-dashboard-hero {
    border-color: #1f2937;
    background:
        radial-gradient(circle at 94% 18%, rgba(56, 189, 248, 0.11), transparent 19rem),
        linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(3, 7, 18, 0.96) 58%, rgba(9, 9, 11, 0.98));
}

/* Mod landing page, following SIC's landing-card language. */
.theblacklist-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.theblacklist-home-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 104px;
    padding: 18px;
    color: inherit;
    text-decoration: none;
}

.theblacklist-home-link-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(250, 204, 21, 0.34);
    border-radius: 10px;
    color: var(--spt-accent);
    background: var(--theblacklist-yellow-soft);
}

.theblacklist-home-link-copy {
    display: grid;
    gap: 4px;
}

.theblacklist-home-link-copy strong {
    color: var(--spt-text);
    font-size: 1rem;
}

.theblacklist-home-link-copy span {
    color: var(--spt-text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.theblacklist-home-link-arrow {
    color: var(--spt-text-muted);
    transition: color 160ms ease, transform 160ms ease;
}

.theblacklist-home-link:hover .theblacklist-home-link-arrow,
.theblacklist-home-link:focus-visible .theblacklist-home-link-arrow {
    color: var(--spt-accent);
    transform: translateX(3px);
}

.theblacklist-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 12px;
}

.theblacklist-section-heading .mud-typography-h5 {
    color: var(--spt-text);
    font-weight: 800;
}

.theblacklist-section {
    border-color: rgba(63, 63, 70, 0.76) !important;
    background: var(--theblacklist-panel-bg) !important;
}

.theblacklist-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Inline caveat that has to be read, unlike ConfigWarning which hides behind a hover tooltip */
.theblacklist-note {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(250, 204, 21, 0.28);
    border-radius: var(--spt-radius);
    background: var(--theblacklist-yellow-soft);
    color: var(--spt-text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.theblacklist-note > .mud-icon-root {
    flex: 0 0 auto;
    margin-top: 2px;
}

.theblacklist-drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(0, 0, 0, 0.45);
}

.theblacklist-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1401;
    overflow-y: auto;
    width: min(380px, 92vw);
    height: 100vh;
    border-left: 1px solid var(--spt-border);
    background: rgba(9, 9, 11, 0.98);
    transform: translateX(100%);
    transition: transform 160ms ease;
    visibility: hidden;
}

.theblacklist-drawer-open {
    transform: translateX(0);
    visibility: visible;
}

.theblacklist-drawer-inner {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 16px;
}

.theblacklist-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--spt-border);
}

.theblacklist-drawer-empty {
    margin: 0;
    color: var(--spt-text-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.theblacklist-drawer-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.theblacklist-drawer-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid var(--spt-border);
    border-left: 2px solid var(--spt-accent);
    border-radius: var(--spt-radius);
    background: var(--theblacklist-card-bg);
}

.theblacklist-drawer-list strong {
    display: block;
    font-size: 0.84rem;
}

.theblacklist-drawer-list span {
    color: var(--spt-text-muted);
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-size: 0.68rem;
}

.theblacklist-filter {
    position: sticky;
    top: 76px;
    z-index: 1050;
    border-color: rgba(63, 63, 70, 0.76) !important;
    background: rgba(9, 9, 11, 0.94) !important;
}

/* Dense list editor: one line per entry rather than a card per entry. */
.theblacklist-dict {
    display: grid;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--spt-border);
    border-radius: var(--spt-radius);
    background: var(--theblacklist-card-bg);

    /* Every row is its own grid, so an `auto` trailing column would resolve to a different width per
       row and knock the 1fr column out of alignment. The action column is fixed for that reason, and
       sized to fit the Add button rather than just the delete icon. */
    --theblacklist-action-col: 96px;
}

.theblacklist-dict-head,
.theblacklist-dict-row,
.theblacklist-dict-row-new {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px 116px 84px 118px 138px var(--theblacklist-action-col);
    gap: 10px;
    align-items: center;
    padding: 3px 10px;
}

.theblacklist-dict-head {
    padding: 6px 10px;
    border-bottom: 1px solid var(--spt-border);
    background: rgba(24, 24, 27, 0.7);
    color: var(--spt-text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.theblacklist-dict-body-scroll {
    overflow-y: auto;
    max-height: 560px;
}

.theblacklist-dict-row {
    border-left: 2px solid transparent;
}

.theblacklist-dict-row:hover {
    background: rgba(63, 63, 70, 0.18);
}

.theblacklist-dict-row-new {
    border-top: 1px solid var(--spt-border);
    background: rgba(24, 24, 27, 0.5);
}

/* Fill the action column so a wider button can never push the row's other columns around */
.theblacklist-dict-row-new .mud-button-root {
    width: 100%;
}

.theblacklist-dict-row .mud-icon-button {
    justify-self: center;
}

.theblacklist-dict-id {
    overflow: hidden;
    color: var(--spt-text-muted);
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Chip list editors (excluded categories). */
.theblacklist-chip-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--spt-border);
    border-radius: var(--spt-radius);
    background: var(--theblacklist-card-bg);
}

.theblacklist-chip-block > .mud-chipset {
    flex: 1 1 auto;
    min-width: 0;
}

.theblacklist-chip-empty {
    color: var(--spt-text-muted);
    font-size: 0.78rem;
}

.theblacklist-chip-add {
    display: flex;
    flex: 0 1 300px;
    align-items: center;
    gap: 4px;
    min-width: 220px;
}

.theblacklist-kind-changed {
    border-color: rgba(250, 204, 21, 0.4);
    background: var(--theblacklist-yellow-soft);
    color: var(--spt-accent);
}

@media (max-width: 1200px) {
    .theblacklist-dict-head,
    .theblacklist-dict-row,
    .theblacklist-dict-row-new {
        grid-template-columns: minmax(0, 1fr) 116px 84px 110px 130px var(--theblacklist-action-col);
    }

    /* The id column is the first thing to go when space runs out. */
    .theblacklist-dict-id,
    .theblacklist-dict-head > span:nth-child(2) {
        display: none;
    }
}

/* Release timeline on the landing page. */
.theblacklist-update-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    border-color: rgba(250, 204, 21, 0.4) !important;
    background: linear-gradient(135deg, var(--theblacklist-yellow-soft), var(--theblacklist-panel-bg)) !important;
}

.theblacklist-update-banner > div {
    display: grid;
    flex: 1;
}

.theblacklist-update-banner strong {
    font-size: 1rem;
}

.theblacklist-update-banner span {
    color: var(--spt-text-muted);
    font-size: 0.82rem;
}

.theblacklist-release-status {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--spt-text-muted);
    font-size: 0.86rem;
}

.theblacklist-timeline {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0 0 0 22px;
    list-style: none;
}

.theblacklist-timeline-item {
    position: relative;
}

/* The rail is drawn per item so it stops cleanly at the last card. */
.theblacklist-timeline-item::before {
    content: "";
    position: absolute;
    top: 22px;
    bottom: -20px;
    left: -14px;
    width: 2px;
    background: var(--spt-border);
}

.theblacklist-timeline-item:last-child::before {
    display: none;
}

.theblacklist-timeline-marker {
    position: absolute;
    top: 15px;
    left: -19px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--spt-border);
    border-radius: 50%;
    background: var(--spt-bg, #09090b);
}

.theblacklist-timeline-item-current .theblacklist-timeline-marker {
    border-color: var(--spt-accent);
    background: var(--spt-accent);
}

.theblacklist-timeline-card {
    padding: 14px 16px;
}

.theblacklist-timeline-item-current .theblacklist-timeline-card {
    border-color: rgba(250, 204, 21, 0.36);
}

.theblacklist-timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.theblacklist-timeline-header > div:first-child {
    display: grid;
}

.theblacklist-timeline-header strong {
    font-size: 0.98rem;
}

.theblacklist-timeline-header span {
    color: var(--spt-text-muted);
    font-size: 0.76rem;
}

.theblacklist-timeline-tags {
    display: flex;
    align-items: center;
    gap: 4px;
}

.theblacklist-release-heading {
    margin: 12px 0 4px;
    color: var(--spt-text);
    font-size: 0.84rem;
    font-weight: 800;
}

.theblacklist-release-text,
.theblacklist-release-empty {
    margin: 6px 0 0;
    color: var(--spt-text-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.theblacklist-release-list {
    margin: 6px 0 0;
    padding-left: 18px;
    color: var(--spt-text-muted);
    font-size: 0.84rem;
    line-height: 1.6;
}

.theblacklist-timeline-card a {
    color: var(--spt-accent);
    text-decoration: none;
    word-break: break-word;
}

.theblacklist-timeline-card a:hover,
.theblacklist-timeline-card a:focus-visible {
    text-decoration: underline;
}

/* SIC ConfigJsonValueEditor-style primitive cards. */
.theblacklist-option {
    display: grid;
    grid-template-columns: minmax(170px, 300px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 54px;
    padding: 11px 12px;
    border: 1px solid rgba(39, 39, 42, 0.98);
    border-radius: var(--spt-radius);
    background:
        linear-gradient(90deg, rgba(24, 24, 27, 0.72), rgba(24, 24, 27, 0.42)),
        var(--theblacklist-card-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.theblacklist-option-boolean {
    box-shadow: inset 3px 0 0 rgba(250, 204, 21, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.theblacklist-option-number {
    box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.74), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.theblacklist-option-object {
    box-shadow: inset 3px 0 0 rgba(56, 189, 248, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.theblacklist-option:hover,
.theblacklist-option:focus-within {
    transform: translateY(-1px);
    border-color: rgba(82, 82, 91, 0.95);
    background: rgba(24, 24, 27, 0.72);
}

.theblacklist-option-meta {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.theblacklist-option-title-row,
.theblacklist-collection-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.theblacklist-option-title {
    color: var(--spt-text);
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.theblacklist-warning-trigger {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    padding: 0;
    border: 1px solid rgba(250, 204, 21, 0.48);
    border-radius: 6px;
    color: var(--spt-accent);
    background: var(--theblacklist-yellow-soft);
    cursor: help;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.theblacklist-warning-trigger:hover,
.theblacklist-warning-trigger:focus-visible {
    border-color: var(--spt-accent);
    background: rgba(250, 204, 21, 0.18);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
    outline: none;
}

.theblacklist-warning-tooltip {
    display: grid;
    gap: 5px;
    width: min(360px, calc(100vw - 32px));
    padding: 10px 12px;
    border: 1px solid rgba(250, 204, 21, 0.62);
    border-radius: 6px;
    color: #f8fafc;
    background: rgba(24, 24, 27, 0.98);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.46);
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
}

.theblacklist-warning-tooltip strong {
    color: var(--spt-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.theblacklist-option-description {
    color: var(--spt-text-muted) !important;
    line-height: 1.35;
}

.theblacklist-kind {
    width: max-content;
    max-width: 100%;
    padding: 3px 7px;
    border: 1px solid rgba(63, 63, 70, 0.74);
    border-radius: 999px;
    color: #d4d4d8;
    background: rgba(39, 39, 42, 0.72);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.theblacklist-kind-boolean {
    border-color: rgba(250, 204, 21, 0.38);
    color: #fde047;
    background: var(--theblacklist-yellow-soft);
}

.theblacklist-kind-number {
    border-color: rgba(34, 197, 94, 0.34);
    color: #86efac;
    background: var(--theblacklist-green-soft);
}

.theblacklist-kind-object {
    border-color: rgba(56, 189, 248, 0.34);
    color: #7dd3fc;
    background: var(--theblacklist-blue-soft);
}

.theblacklist-option-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.theblacklist-switch-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    color: #d4d4d8;
    font-weight: 700;
}

.theblacklist-minmax-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
}

.theblacklist-item-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 10px;
    align-items: center;
}

.theblacklist-option-actions {
    min-width: 42px;
}

.theblacklist-number-input input {
    font-family: Consolas, "Liberation Mono", monospace;
}

.theblacklist-collection-header {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(63, 63, 70, 0.62);
    border-radius: var(--spt-radius);
    background: rgba(3, 7, 18, 0.2);
}

.theblacklist-collection-summary {
    color: var(--spt-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.theblacklist-content > *,
.theblacklist-page .mud-grid-item {
    min-width: 0;
}

.theblacklist-page .mud-button-root {
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.theblacklist-page .mud-button-filled-warning {
    color: #111827;
}

.theblacklist-page .mud-input-outlined-border {
    border-color: var(--spt-border-strong) !important;
}

.theblacklist-page .mud-input:hover .mud-input-outlined-border {
    border-color: #52525b !important;
}

.theblacklist-page .mud-input.mud-input-focused .mud-input-outlined-border {
    border-color: var(--spt-info) !important;
}

.theblacklist-page .mud-expand-panel {
    overflow: hidden;
    border: 1px solid rgba(63, 63, 70, 0.76);
    border-radius: var(--spt-radius);
    background: var(--theblacklist-panel-bg);
}

.theblacklist-page .mud-expand-panel-header {
    min-height: 52px;
    background: rgba(24, 24, 27, 0.72);
}

.theblacklist-page .mud-expand-panel-text {
    color: var(--spt-text);
    font-weight: 800;
}

@media (max-width: 800px) {
    .theblacklist-option {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .theblacklist-item-field {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .theblacklist-container {
        padding: 12px !important;
    }

    .theblacklist-header {
        position: static;
    }

    .theblacklist-toolbar,
    .theblacklist-nav,
    .theblacklist-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .theblacklist-option-editor {
        grid-template-columns: 1fr;
    }

    .theblacklist-home-grid {
        grid-template-columns: 1fr;
    }

    .theblacklist-section-heading {
        align-items: flex-end;
    }
}
