/* Minecraft Server Startup Flags Generator (startup-flags.html). Loaded after tools.css; uses the site tokens. */

.sf-tool {
  --sf-heap: var(--red-500);
  --sf-jvm: #c98a00;
  --sf-free: var(--rule-paper);
}
@media (prefers-color-scheme: dark) { .sf-tool { --sf-jvm: #e0a52a; } }

.sf-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sf-tool .trow > .tf { flex: 1 1 150px; }
.sf-tool .trow > .tf.sf-mb { flex: 0 1 150px; }
.sf-actions { margin-top: 14px; align-items: center; }
.tool .sf-actions select { width: auto; max-width: 100%; padding: 6px 10px; font-size: 0.84rem; }
.sf-first { margin: -6px 0 12px; }
.sf-tool .tf > .seg, .sf-tool #gc, .sf-tool #outtab { max-width: 100%; }
.sf-tool #javanote { margin-top: 12px; }
.sf-tool #javanote a, .sf-tool .note a, .sf-explain a, .sf-issues a { color: var(--accent); }
.tcard > h2 small#memsum { text-transform: none; }

/* memory */
.sf-tool .tf > span label { font: inherit; }
.sf-tool .tf > span small#memgbv { font-family: var(--mono); font-weight: 700; color: var(--on-paper); font-size: 0.86rem; }
.sf-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; cursor: pointer; padding: 6px 0; min-height: 38px; }
.sf-check input { width: 18px; height: 18px; flex: none; accent-color: var(--red-500); }
.sf-check.off { opacity: 0.55; cursor: default; }
.sf-helper { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule-paper); }
.sf-helper h3 { margin: 0 0 6px; font-size: 0.98rem; font-weight: 800; }
.sf-helper .sf-first { margin: 0 0 12px; }
#helperout { margin-top: 14px; }
.sf-bar { position: relative; display: flex; height: 18px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule-paper); }
.sf-bar i { display: block; height: 100%; flex: none; }
.sf-bar i.heap, .sf-legend i.heap { background: var(--sf-heap); }
.sf-bar i.jvm, .sf-legend i.jvm { background: repeating-linear-gradient(135deg, var(--sf-jvm) 0 5px, color-mix(in srgb, var(--sf-jvm) 55%, transparent) 5px 10px); }
.sf-bar i.free { background: transparent; }
.sf-bar b.limit { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; background: var(--on-paper); }
.sf-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 10px; font-size: 0.8rem; color: var(--on-paper-soft); }
.sf-legend .k { display: inline-flex; align-items: center; gap: 6px; }
.sf-legend i { display: inline-block; width: 14px; height: 10px; }
.sf-legend i.lim { width: 3px; height: 14px; background: var(--on-paper); }
.sf-sug { margin: 10px 0 8px; font-size: 0.92rem; }
.sf-sug b { font-family: var(--mono); }

/* gc and options */
.sf-large { margin-top: 14px; }
#gcnote { margin-top: 12px; }
#gcnote .thint { margin: 8px 0 0; }
#concgc-f { margin-top: 14px; }
.sf-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; margin: 4px 0 10px; }
.sf-restart { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.sf-checks .tf.sf-delay { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.sf-checks .tf.sf-delay > span { font-weight: 600; font-size: 0.84rem; color: var(--on-paper-soft); }
.tool .sf-checks .tf.sf-delay input { width: 84px; padding: 6px 8px; }
#optnotes .note, #optnotes .thint { margin: 8px 0 0; }
#runf { margin-bottom: 4px; }
#runf .tf { margin-bottom: 12px; }
.sf-extra { margin-top: 14px; }

/* output */
#outtab { margin-bottom: 12px; }
.sf-ptero { margin-bottom: 12px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--rule-paper); }
.sf-ptero .tf { margin-bottom: 8px; }
.sf-ptero .trow { align-items: center; }
.sf-tool .out.tall pre { max-height: 360px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sf-outnote .thint { margin: 10px 0 0; }
.sf-outnote code, .tool .sf-explain code, .sf-issues code { overflow-wrap: anywhere; }

/* explanations */
.sf-explain { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow-y: auto; }
.sf-explain li { padding: 9px 0; border-top: 1px solid var(--rule-paper); }
.sf-explain li:first-child { border-top: 0; padding-top: 0; }
.tool .sf-explain li > code { display: inline-block; max-width: 100%; font-size: 0.8rem; font-weight: 700; padding: 2px 6px; }
.sf-explain li.own > code { box-shadow: inset 0 0 0 1px var(--sf-jvm); }
.sf-explain p { margin: 4px 0 0; font-size: 0.86rem; line-height: 1.45; color: var(--on-paper-soft); }

/* checker */
#imp { min-height: 7em; }
#impout { margin-top: 14px; }
#impout > .note { margin-bottom: 12px; }
.sf-det { margin-bottom: 12px; }
.sf-det th { width: 30%; text-transform: none; letter-spacing: 0; font-family: inherit; font-size: 0.84rem; font-weight: 700; color: var(--on-paper); vertical-align: top; }
.sf-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sf-issues li { padding: 8px 10px; background: var(--paper-2); box-shadow: inset 3px 0 0 var(--on-paper-soft); min-width: 0; }
.sf-issues li.bad { box-shadow: inset 3px 0 0 var(--red-500); }
.sf-issues li.warn { box-shadow: inset 3px 0 0 #c98a00; }
.sf-issues .sev { display: inline-block; margin-right: 8px; font-family: var(--sans); font-variant-numeric: tabular-nums; font-weight: 650; font-stretch: 112%; font-size: 0.78rem; letter-spacing: 0; color: var(--on-paper-soft); }
.sf-issues li.bad .sev { color: var(--accent); }
.tool .sf-issues li code { font-size: 0.8rem; }
.sf-issues p { margin: 4px 0 0; font-size: 0.86rem; line-height: 1.45; }

@media (max-width: 900px) {
  .sf-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .sf-tool .trow > .tf.sf-mb { flex: 1 1 130px; }
  .seg button { padding: 7px 10px; font-size: 0.84rem; }
}
.sf-tool .out pre .nw { white-space: nowrap; }
