/* Game-mode settings form (module-config.js). Shared by mineworld.space and the Minerode
   dashboard: the same file in mineworld-hosting/web-ui and minerode/site, built on the shared design
   tokens of ds.css. */
.mcf-form { display: grid; gap: var(--s-4, 16px); }
.mcf-title { margin: 0; font-size: var(--text-lg, 1.1rem); }
.mcf-sec { margin: 0; padding: var(--s-3, 12px) var(--s-4, 16px) var(--s-4, 16px); border: 1px solid var(--border); border-radius: var(--r-lg, 10px); background: color-mix(in srgb, var(--panel, transparent) 60%, transparent); min-width: 0; }
.mcf-sec > legend { padding: 0 6px; font-weight: 700; font-size: var(--text-sm, 0.875rem); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.mcf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-3, 12px) var(--s-5, 20px); }
.mcf-field { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 8px 10px; border-radius: var(--r, 8px); border: 1px solid transparent; }
.mcf-field.wide { grid-column: 1 / -1; }
.mcf-field.changed { border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.mcf-field.bad { border-color: color-mix(in srgb, var(--red) 70%, transparent); background: color-mix(in srgb, var(--red) 7%, transparent); }
.mcf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 28px; }
.mcf-label { font-weight: 600; color: var(--ink); margin-right: auto; }
.mcf-when, .mcf-dot { font-size: var(--text-xs, 0.75rem); padding: 1px 8px; border-radius: var(--r-full, 999px); border: 1px solid var(--border); color: var(--ink-2); white-space: nowrap; }
.mcf-when { border-color: color-mix(in srgb, var(--yellow, #e5c84a) 60%, transparent); color: var(--ink); background: color-mix(in srgb, var(--yellow, #e5c84a) 14%, transparent); }
.mcf-dot { border-color: color-mix(in srgb, var(--brand) 60%, transparent); color: var(--ink); }
.mcf-reset { font-size: var(--text-xs, 0.75rem); }
.mcf-ctl { min-width: 0; }
.mcf-hint { margin: 0; font-size: var(--text-sm, 0.875rem); color: var(--ink-2); line-height: 1.45; }
.mcf-range { color: var(--ink-3, var(--ink-2)); white-space: nowrap; }
.mcf-err { margin: 0; font-size: var(--text-sm, 0.875rem); color: var(--red); font-weight: 600; }
.mcf-err[hidden] { display: none; }
.mcf-num { display: inline-flex; align-items: stretch; gap: 4px; }
.mcf-num input { width: 9ch; text-align: center; }
.mcf-num input::-webkit-inner-spin-button, .mcf-num input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mcf-num input { -moz-appearance: textfield; appearance: textfield; }
.mcf-ctl > .input, .mcf-fmt .input { width: 100%; }
.mcf-ctl textarea.input { min-height: 4.5em; resize: vertical; font-family: var(--mono, monospace); }
.mcf-fmt { display: grid; gap: 6px; }
.mcf-fmt .input { font-family: var(--mono, monospace); }
.mcf-codes { display: flex; flex-wrap: wrap; gap: 3px; }
.mcf-code { width: 22px; height: 22px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: var(--c, var(--panel-2)); cursor: pointer; font: 700 11px/1 var(--mono, monospace); color: var(--ink); }
.mcf-code:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.mcf-code.mcf-style { background: var(--panel-2, var(--surface-2)); }
.mcf-preview { display: block; padding: 8px 10px; border-radius: var(--r-sm, 6px); background: #1d1d1d; color: #fff; font: 15px/1.4 var(--pixel, var(--mono, monospace)); text-shadow: 2px 2px 0 #3f3f3f; overflow-wrap: anywhere; min-height: 1.4em; }
.mcf-preview .mcf-empty { color: #777; text-shadow: none; }
.mcf-ctl td .mcf-preview, .mcf-li .mcf-preview { padding: 4px 8px; font-size: 13px; }
.mcf-colour { display: inline-flex; gap: 6px; align-items: center; }
.mcf-colour input[type='color'] { width: 40px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm, 6px); background: none; cursor: pointer; }
.mcf-colour .input { width: 10ch; }
.mcf-list, .mcf-table { display: grid; gap: 8px; }
.mcf-ol { list-style: decimal; margin: 0; padding-left: 2.2em; display: grid; gap: 6px; }
.mcf-li { display: flex; gap: 6px; align-items: flex-start; }
.mcf-li > :first-child { flex: 1; min-width: 0; }
.mcf-li .input { width: 100%; }
.mcf-li::marker { color: var(--ink-3, var(--ink-2)); font-size: var(--text-sm, 0.875rem); }
.mcf-rt { display: inline-flex; gap: 2px; flex: none; }
.mcf-rt .btn { min-width: 30px; padding-inline: 6px; }
.mcf-del:hover { color: var(--red); }
.mcf-add { display: flex; align-items: center; gap: 10px; }
.mcf-add small { color: var(--ink-2); }
.mcf-none { margin: 0; color: var(--ink-2); font-size: var(--text-sm, 0.875rem); }
.mcf-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r, 8px); }
.mcf-table table { width: 100%; border-collapse: collapse; font-size: var(--text-sm, 0.875rem); }
.mcf-table th { text-align: left; padding: 8px; background: color-mix(in srgb, var(--ink) 5%, transparent); vertical-align: bottom; }
.mcf-table th > span { display: block; font-weight: 700; }
.mcf-table th > small { display: block; font-weight: 400; color: var(--ink-2); max-width: 28ch; }
.mcf-table td { padding: 6px 8px; border-top: 1px solid var(--border); vertical-align: middle; }
.mcf-table td .input { width: 100%; min-width: 8ch; }
.mcf-table td .mcf-num input { width: 8ch; }
.mcf-table tr.mcf-dup td { background: color-mix(in srgb, var(--red) 9%, transparent); }
.mcf-tools { width: 1%; white-space: nowrap; }
.mcf-bar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-lg, 10px); background: var(--surface, var(--panel, #222)); box-shadow: var(--sh-2, 0 4px 14px rgba(0, 0, 0, 0.25)); }
.mcf-bar.dirty { border-color: color-mix(in srgb, var(--brand) 60%, transparent); }
.mcf-status { display: grid; gap: 2px; font-size: var(--text-sm, 0.875rem); }
.mcf-status small { color: var(--ink-2); }
.mcf-bad { color: var(--red); }
.mcf-ok { color: var(--green, var(--brand)); font-weight: 600; }
.mcf-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-3, 12px); }
.mcf-modes .chip[aria-pressed='true'] { outline: 2px solid var(--brand); }
@media (max-width: 640px) {
  .mcf-sec { padding: 10px; }
  .mcf-grid { grid-template-columns: 1fr; }
  .mcf-field { padding: 6px 4px; }
  /* Tables become one card per row on phones. */
  .mcf-scroll { border: 0; overflow: visible; }
  .mcf-table table, .mcf-table tbody, .mcf-table tr, .mcf-table td { display: block; width: 100%; }
  .mcf-table thead { display: none; }
  .mcf-table tr { border: 1px solid var(--border); border-radius: var(--r, 8px); padding: 6px; margin-bottom: 8px; }
  .mcf-table td { border: 0; padding: 4px 2px; display: grid; grid-template-columns: 9ch 1fr; gap: 8px; align-items: center; }
  .mcf-table td::before { content: attr(data-col); font-weight: 600; color: var(--ink-2); font-size: var(--text-xs, 0.75rem); }
  .mcf-table td.mcf-tools { width: 100%; display: flex; justify-content: flex-end; }
  .mcf-table td.mcf-tools::before { content: none; }
  .mcf-bar { flex-direction: column; align-items: stretch; }
  .mcf-bar .btn-row { justify-content: flex-end; }
}

/* Mods and modpacks (mods-section.js): apart from the game modes on both sites. */
.mcf-mods { display: grid; gap: var(--s-3, 12px); margin-top: var(--s-5, 20px); padding: var(--s-4, 16px); border: 1px solid var(--border); border-radius: var(--r-lg, 10px); background: color-mix(in srgb, var(--panel, transparent) 60%, transparent); }
.mcf-mods[aria-busy='true'] { opacity: 0.7; pointer-events: none; }
.mcf-mods-top { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; }
.mcf-mods-top > div { flex: 1 1 320px; display: grid; gap: 4px; }
.mcf-total { margin: 0; display: grid; justify-items: end; gap: 2px; text-align: right; }
.mcf-total b { font-size: var(--text-xl, 1.4rem); }
.mcf-total span { font-size: var(--text-sm, 0.875rem); color: var(--ink-2); }
.mcf-sub { margin: var(--s-3, 12px) 0 0; font-size: var(--text-sm, 0.875rem); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.mcf-k { font-weight: 600; color: var(--ink); margin-right: 6px; }
.mcf-tag { font-size: var(--text-xs, 0.75rem); padding: 1px 8px; border-radius: var(--r-full, 999px); border: 1px solid var(--border); color: var(--ink-2); white-space: nowrap; }
.mcf-tag.ok { border-color: color-mix(in srgb, var(--brand) 60%, transparent); color: var(--ink); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.mcf-tag.warn { border-color: color-mix(in srgb, var(--yellow, #e5c84a) 60%, transparent); color: var(--ink); background: color-mix(in srgb, var(--yellow, #e5c84a) 14%, transparent); }
.mcf-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mcf-pack { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px solid var(--border); border-radius: var(--r, 8px); background: var(--surface, transparent); }
.mcf-pack.on { border-color: color-mix(in srgb, var(--brand) 60%, transparent); }
.mcf-pack.planned { opacity: 0.75; }
.mcf-pack-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mcf-pack-h h4 { margin: 0 auto 0 0; font-size: var(--text-md, 1rem); }
.mcf-pack-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.mcf-mem { font-weight: 700; }
.mcf-note { font-style: italic; }
.mcf-mods-list { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: var(--text-sm, 0.875rem); }
.mcf-chip { font-size: var(--text-xs, 0.75rem); padding: 1px 7px; border-radius: var(--r-sm, 6px); border: 1px solid var(--border); color: var(--ink-2); }
.mcf-chip.on { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 60%, transparent); }
.mcf-modlist { display: grid; gap: 8px; }
.mcf-mod { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--r, 8px); background: var(--surface, transparent); }
.mcf-mod.on { border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.mcf-mod.locked { opacity: 0.75; }
.mcf-mod-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.mcf-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 16px; font-size: var(--text-sm, 0.875rem); }
.mcf-facts div { display: grid; gap: 1px; }
.mcf-facts dt { font-weight: 600; color: var(--ink); }
.mcf-facts dd { margin: 0; color: var(--ink-2); }
.mcf-warn { margin: 0; font-size: var(--text-sm, 0.875rem); color: var(--ink-2); padding-left: 8px; border-left: 3px solid color-mix(in srgb, var(--yellow, #e5c84a) 70%, transparent); }
.mcf-set summary { cursor: pointer; font-weight: 600; }
.mcf-set-box { margin-top: 8px; }
@media (max-width: 640px) {
  .mcf-mods { padding: 10px; }
  .mcf-total { justify-items: start; text-align: left; }
  .mcf-mod { flex-direction: column-reverse; }
}
