/*
 * Compatibility layer for the database-free ProjectMC forum archive.
 *
 * The historical theme itself is preserved unchanged in theme/css/index.css.
 * This file only styles archive-only markup and keeps the 2012-era layout
 * usable on narrow screens.
 */

html {
  min-width: 320px;
  background: #333;
}

.projectmc-forum-archive * {
  box-sizing: border-box;
}

.projectmc-forum-archive #logo img {
  display: block;
  width: min(1000px, 100%);
  height: auto;
  margin: 0 auto;
}

.projectmc-forum-archive #topbar {
  box-sizing: content-box;
}

.archive-date,
.archive-mode {
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  line-height: 20px;
}

.archive-mode {
  float: right;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.archive-copy-note {
  display: block;
  margin: 0 0 8px;
  padding: 7px 10px;
  color: #42566a;
  background: #efefef;
  border: 1px solid #afb8be;
  border-radius: 5px;
  font-style: normal;
  font-size: 11px;
}

.projectmc-forum-archive ul.topnav a.active {
  background: url(theme/images/theme/topnav_hover.gif) no-repeat center top;
}

.archive-intro,
.board-heading,
.topic-heading {
  position: relative;
  margin: 0 0 10px;
  padding: 12px 14px;
  color: #3f3f3f;
  background: #f0f4f7;
  border: 1px solid #afb8be;
  border-radius: 5px;
}

.archive-intro h1,
.board-heading h1,
.topic-heading h1 {
  margin: 0 0 5px;
  color: #0080ff;
  font: bold 20px/1.2 Arial, Helvetica, sans-serif;
}

.archive-intro p,
.board-heading p,
.topic-heading p {
  margin: 0;
  color: #3f3f3f;
}

.board-heading {
  padding-right: 105px;
}

.board-heading > span {
  position: absolute;
  top: 13px;
  right: 14px;
  padding: 4px 7px;
  color: #42566a;
  background: #e7eaef;
  border: 1px solid #afb8be;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
}

.projectmc-forum-archive .table_list {
  border-collapse: collapse;
}

.projectmc-forum-archive .table_list tbody.content td {
  border-bottom: 1px solid #d4d8dc;
  vertical-align: middle;
}

.projectmc-forum-archive .table_list tbody.content tr:last-child td {
  border-bottom: 0;
}

.projectmc-forum-archive .table_list td.icon img {
  width: 32px;
  height: 32px;
}

.projectmc-forum-archive .table_list td.info p {
  color: #3f3f3f;
}

.redirect-label {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 5px;
  color: #3f3f3f;
  background: #e7eaef;
  border: 1px solid #afb8be;
  border-radius: 3px;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  vertical-align: 1px;
}

.archive-totals {
  margin: 10px 0;
  padding: 10px 12px;
  color: #3f3f3f;
  background: #e7eaef;
  border: 1px solid #afb8be;
  text-align: center;
}

.archive-totals strong {
  color: #0080ff;
  font-size: 16px;
}

.archive-totals span {
  margin: 0 7px;
  color: #7e8c9b;
}

.provenance {
  margin: 0 0 10px;
  color: #3f3f3f;
  background: #f0f4f7;
  border: 1px solid #afb8be;
}

.provenance summary {
  padding: 8px 11px;
  color: #42566a;
  background: #e7eaef;
  cursor: pointer;
  font-weight: bold;
}

.provenance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #d4d8dc;
}

.provenance-grid p {
  margin: 0;
  padding: 11px;
  color: #3f3f3f;
  background: #f8f8f8;
}

.provenance-grid strong {
  display: block;
  margin-bottom: 3px;
  color: #0080ff;
}

.provenance code {
  overflow-wrap: anywhere;
}

.topic-list {
  overflow: hidden;
  color: #3f3f3f;
  background: #f0f4f7;
  border: 1px solid #afb8be;
  border-radius: 5px;
}

.topic-list-head,
.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 180px;
  align-items: center;
}

.topic-list-head {
  padding: 0 12px 0 45px;
  height: 31px;
  color: #fff;
  background: #99abbf url(theme/images/theme/main_block.png) no-repeat 0 -160px;
  font-weight: bold;
}

.topic-row {
  position: relative;
  min-height: 62px;
  padding: 9px 12px 9px 45px;
  background: #e7eaef;
  border-bottom: 1px solid #d4d8dc;
}

.topic-row:nth-child(odd) {
  background: #f0f4f7;
}

.topic-row:last-child {
  border-bottom: 0;
}

.topic-status {
  position: absolute;
  left: 17px;
  color: #00aaff;
  font-size: 17px;
}

.topic-title a {
  display: block;
  margin-right: 10px;
  color: #0080ff;
  font-weight: bold;
  overflow-wrap: anywhere;
}

