/* Theme UI refinements for layout, accessibility, and template parity */

html {
  scrollbar-gutter: stable;
}

body.is-overlay-open {
  overflow: hidden;
  padding-right: calc(100vw - 100%);
}

body.is-search-open {
  overflow-y: scroll;
  padding-right: 0;
}

.vgnw-search-drawer__form {
  width: 100%;
}

.side-menu-button,
.side-menu-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
}

.side-menu-button {
  cursor: pointer;
}

.side-menu-button:focus-visible,
.side-menu-link:focus-visible,
.header-inline-btn:focus-visible,
.vgnw-comment-submit:focus-visible,
.vgnw-search-card__title:focus-visible,
.vgnw-search-card__readmore:focus-visible,
.vgnw-theme-pagination .page-numbers:focus-visible {
  outline: 2px solid #f3bf56;
  outline-offset: 2px;
}

.vgnw-search-drawer__input:focus,
.vgnw-search-drawer__input:focus-visible {
  outline: 1px solid #ffffff;
  outline-offset: -1px;
}

.vgnw-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.vgnw-comment-item {
  margin: 0 !important;
  position: relative;
}

.vgnw-comment-card {
  background: #121111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.vgnw-comment-card__head {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
}

.vgnw-comment-card__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.vgnw-comment-card__author strong {
  color: #fff;
  font-size: 15px;
}

.vgnw-comment-card__author img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}

.vgnw-comment-card__time {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.vgnw-comment-card__pending {
  color: #f3bf56;
  font-size: 13px;
}

.vgnw-comment-card__content {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
  font-size: 16px;
}

.vgnw-comment-card__content p {
  margin: 0;
}

.vgnw-comment-card__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

.vgnw-comment-card__actions a,
.vgnw-comment-edit {
  color: rgba(255, 255, 255, 0.78);
}

.vgnw-comment-card__actions a:hover,
.vgnw-comment-edit:hover {
  color: #ffffff;
}

.vgnw-comment-list .children {
  list-style: none;
  margin: 12px 0 0 24px;
  padding: 0 0 0 20px;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  display: grid;
  gap: 12px;
}

.vgnw-comment-list .children > .vgnw-comment-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 28px;
  width: 14px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.vgnw-comments-nav {
  margin: 14px 0;
}

.vgnw-comments-nav .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.vgnw-comments-nav .nav-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.vgnw-comments-empty {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.vgnw-comment-form {
  max-width: 100%;
  display: grid;
  gap: 10px;
}

.vgnw-comment-form .comment-form-comment {
  margin: 0;
}

.simple-reply-box {
  cursor: pointer !important;
  background: #262423;
  box-shadow: -4px 4px 0 0 rgba(255, 255, 255, 0.1) inset, 4px -4px 0 0 #000 inset;
  position: relative;
  user-select: none;
  width: 100%;
}

.simple-reply-placeholder {
  padding: 20px;
  display: flex;
  align-items: center;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.72);
}

.simple-reply-box .comment-form-comment {
  margin: 0;
}

.simple-reply-box .vgnw-comment-input {
  min-height: 58px;
  max-height: 58px;
  resize: vertical;
  width: 100%;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.9);
  padding: 0 20px 20px;
  display: none;
  transition: max-height 0.24s ease, min-height 0.24s ease, border-color 0.2s ease;
}

.simple-reply-box.is-active .simple-reply-placeholder {
  display: none;
}

.simple-reply-box.is-active .vgnw-comment-input {
  display: block;
}

.simple-reply-box .vgnw-comment-input:focus,
.simple-reply-box .vgnw-comment-input:active {
  min-height: 144px;
  max-height: 260px;
  outline: none;
}

.simple-reply-controls {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 12px 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.55);
}

.simple-reply-box.is-active .simple-reply-controls {
  display: flex;
}

.simple-reply-bb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.simple-reply-bb-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-family: "Minecraft Five", monospace;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  min-width: 14px;
  padding: 0;
}

.simple-reply-bb-btn:hover {
  color: #fff;
}

.simple-reply-submit-host {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.simple-reply-submit {
  display: none;
}

.simple-reply-box.is-active .simple-reply-submit {
  display: inline-flex;
}

.simple-reply-submit .vgnw-comment-submit {
  min-height: 28px;
  box-shadow: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  padding: 0;
}

.simple-reply-submit .form-submit {
  display: block;
  margin: 0;
}

.simple-reply-submit .vgnw-comment-submit:hover {
  color: #fff;
  background: transparent;
}

.vgnw-comment-form .comment-form-author,
.vgnw-comment-form .comment-form-email,
.vgnw-comment-form .form-submit {
  display: none;
}

.vgnw-comment-form:focus-within .comment-form-author,
.vgnw-comment-form:focus-within .comment-form-email,
.vgnw-comment-form:focus-within .form-submit {
  display: block;
}

.simple-reply-box.is-active .simple-reply-submit .form-submit {
  display: block;
}

.vgnw-search-page,
.vgnw-not-found {
  width: min(1440px, 100%);
  margin: 0 auto;
  background: #171615;
}

.vgnw-search-wrap,
.vgnw-not-found-wrap {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 44px 16px 60px;
  display: grid;
  gap: 18px;
}

.vgnw-search-head,
.vgnw-not-found-head {
  display: grid;
  gap: 8px;
}

.vgnw-search-title,
.vgnw-not-found-title {
  margin: 0;
  color: #fff;
  font-family: "Minecraft Five", monospace;
  font-size: clamp(28px, 4vw, 42px);
  text-transform: uppercase;
  line-height: 1.05;
}

.vgnw-search-subtitle,
.vgnw-not-found-copy {
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  line-height: 1.4;
}

.vgnw-search-grid {
  display: grid;
  gap: 12px;
}

.vgnw-search-card {
  background: #1e1c1b;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.36);
  padding: 16px;
  display: grid;
  gap: 8px;
}

.vgnw-search-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.vgnw-search-card__type {
  background: #f3bf56;
  color: #171615;
  padding: 3px 6px;
  letter-spacing: 1px;
  font-family: "Minecraft Five", monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.vgnw-search-card__title {
  color: #fff;
  font-size: 24px;
  line-height: 1.2;
  font-family: "Minecraft Five", monospace;
}

.vgnw-search-card__excerpt {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.65;
}

.vgnw-search-card__readmore,
.vgnw-not-found-button {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  background: #f3bf56;
  color: #171615;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Minecraft Five", monospace;
  font-size: 10px;
  box-shadow: 0 3px 0 #c08f25;
}

.vgnw-theme-pagination {
  margin-top: 6px;
}

.vgnw-theme-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vgnw-theme-pagination .page-numbers {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e1c1b;
  color: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.32);
  padding: 0 8px;
}

.vgnw-theme-pagination .page-numbers.current {
  background: #f3bf56;
  color: #171615;
  box-shadow: 0 3px 0 #c08f25;
}

@media (max-width: 768px) {
  .vgnw-search-wrap,
  .vgnw-not-found-wrap {
    padding: 28px 12px 38px;
  }

  .vgnw-search-card__title {
    font-size: 21px;
  }
}
