/* Vanilla GUI look: gray windows with bevelled edges over a darkened world, white text with hard shadows. */
:root {
  --mc-world: #2d2620;
  --mc-panel: #c6c6c6;
  --mc-ink: #404040;
  --mc-edge-light: #ffffff;
  --mc-edge-dark: #555555;
  --mc-slot: #8b8b8b;
  --mc-slot-dark: #373737;
  --mc-button: #6f6f6f;
  --mc-red: #ff5555;
  --mc-green: #55ff55;
  --mc-gray: #aaaaaa;
  color-scheme: dark;
}

html {
  background: var(--mc-world);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--mc-world);
  color: #ffffff;
  font-family: "Minecraft", "Monocraft", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  line-height: 1.45;
}

.mc-shadow {
  text-shadow: 2px 2px 0 #3f3f3f;
}

a {
  color: inherit;
}

a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.mc-panel {
  background: var(--mc-panel);
  color: var(--mc-ink);
  border: 2px solid #000000;
  border-radius: 4px;
  box-shadow: inset 2px 2px 0 var(--mc-edge-light), inset -2px -2px 0 var(--mc-edge-dark);
  padding: 14px 16px 16px;
}

.mc-panel h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: normal;
  color: var(--mc-ink);
}

.mc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 4px 14px;
  background: var(--mc-button);
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  font: inherit;
  text-decoration: none;
  border: 2px solid #000000;
  box-shadow: inset 2px 2px 0 #aaaaaa, inset -2px -3px 0 #4a4a4a;
  cursor: pointer;
  white-space: nowrap;
}

.mc-button:hover,
.mc-button:focus-visible {
  border-color: #ffffff;
  outline: none;
}

.mc-button:disabled {
  background: #2c2c2c;
  color: #a0a0a0;
  text-shadow: none;
  box-shadow: none;
  border-color: #000000;
  cursor: default;
}

.mc-button[aria-current="page"] {
  background: #8b8b8b;
}

.mc-button.is-danger {
  color: #ffdddd;
}

.mc-button.is-small {
  min-height: 28px;
  padding: 2px 10px;
}

.mc-input {
  background: #000000;
  color: #ffffff;
  font: inherit;
  border: 2px solid #a0a0a0;
  padding: 5px 8px;
  min-height: 34px;
  box-sizing: border-box;
}

.mc-input:focus {
  border-color: #ffffff;
  outline: none;
}

.mc-input::placeholder {
  color: #808080;
}

.mc-table {
  width: 100%;
  border-collapse: collapse;
}

.mc-table th {
  text-align: left;
  font-weight: normal;
  color: #6b6b6b;
  padding: 4px 8px;
}

.mc-table td {
  padding: 6px 8px;
  border-top: 2px solid var(--mc-slot);
  vertical-align: middle;
}

.mc-slot {
  position: relative;
  width: 40px;
  height: 40px;
  background: var(--mc-slot);
  box-shadow: inset 2px 2px 0 var(--mc-slot-dark), inset -2px -2px 0 var(--mc-edge-light);
  color: #ffffff;
  font-size: 9px;
  line-height: 1.1;
  overflow: hidden;
}

.mc-slot.is-filled {
  cursor: help;
}

.mc-slot.is-held {
  outline: 2px solid #ffffff;
  outline-offset: -2px;
}

.mc-slot-label {
  position: absolute;
  inset: 4px 4px auto 4px;
  text-shadow: 1px 1px 0 #3f3f3f;
  word-break: break-all;
}

.mc-slot-count {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-size: 12px;
  text-shadow: 2px 2px 0 #3f3f3f;
}

.mc-tooltip {
  position: fixed;
  z-index: 50;
  max-width: 280px;
  padding: 6px 8px;
  background: rgba(16, 0, 16, 0.94);
  border: 2px solid #3c0e8a;
  border-radius: 3px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  pointer-events: none;
}

.mc-tooltip .is-sub {
  color: var(--mc-gray);
}

.mc-tooltip .is-enchant {
  color: var(--mc-gray);
}

.mc-motd-preview {
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid #808080;
  padding: 8px 10px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #3f3f3f;
  white-space: pre;
  overflow-x: auto;
}

.mc-swatch {
  width: 26px;
  height: 26px;
  border: 2px solid #000000;
  cursor: pointer;
  padding: 0;
}

.mc-swatch:hover,
.mc-swatch:focus-visible {
  border-color: #ffffff;
  outline: none;
}

.mc-status {
  position: fixed;
  left: 16px;
  bottom: 16px;
  max-width: calc(100vw - 32px);
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.6);
  text-shadow: 2px 2px 0 #3f3f3f;
}

.mc-status.is-error {
  color: var(--mc-red);
}

.text-online {
  color: #1f8f1f;
}

.text-error {
  color: var(--mc-red);
}

.mc-sort {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}

.mc-sort:hover,
.mc-sort:focus-visible {
  color: var(--mc-ink);
  text-decoration: underline;
}

.mc-table td.is-best {
  background: rgba(255, 170, 0, 0.35);
}

/* Charts on the Monitoring page: a dark plot surface like the MOTD preview. */
:root {
  --chart-surface: #1a1a19;
  --chart-text: #c3c2b7;
  --chart-grid: rgba(255, 255, 255, 0.12);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
}

.mc-chart {
  margin: 0;
  min-width: 0;
}

.mc-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 6px;
}

.mc-chart-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: #6b6b6b;
}

.mc-chart-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
}

.mc-chart-plot {
  position: relative;
  background: var(--chart-surface);
  border: 2px solid #808080;
  line-height: 0;
}

.mc-chart-plot svg {
  display: block;
}

.mc-chart-axis {
  fill: var(--chart-text);
  font: 11px ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.mc-chart-grid {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.mc-chart-marker {
  stroke: var(--chart-text);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.mc-chart-cursor {
  stroke: var(--chart-text);
  stroke-width: 1;
}

.mc-chart-dot {
  stroke: var(--chart-surface);
  stroke-width: 2;
}

.mc-chart-tooltip {
  position: absolute;
  top: 8px;
  z-index: 5;
  padding: 6px 8px;
  background: rgba(16, 0, 16, 0.94);
  border: 2px solid #3c0e8a;
  border-radius: 3px;
  color: #ffffff;
  line-height: 1.45;
  white-space: nowrap;
  pointer-events: none;
}

.mc-chart-tooltip-time {
  color: var(--mc-gray);
}

.mc-progress {
  height: 10px;
  margin-top: 4px;
  background: var(--mc-slot-dark);
  box-shadow: inset 2px 2px 0 #000000;
}

.mc-progress > div {
  height: 100%;
  background: #55aa55;
}

.mc-console {
  margin: 0 0 12px;
  padding: 8px 10px;
  max-height: 180px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font: 12px ui-monospace, "Cascadia Mono", Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
