/* Heaven OTS | Server Information & Commands | 2026-10-30
   Isolated to the two routes so Highscores, news and other pages are untouched. */
body.page-ots-info .legacy-content,
body.page-commands .legacy-content {
  --hl-bg: #0b192b;
  --hl-surface: #10243b;
  --hl-border: #2b4561;
  --hl-text: #e7f0ff;
  --hl-muted: #9eb4d1;
  --hl-accent: #6aa8ff;
  color: var(--hl-text);
}

/* Neutralize the original MyAAC beige backgrounds, including inline td colors. */
body.page-ots-info .legacy-content :is(table,thead,tbody,tfoot,tr,th,td),
body.page-commands .legacy-content :is(table,thead,tbody,tfoot,tr,th,td) {
  background-image: none !important;
  color: var(--hl-text) !important;
}
body.page-ots-info .legacy-content table,
body.page-commands .legacy-content table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  table-layout: auto !important;
  background: #0b1a2d !important;
  border: 1px solid #294560 !important;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
body.page-ots-info .legacy-content table thead > tr,
body.page-commands .legacy-content table thead > tr,
body.page-ots-info .legacy-content table tr:first-child:has(th),
body.page-commands .legacy-content table tr:first-child:has(th) {
  background: #1a304d !important;
}
body.page-ots-info .legacy-content table th,
body.page-commands .legacy-content table th,
body.page-ots-info .legacy-content table .LabelH,
body.page-commands .legacy-content table .LabelH {
  background: #1b3350 !important;
  color: #f3f7ff !important;
  font-weight: 750 !important;
  padding: 14px 17px !important;
  border: 0 !important;
  border-bottom: 1px solid #365473 !important;
  text-align: left !important;
}
body.page-ots-info .legacy-content table tr > td,
body.page-commands .legacy-content table tr > td,
body.page-ots-info .legacy-content table tr > th,
body.page-commands .legacy-content table tr > th {
  border: 0 !important;
  border-bottom: 1px solid #263d57 !important;
  padding: 14px 17px !important;
  vertical-align: middle !important;
  line-height: 1.55;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  box-shadow: none !important;
}
body.page-ots-info .legacy-content table tr > td,
body.page-commands .legacy-content table tr > td {
  background-color: #102239 !important;
}
body.page-ots-info .legacy-content table tr:nth-child(2n) > td,
body.page-commands .legacy-content table tr:nth-child(2n) > td {
  background-color: #0b1b30 !important;
}
body.page-ots-info .legacy-content table tr:hover > td,
body.page-commands .legacy-content table tr:hover > td {
  background-color: #183553 !important;
}
body.page-ots-info .legacy-content table tr > td:first-child {
  width: 43%;
  color: #b6cae6 !important;
  font-weight: 650;
}
body.page-ots-info .legacy-content table tr > td:nth-child(2) {
  font-weight: 700;
  color: #f2f7ff !important;
}
body.page-commands .legacy-content table tr > td:first-child {
  color: #8fc4ff !important;
  font-weight: 750;
}
body.page-ots-info .legacy-content :is(.TableContainer,.InnerTableContainer,.TableContentContainer,.TableContentAndRightShadow),
body.page-commands .legacy-content :is(.TableContainer,.InnerTableContainer,.TableContentContainer,.TableContentAndRightShadow) {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
body.page-ots-info .legacy-content .TableContainer,
body.page-commands .legacy-content .TableContainer {
  border-radius: 8px !important;
  border: 1px solid #284560 !important;
  background: #0b192b !important;
  overflow-x: auto !important;
}
body.page-ots-info .legacy-content table :is(font,span,a),
body.page-commands .legacy-content table :is(font,span) {
  color: inherit !important;
}
body.page-ots-info .legacy-content a,
body.page-commands .legacy-content a {
  color: #8dc6ff;
}

/* Server Info: progressive upgrade of the Setting / Value table to clear cards. */
body.page-ots-info .legacy-content .heaven-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
  color: #e8f1ff;
}
body.page-ots-info .legacy-content .heaven-setting-card {
  position: relative;
  min-width: 0;
  min-height: 90px;
  padding: 17px 20px;
  border: 1px solid #2d4764;
  border-radius: 8px;
  background: linear-gradient(132deg, #122945 0%, #0c1b2d 94%);
  box-shadow: inset 0 1px rgba(184,210,255,.035);
  transition: border-color .18s, background .18s;
}
body.page-ots-info .legacy-content .heaven-setting-card:hover {
  border-color: #416990;
  background: linear-gradient(132deg, #183453 0%, #112239 94%);
}
body.page-ots-info .legacy-content .heaven-setting-card:first-child {
  border-color: #3c6595;
  background: linear-gradient(125deg, #15375e, #102239);
}
body.page-ots-info .legacy-content .heaven-setting-card::before {
  content: '';
  position: absolute;
  top: 19px;
  left: 0;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: #438bfa;
  opacity: .75;
}
body.page-ots-info .legacy-content .heaven-setting-label {
  display: block;
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
  color: #9bb6d7;
  letter-spacing: .085em;
  text-transform: uppercase;
}
body.page-ots-info .legacy-content .heaven-setting-value {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 650;
  color: #f3f7ff;
  overflow-wrap: anywhere;
}
body.page-ots-info .legacy-content .heaven-setting-value :is(font,span) { color: inherit !important; }

/* Commands: show each command as a readable entry; retains page's original text/links. */
body.page-commands .legacy-content .heaven-commands-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin: 17px 0 22px;
}
body.page-commands .legacy-content .heaven-command-card {
  min-width: 0;
  padding: 19px 20px;
  border: 1px solid #294763;
  border-radius: 8px;
  background: linear-gradient(140deg, #122843, #0b1a2e);
}
body.page-commands .legacy-content .heaven-command-card:hover { border-color: #4273a4; }
body.page-commands .legacy-content .heaven-command-name {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 100%;
  padding: 6px 11px;
  border: 1px solid #365e87;
  border-radius: 5px;
  color: #9bd0ff;
  background: #071b31;
  font: 750 13px/1.5 ui-monospace, Consolas, monospace;
  overflow-wrap: anywhere;
}
body.page-commands .legacy-content .heaven-command-description {
  margin: 13px 0 0;
  color: #bacbe3;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
body.page-commands .legacy-content .heaven-command-description :is(p,div) { margin-top: 0; }
body.page-commands .legacy-content .heaven-command-extra {
  display: block;
  margin-top: 11px;
  color: #91a9c9;
  font-size: 11px;
}
body.page-commands .legacy-content :is(pre,code,kbd) {
  background: #091c31 !important;
  border: 1px solid #304f70;
  border-radius: 5px;
  color: #92caff !important;
  font-family: ui-monospace, Consolas, monospace;
}
body.page-commands .legacy-content :is(code,kbd) { padding: 2px 6px; }
body.page-commands .legacy-content pre {
  padding: 16px 18px;
  white-space: pre-wrap;
  overflow-x: auto;
  overflow-wrap: anywhere;
}
body.page-commands .legacy-content > :is(ul,ol) { list-style: none; padding: 0; }
body.page-commands .legacy-content > :is(ul,ol) > li {
  margin: 9px 0;
  padding: 14px 18px;
  border: 1px solid #2c4866;
  border-radius: 6px;
  background: #0e2138;
}
body.page-commands .legacy-content :is(h2,h3,h4) { margin-top: 23px; color: #e7f0ff; }

@media (max-width: 760px) {
  body.page-ots-info .legacy-content .heaven-settings-grid,
  body.page-commands .legacy-content .heaven-commands-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  body.page-ots-info .legacy-content .heaven-setting-card,
  body.page-commands .legacy-content .heaven-command-card { padding: 15px 17px; min-height: 0; }
  body.page-ots-info .legacy-content table tr > td,
  body.page-commands .legacy-content table tr > td,
  body.page-ots-info .legacy-content table tr > th,
  body.page-commands .legacy-content table tr > th { padding: 11px 10px !important; font-size: 12px; }
}
