/* Widget osadzany na innych stronach (w iframe) */

html, body { background: transparent; }
body { padding: 1px; overflow: hidden; }

.box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  color: var(--text);
}

.box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border-bottom: 1px solid var(--line);
}
.box-title { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 800; font-size: 15px; }
.box-title span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { flex: none; width: 22px; height: 22px; border-radius: 4px; background: url(favicon.svg) center / cover; image-rendering: pixelated; }
.box-head .live { flex: none; letter-spacing: .02em; font-size: 12px; }

.rows { display: flex; flex-direction: column; }

.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }

.row-id { min-width: 0; }
.row-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.row-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-addr { margin-top: 1px; color: var(--muted); font: 12px var(--code); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.row-right { display: flex; align-items: center; gap: 12px; }
.row-count { text-align: right; min-width: 74px; }
.row-count strong { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.row-count small { color: var(--muted); font-size: 11px; }
.row-count .bar { margin-top: 4px; height: 4px; }
.row-count.off strong { color: var(--red); font-size: 13px; }

.row .motd {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 18px;
  border-radius: 6px;
}

.row .copy-btn { height: 32px; padding: 0 10px; }

.box-empty { padding: 24px 16px; text-align: center; color: var(--muted); }

.box-foot { padding: 9px 16px; border-top: 1px solid var(--line); background: var(--bg-2); text-align: center; font-size: 12px; }
.box-foot a { color: var(--muted); text-decoration: none; }
.box-foot a:hover { color: var(--green); }

/* wariant kompaktowy */
.compact .row { padding: 9px 14px; gap: 2px 12px; }
.compact .row-addr { display: none; }
.compact .row-count .bar { display: none; }

@media (max-width: 340px) {
  .row { grid-template-columns: auto minmax(0, 1fr); }
  .row-right { grid-column: 1 / -1; justify-content: space-between; }
  .row-count { text-align: left; }
}