.topic-title small,
.topic-last small,
.topic-numbers span {
  display: block;
  margin-top: 3px;
  color: #66727c;
  font-size: 10px;
}

.topic-last {
  color: #3f3f3f;
}

.empty-state {
  margin: 0;
  padding: 24px;
  color: #3f3f3f;
  text-align: center;
}

.forum-post {
  margin: 0 0 10px;
  overflow: hidden;
  color: #3f3f3f;
  background: #f0f4f7;
  border: 1px solid #afb8be;
  border-radius: 5px;
}

.post-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 31px;
  padding: 5px 10px;
  color: #fff;
  background: #99abbf url(theme/images/theme/main_block.png) no-repeat 0 -160px;
}

.post-header h2 {
  margin: 0;
  color: #fff;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.post-header time,
.post-number,
.post-number:hover,
.post-number:focus {
  color: #fff;
  font-size: 10px;
}

.post-header time {
  white-space: nowrap;
}

.post-body {
  display: grid;
  grid-template-columns: 15em minmax(0, 1fr);
  min-height: 110px;
  background: #f0f4f7;
}

.poster {
  float: none;
  width: auto;
  padding: 12px;
  background: #e7eaef;
  border-right: 1px solid #d4d8dc;
  text-align: center;
}

.poster strong,
.poster span {
  display: block;
  overflow-wrap: anywhere;
}

.poster strong {
  padding: 4px;
  color: #0080ff;
  background: #f8f8f8;
  border: 1px solid #dcdfe4;
  border-radius: 5px;
}

.poster span {
  margin-top: 5px;
  color: #3f3f3f;
  font-size: 10px;
}

.message-content {
  min-width: 0;
  padding: 15px 17px 24px;
  color: #111;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.message-content blockquote {
  margin: 10px 0;
  padding: 9px 12px 9px 38px;
  color: #555;
  background: #e7eaef url(theme/images/theme/quote.png) no-repeat 10px 10px;
  border: 1px solid #c4c4c4;
}

.message-content pre {
  overflow-x: auto;
  padding: 10px;
  background: #e7eaef;
  border: 1px solid #c4c4c4;
  white-space: pre-wrap;
}

.message-content ul {
  margin: 8px 0;
  padding-left: 23px;
}

.message-content hr {
  border: 0;
  border-top: 1px solid #aaa;
}

.bbc-center {
  text-align: center;
}

.archived-image-link {
  display: inline-block;
  max-width: 100%;
  padding: 3px 6px;
  background: #e7eaef;
  border: 1px solid #c4c4c4;
}

.archived-image-link.restored-image {
  padding: 0;
  border: 0;
}

.restored-image img {
  display: block;
  max-width: 100%;
  height: auto;
}

.topic-return {
  margin: 0 0 10px;
  padding: 9px 11px;
  color: #3f3f3f;
  background: #efefef;
  border: 1px solid #afb8be;
  border-radius: 5px;
}

.projectmc-forum-archive #footer_body ul.reset {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 820px) {
  .archive-mode {
    display: none;
  }

  .projectmc-forum-archive .table_list td.lastpost {
    display: none;
  }

  .topic-list-head,
  .topic-row {
    grid-template-columns: minmax(0, 1fr) 145px;
  }

  .topic-list-head span:nth-child(2),
  .topic-numbers {
    display: none;
  }
}

@media (max-width: 560px) {
  .projectmc-forum-archive #topbar {
    height: 20px;
  }

  .projectmc-forum-archive ul.topnav {
    overflow-x: auto;
    white-space: nowrap;
  }

  .projectmc-forum-archive ul.topnav li {
    display: inline-block;
    float: none;
  }

  .projectmc-forum-archive #content_section {
    padding-left: 8px;
  }

  .projectmc-forum-archive #content_section div.frame {
    padding-right: 8px;
  }

  .projectmc-forum-archive .table_list td.icon {
    width: 42px;
    padding: 5px 2px;
  }

  .projectmc-forum-archive .table_list td.stats {
    display: none;
  }

  .board-heading {
    padding-right: 14px;
  }

  .board-heading > span {
    position: static;
    display: inline-block;
    margin-top: 8px;
  }

  .provenance-grid {
    grid-template-columns: 1fr;
  }

  .topic-list-head {
    display: none;
  }

  .topic-row {
    display: block;
    min-height: 72px;
    padding: 10px 11px 10px 39px;
  }

  .topic-status {
    left: 12px;
  }

  .topic-last {
    margin-top: 6px;
  }

  .post-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .post-header time {
    grid-column: 2;
    white-space: normal;
  }

  .post-body {
    display: block;
  }

  .poster {
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid #d4d8dc;
    text-align: left;
  }

  .poster strong,
  .poster span {
    display: inline-block;
  }

  .poster span {
    margin: 0 0 0 6px;
  }

  .message-content {
    padding: 12px 11px 19px;
  }
}
