/* Log-Suche (ACP), views/logsearch.js. Eigene Datei, damit panel.css frei für andere Bereiche bleibt. */

.ls-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.ls-wrap:has(.ls-drawer:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); }

/* Suchleiste */
.ls-bar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 14px; background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.ls-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.ls-bar > .ic { width: 18px; height: 18px; color: var(--tx-3); flex: none; }
.ls-input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; color: var(--tx);
  font: 500 14px/1 var(--f-mono); letter-spacing: 0.01em; }
form.ls-bar .ls-input { border: 0; background: transparent; box-shadow: none; padding: 0; border-radius: 0; }
.ls-input::placeholder { color: var(--tx-4); }

.ls-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ls-tools .spacer { flex: 1; }
.ls-custom { display: inline-flex; align-items: center; gap: 8px; }
.ls-custom[hidden] { display: none; }
.ls-date { height: 34px; background: var(--in); border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--tx);
  padding: 0 8px; font: 500 13px/1 var(--f-mono); color-scheme: dark; }

.ls-help { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--dash); border-radius: var(--r-sm); background: var(--in); }
.ls-help[hidden] { display: none; }
.ls-help p { margin: 0 0 10px; }
.ls-examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.ls-ex { display: flex; gap: 10px; align-items: baseline; text-align: left; background: transparent; border: 1px solid transparent;
  border-radius: var(--r-xs); padding: 5px 8px; color: var(--tx-2); cursor: pointer; font: 13px/1.3 var(--f-body); }
.ls-ex:hover { border-color: var(--line-2); background: var(--s-2); }
.ls-ex code { font: 600 12.5px/1.3 var(--f-mono); color: var(--accent-hi); white-space: nowrap; }

.ls-saved, .ls-cats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ls-saved:not(:empty), .ls-cats:not(:empty) { margin-top: 12px; }
.ls-cats .chip b { font-family: var(--f-mono); font-weight: 600; margin-left: 7px; color: var(--tx-3); }
.ls-label { display: inline-flex; align-items: center; gap: 5px; font: 600 11px/1 var(--f-display); text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--tx-4); margin-right: 4px; }
.ls-label .ic { width: 13px; height: 13px; }
.ls-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--accent-glow); background: var(--accent-wash);
  border-radius: var(--r-xs); overflow: hidden; }
.ls-chip button { background: transparent; border: 0; color: var(--accent-hi); cursor: pointer; font: 600 12.5px/1 var(--f-body); }
.ls-chip-go { padding: 6px 10px; }
.ls-chip-go:hover { background: rgba(143, 191, 230, 0.12); }
.ls-chip .ls-chip-x { padding: 0 6px; border-left: 1px solid var(--accent-glow); display: inline-flex; align-items: center; }
.ls-chip-x .ic { width: 12px; height: 12px; }
.ls-chip .ls-chip-x:hover { color: var(--red-hi); }

.ls-status { margin-top: 12px; min-height: 16px; font-family: var(--f-mono); }
.ls-status.err { color: var(--red-hi); }
.ls-q { padding: 8px 10px; background: var(--in); border: 1px solid var(--line); border-radius: var(--r-xs); overflow-wrap: anywhere; }

/* Tabelle */
.ls-results { border-top: 1px solid var(--line); }
.ls-table td { padding: 8px 14px; font-size: 13.5px; }
.ls-table th { padding: 10px 14px; }
.ls-row { cursor: pointer; }
.ls-row:hover td { background: var(--s-2); }
.ls-row.sel td { background: var(--accent-wash); }
.ls-row.hot td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.ls-row.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.ls-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ls-table td { white-space: nowrap; }
.ls-table td.ls-detail { white-space: normal; min-width: 260px; max-width: 520px; }
.ls-msg { color: var(--tx-2); overflow-wrap: anywhere; }
td.ls-detail > * + * { margin-left: 10px; }
.ls-person { display: inline-flex; align-items: baseline; gap: 6px; }
.ls-src { font: 500 11.5px/1 var(--f-mono); color: var(--tx-4); }

/* anklickbare Werte */
.lsv { display: inline; background: transparent; border: 0; padding: 1px 3px; margin: 0 -3px; border-radius: var(--r-xs);
  color: inherit; font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.lsv:hover { background: var(--accent-wash); color: var(--accent-hi); box-shadow: inset 0 -1px 0 var(--accent-glow); }
.lsv:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lsv.bare { padding: 0; margin: 0; }
.lsv.bare:hover { background: transparent; box-shadow: none; filter: brightness(1.25); }
.lsv.cat { font: 600 12px/1 var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tx-2); }
.lsv.mono { font-family: var(--f-mono); font-size: 12.5px; }
.lsv.amt { font-family: var(--f-mono); color: var(--ok); }
.lsv.item { font-family: var(--f-mono); color: var(--gold); }

/* Stufen */
.tag.ls-sev.sev-0 { color: var(--tx-3); }
.tag.ls-sev.sev-1 { color: var(--ice-hi); border-color: var(--ice-line); background: var(--ice-soft); }
.tag.ls-sev.sev-2 { color: var(--warn); border-color: rgba(245, 184, 61, 0.35); background: var(--warn-soft); }
.tag.ls-sev.sev-3 { color: #ff9a3d; border-color: rgba(255, 154, 61, 0.45); background: rgba(255, 154, 61, 0.12); }
.tag.ls-sev.sev-4 { color: #fff; border-color: var(--red); background: var(--red); }

/* Detail-Leiste */
.ls-drawer { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 28px); display: flex; flex-direction: column;
  background: var(--pane); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.ls-drawer[hidden] { display: none; }
.ls-dhead { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2); font: 600 15px/1 var(--f-head); letter-spacing: 0.04em; }
.ls-dhead .spacer { flex: 1; }
.ls-dbody { padding: 14px 16px 18px; overflow-y: auto; display: grid; gap: 16px; align-content: start; }
.ls-dmsg { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.ls-sec h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font: 600 12px/1 var(--f-display); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--tx-3); }
.ls-sec h3 .ic { width: 14px; height: 14px; }
.ls-sec h3 .btn { margin-left: auto; }
.ls-sec .ev-grid { grid-template-columns: 1fr; }
.ls-people { display: grid; gap: 10px; }
.ls-pcard { border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(0, 0, 0, 0.18); padding: 12px; display: grid; gap: 10px; }
.ls-ptitle { font: 600 11px/1 var(--f-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.ls-pbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-pbtns .btn .ic { width: 13px; height: 13px; }
.ls-pbtns .ls-discord { border-color: rgba(88, 101, 242, 0.5); color: #b3baff; }
.ls-pbtns .ls-discord:hover { background: rgba(88, 101, 242, 0.16); }
.ls-json { margin: 0; max-height: 320px; overflow: auto; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-xs); font: 12px/1.5 var(--f-mono); color: var(--tx-2); white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .ls-wrap:has(.ls-drawer:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .ls-drawer { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); max-height: none; border-radius: 0; }
}
@media (max-width: 720px) {
  .ls-tools .spacer { display: none; }
  .ls-table td { white-space: normal; }
  .ls-table td.ls-detail { grid-column: 1 / -1; max-width: none; min-width: 0; }
  .ls-row.hot td:first-child, .ls-row.sel td:first-child { box-shadow: none; }
  .ls-row.hot { box-shadow: inset 3px 0 0 var(--red); }
  .ls-drawer { bottom: var(--tab-h); }
}
