/* v0.35 administrator: "Veikalu cenas" (weekly shop price refresh). Colours come from the shared tokens in styles.css,
   so the dark theme follows automatically. No inline styles: progress bars are <progress> elements. */

.pr-sheet { display: flex; flex-direction: column; gap: 14px; }
.pr-sheet [data-pr-body] { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.pr-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius); background: var(--elevated); }
.pr-card[data-status="ok"] { border-left-color: var(--verified); }
.pr-card[data-status="partial"], .pr-card[data-status="running"] { border-left-color: var(--suspected); }
.pr-card[data-status="failed"], .pr-card[data-status="stopped"] { border-left-color: var(--compromised); }
.pr-k { font-size: .78rem; color: var(--ink-2); }
.pr-v { font-size: 1.02rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pr-card .small { overflow-wrap: anywhere; }

.pr-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: .75rem;
  font-weight: 600; white-space: nowrap; background: var(--canvas-alt); color: var(--ink-2); }
.pr-badge[data-status="ok"] { background: var(--verified-light); color: var(--verified); }
.pr-badge[data-status="partial"], .pr-badge[data-status="running"] { background: var(--suspected-light); color: var(--suspected); }
.pr-badge[data-status="failed"], .pr-badge[data-status="stopped"] { background: var(--compromised-light); color: var(--compromised); }

.pr-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin: 0; }
.pr-counts > div { min-width: 0; padding: 8px 10px; border-radius: var(--radius); background: var(--canvas-alt); }
.pr-counts dt { font-size: .75rem; color: var(--ink-2); line-height: 1.25; }
.pr-counts dd { margin: 3px 0 0; font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pr-counts .pr-warn dd { color: var(--suspected); }
.pr-reasons { margin: 0; overflow-wrap: anywhere; }

.pr-h3 { margin: 2px 0 0; font-size: .9rem; }
.pr-shops { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.pr-shops li { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.pr-shops li .pr-bar { margin: 2px 0; }
.pr-lidl { background: var(--canvas-alt); }

.pr-bar { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; border: 0; border-radius: 999px;
  background: var(--line); color: var(--blue); overflow: hidden; }
.pr-bar::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
.pr-bar::-webkit-progress-value { background: var(--blue); border-radius: 999px; }
.pr-bar::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.pr-shops .pr-bar { color: var(--verified); }
.pr-shops .pr-bar::-webkit-progress-value { background: var(--verified); }
.pr-shops .pr-bar::-moz-progress-bar { background: var(--verified); }

.pr-run { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pr-run .actions { margin: 0; }
.pr-run p { margin: 0; }
.pr-progress { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.pr-progress[hidden] { display: none; }
[data-pr-status]:empty { display: none; }

.pr-history summary { cursor: pointer; font-size: .85rem; color: var(--ink-2); }
.pr-history ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pr-history li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .pr-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-run .actions button { width: 100%; justify-content: center; }
}
