@charset "UTF-8";
/* Issue #314 -- shared segmented-navigation header (fragments/nav.html) + settings-overlay modal
 * (fragments/settings-overlay.html), the judge-per-page-context-budget's overlay presentation.
 *
 * Ported STRUCTURE/LAYOUT 1:1 from the Challenger's verbindliches Mockup ("Variante 2" -- the
 * .nav-seg segmented control, /home/agent/work/design-314/nav-settings-mockup.html) -- but COLORS
 * map onto THIS app's existing board.css token system (:root in board.css), never the mockup's own
 * placeholder palette (#46a7c2 etc. -- deliberately not reused, see PR description/challenger
 * auflage). No second :root/token set is declared here; every color below is var(--flow) etc.,
 * read off board.css, which this file's <link> always loads alongside (fragments/head.html /
 * cluster.html's own head).
 *
 * Active-segment styling mirrors board.css's existing .pipeline-sort-toggle a.active idiom
 * (border-color: var(--flow) + faint #2f9bff14 fill) rather than the mockup's --surface-2 grey
 * fill, per the same fidelity auflage.
 *
 * Loaded same-origin via <link rel="stylesheet" th:href="@{/css/nav.settings.css}"> -- required for
 * SecurityConfig's CSP (style-src 'self', no unsafe-inline, ADR-0020) -- no inline <style> anywhere.
 */

/* ---- topbar / brand / nav-seg / gear ------------------------------------------------------------ */
.topbar {
  display: flex; align-items: center; gap: 20px; padding: 0 18px; height: 52px;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--panel), #10161e);
}
.brand { display: flex; align-items: baseline; gap: 7px; font-weight: 600; letter-spacing: .2px; flex: none; color: var(--ink); }
.brand .dot { color: var(--flow); }
.brand .sub { color: var(--muted); font-weight: 500; font-size: .82rem; }
.navslot { display: flex; align-items: center; min-height: 52px; }
.spacer { flex: 1; }

