/* This app's own rules, on Slate's tokens. tokens.css and components.css are
   byte copies of Slate: a missing rule goes here, not there. */

.mo2-controls {
    margin-bottom: 1rem;
}

.mo2-separator {
    margin-bottom: 1rem;
}

/* An h3 under the card's Mods heading, drawn as a band across the list. */
.mo2-separator-name {
    margin: 0;
    padding: 0.4rem 0.75rem;
    background: var(--slate);
    border-bottom: var(--edge);
    color: var(--ink);
    font-size: 1rem;
}

.mo2-mod {
    padding: 0.4rem 0.75rem;
    border-bottom: var(--edge);
    background: var(--surface);
}

.mo2-mod-head {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Slate keeps a checkbox at its own size; this one is a fixed-width marker,
   and the details below indent by its width plus the gap. */
.mo2-mod-head input {
    flex: none;
    width: 1rem;
    margin: 0;
}

.mo2-label {
    margin-right: 0.35rem;
    color: var(--muted);
    font-weight: 500;
}

.mo2-host {
    color: var(--muted);
}

.mo2-mod-name {
    font-weight: 500;
}

.mo2-size {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.mo2-disabled .mo2-mod-name {
    color: var(--muted);
}

/* A line of facts under a mod or a change, on every page listing them. */
.detail {
    padding-left: 1.5rem;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}

.mo2-mod .detail {
    font-size: 0.8rem;
}

.loadorder tr:target {
    background: var(--amber-tint);
}

/* A plugin's filename can run past a phone's width with no space in it. */
.loadorder td[data-mobile-label="Plugin"] {
    overflow-wrap: anywhere;
}

.changelog-mods {
    padding-left: 1.25rem;
}

.known-list {
    padding: 0;
    list-style: none;
}

/* One filename per line; a click puts it in the lookup box. */
.known-name {
    padding: 0.15rem 0;
    border-bottom: var(--edge);
    overflow-wrap: anywhere;
    cursor: pointer;
}

.known-name:hover {
    background: var(--slate);
}

/* Rows run several lines tall: start every cell at the top, and give the
   list names room so they wrap by word, not by letter. */
.common-table td {
    vertical-align: top;
}

.common-table td.mono {
    overflow-wrap: anywhere;
}

/* Laid out automatically, every threshold showed other rows and so other
   column widths: the table is .data-table-fixed, and each column keeps one
   share of the page whatever it holds. */
.common-table .col-mod {
    width: 22%;
}

.common-table .col-lists {
    width: 5rem;
}

.common-table .col-files {
    width: 40%;
}

.common-table td:first-child {
    overflow-wrap: anywhere;
}

/* Filenames run past 100 characters with a hash and no space, versions can
   be a commit hash. Laid out automatically, the table either ran wider than
   the page or, breaking them anywhere, squeezed Mod and File to a word a
   line: each column gets a share of the width, and text breaks inside it.
   A size or a source breaks at its space only: "nex" over "us" reads worse. */
.archives-table td:not([data-mobile-label="Size"], [data-mobile-label="Source"]) {
    overflow-wrap: anywhere;
}

.archives-table .col-mod {
    width: 22%;
}

.archives-table .col-file {
    width: 26%;
}

.archives-table .col-version {
    width: 6%;
}

.archives-table :is(.col-size, .col-source) {
    width: 8%;
}

.archives-table .col-lists {
    width: 7%;
}

.archives-table .col-folders {
    width: 23%;
}

/* The mod a modlist page linked here for, lifted above the rest. */
.common-table tbody tr.pinned {
    background: var(--blue-tint);
}

/* The NSFW switch at the right of the lists card's heading. */
.nsfw-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.875rem;
}

/* Per game, its name then the pages that read across its lists. */
.game-links {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
}

.game-links-name {
    min-width: 11rem;
    font-weight: 600;
}

/* A modlist's profiles: name, the pages that read them, then its files as
   links. */
.profile-cards {
    margin-bottom: 2rem;
}

.profile-cards .link-row {
    font-size: 0.875rem;
}

.profile-files {
    columns: 2 10rem;
    margin: 0.3rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.8rem;
    line-height: 1.7;
}


/* The lists a game page reads, folded: seventeen titles are a paragraph. */
.lists-followed {
    font-size: 0.875rem;
}

@media (width <= 768px) {
    /* A game's name over its two links, not a row that wraps mid-way. */
    .game-links li {
        margin-bottom: 0.5rem;
    }

    .game-links-name {
        flex-basis: 100%;
        min-width: 0;
    }

    /* The load order's index titles each phone card: Slate's .num would
       push it to the card's right edge, away from the labels below it. */
    .loadorder td.num:first-child {
        text-align: left;
    }
}
