/* ==========================================================================
   modpack (/modpack/), on top of site.css
   Change colours carry meaning: green added, yellow updated, red removed.
   ========================================================================== */

.paths {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 3rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-soft);
}

.path .actions { margin-top: 1rem; }

.versions { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0.85rem; }

.versions a {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--r);
    color: var(--text);
    text-decoration: none;
}

.versions a:hover { border-color: var(--blue); }
.versions a[aria-current] { border-color: var(--blue); background-color: rgba(94, 161, 255, 0.1); }
.versions-name { font-weight: 600; }
.versions-when { color: var(--muted); font-size: 0.82rem; }

/* "1 → 2 changes": the version range is the heading, "changes" rides along. */
.ver-range { color: var(--text); font-variant-numeric: tabular-nums; }
.ver-arrow { color: var(--muted); font-weight: 400; }
.block-title .count { color: var(--muted); font-weight: 400; font-size: 0.9em; margin-left: 0.2rem; }
#changes-head { font-weight: 600; }
#changes-head > :not(.ver-range) { font-weight: 400; }

/* The diff: the one filled surface on this page, because it holds controls. */
.diff {
    padding: 1.25rem 1.4rem;
    background-color: var(--surface);
    border-radius: 10px;
}

.diff-summary { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin-bottom: 0.6rem; font-size: 0.95rem; }

.changes { list-style: none; }

.change {
    --c: var(--muted);
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0.05rem 1rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--line-soft);
}

.change:first-child { border-top: 0; }
.change:has(.change-pick) { grid-template-columns: 1.25rem 5rem minmax(0, 1fr) auto; }
.change.is-added   { --c: var(--green); }
.change.is-updated { --c: var(--yellow); }
.change.is-removed { --c: var(--red); }

.change-pick { width: 1rem; height: 1rem; align-self: start; margin-top: 0.3rem; accent-color: var(--blue); }

.change-kind { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--c); font-size: 0.9rem; }
.change-kind::before { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; background-color: currentColor; }

.change-name { color: var(--text); min-width: 0; }
.change-name a { color: var(--text); text-decoration: none; }
.change-name a:hover { color: var(--blue); }

.change-ver { font-family: var(--mono); font-size: 0.8rem; color: var(--text-soft); white-space: nowrap; }
.change-arrow { color: var(--muted); font-family: var(--sans); }

.change-files {
    grid-column: 2 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    font-family: var(--mono);
    font-size: 0.76rem;
    min-width: 0;
}

.change:has(.change-pick) .change-files { grid-column: 3 / -1; }
.change-files > * { overflow-wrap: anywhere; }

.file-del { color: var(--red); text-decoration: line-through; text-decoration-thickness: 1px; font-family: var(--mono); font-size: 0.85em; }

.delete-note {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-left: 2px solid var(--red);
    background-color: rgba(255, 110, 94, 0.07);
    border-radius: 0 var(--r) var(--r) 0;
}

.diff .actions { margin-top: 1.25rem; }
.diff > .muted { margin-top: 0.6rem; }

/* --- mods table ----------------------------------------------------------- */
.mods { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

.mods th {
    text-align: left;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--muted);
    padding: 0 1rem 0.55rem 0;
    border-bottom: 1px solid var(--line);
}

.mods td { padding: 0.5rem 1rem 0.5rem 0; border-bottom: 1px solid var(--line-soft); vertical-align: baseline; }
.mods th:last-child, .mods td:last-child { padding-right: 0; }
.mods tbody tr:hover td { background-color: var(--surface); }
.mods-name a { color: var(--text); text-decoration: none; }
.mods-name a:hover { color: var(--blue); }
.mods .mono { white-space: nowrap; }
.mods .small { white-space: normal; overflow-wrap: anywhere; }
.mods .small a { color: var(--muted); text-decoration: none; }
.mods .small a:hover { color: var(--blue); }
.num { text-align: right; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.mods .tag { margin-left: 0.4rem; color: var(--pink); border-color: rgba(255, 94, 160, 0.4); }

.server-only { margin-top: 1rem; color: var(--muted); }
.server-only summary { cursor: pointer; }
.server-only p { margin-top: 0.35rem; }

/* --- releases ------------------------------------------------------------- */
.releases { list-style: none; }
.release { padding: 1.1rem 0 1.3rem; border-top: 1px solid var(--line-soft); scroll-margin-top: 1.5rem; }
.release:first-child { border-top: 0; padding-top: 0; }
.release:target h3 a { color: var(--blue); }

.release-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.9rem; }
.release-head h3 { font-size: 1.25rem; }
.release-head h3 a { color: var(--text); text-decoration: none; }
.release-head .tag { color: var(--green); border-color: rgba(94, 255, 108, 0.4); }
.release-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-size: 0.92rem; }
.release-notes { margin-top: 0.4rem; max-width: var(--measure); white-space: pre-wrap; }
.release .muted { margin-top: 0.4rem; }
.changes-compact { margin-top: 0.4rem; }
.changes-compact .change { padding: 0.35rem 0; font-size: 0.95rem; }

/* --- narrow --------------------------------------------------------------- */
@media (max-width: 900px) {
    .paths { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    /* One column of text: kind, name, version, files stacked; checkbox on the left. */
    .change { grid-template-columns: minmax(0, 1fr); }
    .change:has(.change-pick) { grid-template-columns: 1.25rem minmax(0, 1fr); }
    .change > :not(.change-pick) { grid-column: 1 / -1; }
    .change:has(.change-pick) > :not(.change-pick) { grid-column: 2; }
    .change:has(.change-pick) .change-pick { grid-row: 1 / span 4; }
    .change-ver { white-space: normal; overflow-wrap: anywhere; }
    .hide-sm { display: none; }
    .release-links { margin-left: 0; width: 100%; }
    .diff { padding: 1rem; }
}