.iconbtn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
  transition: .15s; flex: none; text-decoration: none;
}
.iconbtn:hover { color: var(--ink); background: var(--panel2); }
.iconbtn.gear.active { color: var(--flow); border-color: var(--flow-dim); background: #2f9bff14; }
.iconbtn svg { width: 19px; height: 19px; }

.nav-seg {
  display: inline-flex; padding: 3px; gap: 2px; background: var(--ground); border: 1px solid var(--line);
  border-radius: 9px;
}
.nav-seg a {
  display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: .85rem; padding: 6px 13px; border-radius: 7px; cursor: pointer; transition: .14s;
  text-decoration: none;
}
.nav-seg a .g { width: 15px; height: 15px; }
.nav-seg a:hover { color: var(--ink); }
.nav-seg a.active { border: 1px solid var(--flow); background: #2f9bff14; color: var(--ink); }

/* ---- settings overlay ----------------------------------------------------------------------------- */
.scrim {
  position: fixed; inset: 0; background: rgba(6, 9, 13, .64); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px; z-index: 1000; opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(92vw, 462px); max-height: 90vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .6);
  transform: translateY(8px) scale(.985); transition: transform .2s ease; overflow: hidden;
}
.scrim.open .modal { transform: none; }
.m-head { flex: none; display: flex; align-items: flex-start; gap: 13px; padding: 19px 19px 13px; }
.m-head .ico {
  width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: #2f9bff14; border: 1px solid var(--flow-dim); color: var(--flow);
}
.m-head .ico svg { width: 18px; height: 18px; }
.m-title { margin: 0; font-size: 1.1rem; font-weight: 600; text-wrap: balance; color: var(--ink); }
.m-sub { margin: 3px 0 0; font-size: .81rem; color: var(--muted); max-width: 34ch; }
.x { margin-left: auto; flex: none; }
.m-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 19px 17px; display: flex; flex-direction: column; gap: 17px; }
.now { display: flex; align-items: center; gap: 9px; font-size: .8rem; color: var(--muted); }
.chip {
  font-family: var(--mono); font-size: .73rem; padding: 3px 9px; border-radius: 999px;
  background: var(--panel2); border: 1px solid var(--line); color: var(--ink);
}
.chip.on { border-color: var(--flow-dim); color: var(--flow); }
.field { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ground); overflow: hidden; }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; user-select: none; }
.toggle-row .t-txt { flex: 1; }
.toggle-row .t-lab { font-size: .9rem; font-weight: 500; color: var(--ink); }
.toggle-row .t-help { font-size: .73rem; color: var(--faint); margin-top: 2px; }
.switch { width: 40px; height: 23px; border-radius: 999px; background: var(--line); flex: none; position: relative; transition: .18s; }
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--ink); transition: .18s;
}
.switch.on { background: var(--flow); }
.switch.on::after { left: 19px; background: var(--ground); }
.num-row { border-top: 1px solid var(--line-soft); padding: 13px 14px; transition: opacity .18s; }
.num-row.disabled { opacity: .36; pointer-events: none; }
.num-lab { display: block; font-size: .64rem; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.num-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--ground); overflow: hidden; }
.num-input:focus-within { border-color: var(--flow-dim); box-shadow: 0 0 0 3px #2f9bff1f; }
.num-input input {
  flex: 1; background: transparent; border: 0; color: var(--ink); font-family: var(--mono); font-size: 1rem;
  font-variant-numeric: tabular-nums; padding: 10px 12px; outline: none; min-width: 0;
}
.num-input .unit { padding: 0 13px; font-size: .78rem; color: var(--faint); border-left: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; }
.note { display: flex; gap: 9px; font-size: .77rem; color: var(--muted); line-height: 1.45; }
.note .bar { flex: none; width: 3px; border-radius: 2px; background: var(--mid); opacity: .75; }
.m-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 19px; border-top: 1px solid var(--line); background: var(--panel); }
.m-foot .grow { flex: 1; }
.btn { font: inherit; font-size: .86rem; font-weight: 500; padding: 9px 16px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: .15s; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn.ghost:hover { color: var(--ink); border-color: var(--faint); }
.btn.primary { background: var(--flow); color: var(--ground); font-weight: 600; }
.btn.primary:hover { background: #57adff; }
.btn:focus-visible, .iconbtn:focus-visible, .toggle-row:focus-visible { outline: 2px solid var(--flow); outline-offset: 2px; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(14px);
  background: var(--panel2); border: 1px solid var(--flow-dim); color: var(--ink); font-size: .85rem;
  padding: 10px 16px; border-radius: 9px; display: flex; align-items: center; gap: 9px; z-index: 1001;
  opacity: 0; pointer-events: none; transition: .22s;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast .tick { color: var(--flow); font-weight: 700; }

/* ---- Issue #372/#373 (PR-A) -- Analyse-Anbieter section, second section in the same gear overlay -- */
.prov-section { border-top: 1px solid var(--line); gap: 14px; }
.prov-title { font-size: .92rem; font-weight: 600; color: var(--ink); }
.prov-select {
  width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
  font: inherit; font-size: .86rem; padding: 9px 11px;
}
.prov-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow-y: auto; }
.prov-list li {
  display: flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 10px; font-size: .82rem; color: var(--ink);
}
.prov-list .prov-entry-label { flex: 1; font-family: var(--mono); }
.prov-add-row { display: flex; gap: 8px; margin-top: 8px; }
.prov-add-row .prov-select { flex: none; width: 110px; }
.prov-add-row input { flex: 1; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; font-size: .86rem; padding: 9px 11px; }
.prov-warn { color: #e0a63d; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* phone (verbatim breakpoint from the mockup) */
@media (max-width: 640px) {
  .topbar { gap: 9px; padding: 0 10px; }
  .brand .sub { display: none; }
  .spacer { display: none; }
  .navslot { flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .navslot::-webkit-scrollbar { display: none; }
  .nav-seg { flex: none; }
}
