/*
 * Component styles for the server stats page, layered on tokens.css and
 * tibia-2007.css so stats render inside the same parchment boxes, title
 * bars, and menu as the rest of the site.
 */

.content h3 {
  margin: 18px 0 8px;
  color: var(--color-bar);
  font-family: var(--font-content);
  font-size: var(--text-sm);
  font-weight: bold;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.content h3:first-child {
  margin-top: 0;
}

.freshness {
  margin: 0 0 10px;
  color: #7a5a3a;
  font-size: var(--text-sm);
}

.freshness.stale {
  color: #a83200;
}

.unavailable {
  color: #7a5a3a;
  font-style: italic;
}

.note {
  margin: 10px 0 0;
  color: #7a5a3a;
  font-size: var(--text-sm);
}

.note.warn {
  color: #a83200;
}

.warnings {
  margin: 6px 0 0;
  padding-left: 20px;
  color: var(--color-ink);
  font-size: var(--text-sm);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 0;
}

.tile {
  padding: 6px 8px;
  background: var(--color-row-even);
  border: 1px solid #c9a877;
}

.tile .v {
  color: var(--color-ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11pt;
}

.tile .k {
  margin-top: 2px;
  color: #7a5a3a;
  font-size: var(--text-xs);
}

.bars {
  display: grid;
  gap: 4px;
  margin: 0;
}

.bar {
  display: grid;
  grid-template-columns: minmax(90px, 190px) 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: var(--text-sm);
}

.bar .label {
  overflow: hidden;
  color: var(--color-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar .track {
  height: 12px;
  overflow: hidden;
  background: var(--color-row-odd);
  border: 1px solid #c9a877;
}

.bar .fill {
  display: block;
  height: 100%;
  min-width: 2px;
  background: linear-gradient(#9b4d05, var(--color-bar));
}

.bar .num {
  min-width: 48px;
  color: #7a5a3a;
  font-family: Consolas, "Courier New", monospace;
  font-size: var(--text-xs);
  text-align: right;
}

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 24px;
  margin: 0;
  font-size: var(--text-base);
}

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(90, 40, 0, 0.25);
}

.kv span:first-child {
  color: #7a5a3a;
}

.kv span:last-child {
  color: var(--color-ink);
  font-family: Consolas, "Courier New", monospace;
}

.content table {
  width: 100%;
  margin: 0 0 4px;
  border-collapse: collapse;
}

.content th {
  padding: 4px 8px;
  background: var(--color-table-head);
  color: #fff;
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: bold;
  text-align: left;
}

.content td {
  padding: 4px 8px;
  color: var(--color-ink);
  font-size: var(--text-base);
}

.content tr:nth-child(odd) td {
  background: var(--color-row-odd);
}

.content tr:nth-child(even) td {
  background: var(--color-row-even);
}

.content th.num,
.content td.num {
  text-align: right;
}

.content td:not(:first-child) {
  font-family: Consolas, "Courier New", monospace;
}

@media (max-width: 640px) {
  .bar {
    grid-template-columns: minmax(70px, 110px) 1fr auto;
  }
}
