/* Stark Gate R1: Logs (the filter bar, the activity chart, lines that open, the drawer of a line).
   Tokens and the base components are gate.css's and r1.css's; every class here starts with lg-. */

/* 1. The filter bar: one row of labelled fields across the board ---------------------------------------------------- */
.lg-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 10px}
.lg-f{display:grid;gap:4px;flex:1 1 132px;min-width:0}
.lg-f.d{flex:0 1 142px}
.lg-f .input{height:32px;padding:4px 8px;border-radius:8px;font-size:12.5px;line-height:1.3}
.lg-f select.input{padding-right:4px;text-overflow:ellipsis}
.lg-date{-webkit-appearance:none;appearance:none}
.lg-date::-webkit-date-and-time-value{text-align:left}
/* the place of Clear is kept, so the fields don't move when the first filter is set */
.lg-clear{display:flex;align-items:center;flex:0 0 78px;min-height:32px}
.lg-clear .sp{width:100%;justify-content:center;padding:6px 10px}

/* 2. The activity chart: a column per day, went through under refused ------------------------------------------------ */
.lg-chart .card-h{flex-wrap:wrap;row-gap:6px}
.lg-chart .card-hm{flex:1 1 220px}
.lg-leg{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:2px 14px;margin-left:auto;font-size:11.5px;line-height:1.5;color:var(--dim)}
.lg-when{font:500 11px/1.5 var(--mono);color:var(--ink);white-space:nowrap}
.lg-k{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.lg-k i{width:9px;height:9px;border-radius:2px;background:var(--accent);flex:0 0 auto}
.lg-k.bad i{background:var(--rose)}
.lg-k b{font:500 12px/1.5 var(--mono);font-variant-numeric:tabular-nums;text-align:right;color:var(--ink)}
.lg-plot{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:8px}
.lg-y{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;min-width:14px;font:10px/1 var(--mono);color:var(--mute)}
.lg-y span:first-child{margin-top:-4px}
.lg-y span:last-child{margin-bottom:-4px}
.lg-bars{position:relative;display:flex;align-items:stretch;height:124px;border-top:1px solid var(--line);border-bottom:1px solid var(--border-2)}
.lg-day{flex:1 1 0;min-width:0;height:100%;padding:0 1px;border:0;border-radius:5px 5px 0 0;background:transparent;display:flex;justify-content:center;cursor:pointer;transition:background-color .12s}
@media (hover:hover){.lg-day:hover{background:var(--hover)}}
.lg-day[aria-pressed="true"]{background:var(--sel)}
.lg-day:focus-visible{outline-offset:-2px}
.lg-col{display:flex;flex-direction:column;justify-content:flex-end;gap:2px;width:100%;max-width:24px;height:100%}
.lg-b{display:block;flex:0 0 auto;min-height:2px;background:var(--accent);transition:opacity .12s}
.lg-b.bad{background:var(--rose)}
.lg-col > .lg-b:first-child{border-radius:4px 4px 0 0}
/* with a day or a range chosen, the other days step back */
.lg-bars.sel .lg-day:not([aria-pressed="true"]) .lg-b{opacity:.36}
.lg-none{position:absolute;inset:0;display:grid;place-items:center;margin:0;font-size:12.5px;color:var(--mute)}
.lg-x{grid-column:2;position:relative;height:16px;margin-top:4px;font:10px/16px var(--mono);color:var(--mute)}
.lg-x span{position:absolute;top:0;white-space:nowrap}
.lg-x0{left:0}
.lg-x1{transform:translateX(-50%)}
.lg-x2{right:0}
.lg-wait{display:flex;align-items:center;height:144px}
.lg-wait .status-line{margin:0}
/* what is on its way: the picture before it stays, stepped back, so nothing jumps */
.lg-chart.lg-stale .lg-plot,.lg-chart.lg-stale .lg-leg,div.lg-stale{opacity:.5;transition:opacity .12s}
div.lg-stale{pointer-events:none}

/* 3. The table: a line opens its details ---------------------------------------------------------------------------- */
.lg-row-open{border:0;background:none;padding:0;color:inherit;font:inherit;text-align:left;cursor:pointer}
.lg-row-open:hover,.t tr.click:hover .lg-row-open{text-decoration:underline;text-decoration-color:var(--border-2);text-underline-offset:2px}
.lg-t th.lg-go,.lg-t td.lg-go{width:20px;padding-left:0;padding-right:2px;text-align:right;color:var(--border-2)}
.lg-t td.lg-go{vertical-align:middle}
.lg-go .i{display:inline-block;vertical-align:middle}
.lg-t tr.click:hover .lg-go{color:var(--dim)}

/* 4. The drawer of a line, and the short lists of lines (its other events) ----------------------------------------- */
.sq.big.lg-sq-bad{background:var(--bad-bg);color:var(--rose)}
.lg-back{margin:0 0 12px}
.lg-back .link{display:inline-flex;align-items:center;gap:4px;font-size:12.5px}
.lg-back .i{transform:rotate(180deg)}
.lg-sub{display:block;font-size:11px;line-height:1.45;color:var(--mute);overflow-wrap:anywhere}
.lg-person{margin-top:6px}
.lg-lines{display:grid;gap:6px;font-size:12.5px;line-height:1.45;color:var(--ink)}
.lg-lines li{overflow-wrap:anywhere}
.lg-kvs{margin:0}
.lg-kv{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:2px 12px;padding:6px 0;border-top:1px solid var(--line);font-size:12.5px;line-height:1.45}
.lg-kv:first-child{border-top:0;padding-top:0}
.lg-kv:last-child{padding-bottom:0}
.lg-kv dt{color:var(--dim)}
.lg-kv dd{margin:0;color:var(--ink);overflow-wrap:anywhere}
.lg-evs{display:grid;margin:0 -6px}
.lg-evs li + li{border-top:1px solid var(--line)}
.lg-ev{display:flex;align-items:flex-start;gap:10px;width:100%;padding:7px 6px;border:0;border-radius:8px;background:transparent;color:var(--ink);font:inherit;text-align:left}
button.lg-ev{cursor:pointer;transition:background-color .12s}
button.lg-ev:hover{background:var(--surface)}
button.lg-ev:focus-visible{outline-offset:-2px}
.lg-ev-t{flex:0 0 104px;font:11px/1.65 var(--mono);color:var(--mute);white-space:nowrap}
.lg-ev-m{flex:1 1 auto;min-width:0}
.lg-ev-w{display:block;font-size:12.5px;line-height:1.45}
.lg-ev-s{display:block;font-size:11px;line-height:1.45;color:var(--mute);overflow-wrap:anywhere}
.lg-ev .badge{flex:0 0 auto;margin-top:1px}
.lg-all{margin:10px 0 0;font-size:12.5px}

@media (max-width:600px){
  /* the fields pair up: two columns, From beside To, Clear on its own line when there is something to clear */
  .lg-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .lg-f .input{height:40px;font-size:16px}
  .lg-f.wide,.lg-clear{grid-column:1/-1}
  .lg-clear{min-height:0;justify-content:flex-end}
  .lg-clear .sp{width:auto;padding:7px 14px;font-size:12.5px}
  .lg-clear:empty{display:none}
  /* thirty thin bars inside the card */
  .lg-bars{height:104px}
  .lg-wait{height:124px}
  .lg-leg{justify-content:flex-start;margin-left:0;flex:1 0 100%}
  /* the table fits the card: the person takes a set share, long addresses wrap, the result keeps its width */
  .lg-t th,.lg-t td{padding-left:6px;padding-right:6px}
  .lg-t .lg-who{width:40%}
  .lg-t.opens .lg-who{width:50%}
  .lg-t td.lg-who,.lg-t td.lg-what{overflow-wrap:anywhere}
  .lg-t .lg-res{width:1%;white-space:nowrap}
  .lg-t th.lg-go,.lg-t td.lg-go{width:14px;padding-left:0;padding-right:0}
}
