/* Styles for views/overview.js only (Oversikt, Spillere, player profile). All classes start with .ov */

/* ------------------------------------------------------------------ Oversikt */
.ov-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: var(--s3); }
.ov-stats .stat-sub .btn.sm { height: 22px; padding: 0 8px; font-size: var(--fs-xs); }
.ov-stats .stat-sub .ellipsis { min-width: 0; max-width: 100%; }
.ov-attn { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s4); }
.ov-attn a.pill { text-decoration: none; }
.ov-attn a.pill:hover { filter: brightness(1.15); }
.ov-col { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.ov-col > .card, .ov-col > .panel { margin-bottom: 0; }

/* a quiet count after a card title */
.ov-count { font-size: var(--fs-sm); color: var(--text-3); font-variant-numeric: tabular-nums; }

/* "Alle >" link in card heads */
.ov-more { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.ov-more:hover { color: var(--text); text-decoration: none; }
.ov-more .icon { width: 14px; height: 14px; }

/* compact lists (reports, flagged chat, punishments) */
.ov-list { list-style: none; margin: 0; padding: 0; }
.ov-item { display: flex; align-items: flex-start; gap: var(--s3); padding: 8px var(--s4); border-top: 1px solid var(--line); min-width: 0; }
.ov-item:first-child { border-top: 0; }
.ov-item.clickable { cursor: pointer; }
.ov-item.clickable:hover { background: var(--control); }
.ov-item-main { flex: 1; min-width: 0; }
.ov-item-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; font-size: var(--fs); }
.ov-item-sub { font-size: var(--fs-sm); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.ov-item-sub .chat-line { white-space: nowrap; }
.ov-item-side { font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; padding-top: 2px; }

/* server facts */
.ov-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: var(--fs); align-items: center; }
.ov-kv dt { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.ov-kv dt .icon { color: var(--text-3); }
.ov-kv dd { margin: 0; min-width: 0; font-variant-numeric: tabular-nums; }
.ov-mem { display: flex; align-items: center; gap: var(--s2); }
.ov-mem .meter { flex: 1; min-width: 60px; }

/* ------------------------------------------------------------------ Spillere */
.ov-filter { padding: 10px var(--s4); border-bottom: 1px solid var(--line); }
.ov-filter .filter-bar .input-icon { max-width: 360px; }
.ov-ico { display: inline-flex; vertical-align: middle; margin-left: 6px; color: var(--gold); }

/* ------------------------------------------------------------------ player profile */
.ov-profile .back { margin-bottom: var(--s2); }
.ov-hero { padding: var(--s4); margin-bottom: var(--s4); }
.ov-hero-top { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.ov-hero-top > img.head.big { width: 56px; height: 56px; border-radius: var(--r); flex: 0 0 auto; }
.ov-hero-id { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ov-name { font-size: var(--fs-xl); font-weight: 650; line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.ov-admin { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: flex-end; }
.ov-admin-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--text-2); }
.ov-admin-field > span { display: inline-flex; align-items: center; gap: 4px; }
.ov-admin-field select { min-width: 130px; }
.ov-num { width: 90px; }

.ov-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s3) var(--s4);
  margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line);
}
.ov-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ov-fact-label { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 500; }
.ov-fact-value { font-size: var(--fs-md); font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ov-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.ov-sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 4px; }

.ov-tabs { overflow-x: auto; scrollbar-width: none; }
.ov-tabs::-webkit-scrollbar { display: none; }
.ov-tabs .tabs { flex-wrap: nowrap; }
.ov-tabs .tabs > button { white-space: nowrap; }
.ov-pane > .grid, .ov-pane > div > .grid { margin-bottom: 0; }

.ov-note-form { display: flex; gap: var(--s2); align-items: flex-end; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.ov-note-form textarea { flex: 1; min-height: 38px; resize: vertical; }

.ov-mini { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ov-job { display: inline-flex; align-items: center; gap: 6px; }
.ov-job .icon { color: var(--text-2); }
.ov-meter { min-width: 90px; max-width: 200px; }
.pill .icon-btn.ov-pill-x { width: 18px; height: 18px; margin: -2px -4px -2px 2px; color: inherit; background: transparent; border: 0; }
.pill .icon-btn.ov-pill-x .icon { width: 12px; height: 12px; }
.ov-none { margin: 0; }
.ov-casino .sec-head { margin-top: 0; }
.ov-sub-tip { display: flex; align-items: center; gap: 4px; margin: -4px 0 var(--s2); font-size: var(--fs-sm); color: var(--text-3); }

.ov-qa { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ov-qa dt { font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; }
.ov-qa dd { margin: 0 0 var(--s2); white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 639px) {
  .ov-hero { padding: var(--s3); }
  .ov-hero-top { gap: var(--s3); }
  .ov-hero-top > img.head.big { width: 44px; height: 44px; }
  .ov-admin { width: 100%; }
  .ov-admin-field { flex: 1 1 140px; }
  .ov-admin-field select, .ov-num { width: 100%; }
  .ov-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-tools .btn.sm { flex: 1 1 auto; justify-content: center; }
  .ov-tools .spacer, .ov-sep { display: none; }
  .ov-filter { padding: var(--s2) var(--s3); }
  .ov-filter .filter-bar .input-icon { flex-basis: 100%; max-width: none; }
  .ov-item { padding: 8px var(--s3); }
  .ov-note-form { flex-direction: column; align-items: stretch; }
}

/* sr-only labels inside a sideways-scrolling table must not widen the page */
.ov .table-wrap, .ov-players .table-wrap, .ov-profile .table-wrap { position: relative; }

/* ---------------------------------------------------------------- the profile's casino tab (won / lost: a blue-red diverging pair) */
.ov-casino2 { --ov-win: #3987e5; --ov-loss: #e66767; display: flex; flex-direction: column; gap: var(--s4); }
:root[data-theme="light"] .ov-casino2 { --ov-win: #2a78d6; --ov-loss: #e34948; }
.ov-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.ov-tile { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card-2); min-width: 0; }
.ov-tile-l { font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.ov-tile-v { font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ov-tile-s { font-size: var(--fs-sm); color: var(--text-3); }
.ov-net { display: inline-flex; align-items: center; gap: 6px; }
.ov-net .icon { color: var(--text-3); }
.ov-meter { height: 6px; margin-top: 8px; border-radius: 3px; background: var(--control); overflow: hidden; }
.ov-meter > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.ov-meter.high > span { background: var(--warn); }
.ov-meter.full > span { background: var(--danger); }
.ov-block-head { display: flex; align-items: center; gap: var(--s3); justify-content: space-between; flex-wrap: wrap; }
.ov-block-head .sec-head { margin: 0; }
.ov-legend { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); }
.ov-key { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.ov-key.win { background: var(--ov-win); }
.ov-key.loss { background: var(--ov-loss); }
.ov-chartwrap { position: relative; margin-top: var(--s2); }
.ov-daychart { width: 100%; height: auto; display: block; }
.ov-daychart .ov-base { stroke: var(--line-strong); stroke-width: 1; }
.ov-daychart .ov-win { fill: var(--ov-win); }
.ov-daychart .ov-loss { fill: var(--ov-loss); }
.ov-daychart .ov-hit { fill: transparent; }
.ov-daychart .ov-hit.on { fill: color-mix(in srgb, var(--text) 6%, transparent); }
.ov-daychart .ov-axis { fill: var(--text-3); font-size: 12px; }
.ov-charttip {
  position: absolute; top: -6px; transform: translate(-50%, -100%); padding: 6px 10px; border-radius: var(--r-sm); pointer-events: none;
  background: var(--bg-raised); border: 1px solid var(--border); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); white-space: nowrap;
  display: flex; flex-direction: column;
}
.ov-charttip[hidden] { display: none; }
.ov-charttip b::first-letter { text-transform: uppercase; }
.ov-asdata { margin-top: 6px; font-size: var(--fs-sm); }
.ov-asdata > summary { cursor: pointer; color: var(--text-3); }
.ov-games { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.ov-games li { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(80px, 200px) 64px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ov-games li:first-child { border-top: 0; }
.ov-game { font-weight: 500; }
.ov-game-n { color: var(--text-3); font-size: var(--fs-sm); }
.ov-div { position: relative; height: 10px; }
.ov-div::before { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-strong); }
.ov-div-bar { position: absolute; top: 0; height: 100%; }
.ov-div-bar.win { left: 50%; background: var(--ov-win); border-radius: 0 3px 3px 0; }
.ov-div-bar.loss { right: 50%; background: var(--ov-loss); border-radius: 3px 0 0 3px; }
.ov-game-r { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 899px) {
  .ov-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .ov-games li { grid-template-columns: minmax(0, 1fr) 64px; }
  .ov-games .ov-game-n { grid-column: 1; }
  .ov-games .ov-div { grid-column: 1 / -1; }
}
