/*
Theme Name: Bark No Byte
Theme URI: https://www.barknobyte.com/
Description: Standalone Bark No Byte theme for the studio's games and community.
Author: Bark No Byte
Version: 0.3.0
Text Domain: bark-no-byte
*/

:root {
  --bnb-color-bg: #000000;
  --bnb-color-surface: #171717;
  --bnb-color-surface-alt: #262626;
  --bnb-color-text: #ffffff;
  --bnb-color-muted: #b5b5b5;
  --bnb-color-accent: #d9305d;
  --bnb-color-accent-strong: #d9305d;
  --bnb-color-border: #262626;
  --bnb-font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --bnb-font-heading: "Space Grotesk", "Arial Narrow", sans-serif;
}

body {
  background: var(--bnb-color-bg);
  color: var(--bnb-color-text);
  font-family: var(--bnb-font-body);
}

body:not(.overlay-header) .site-header,
.footer-nav-widgets-wrapper,
#site-footer {
  background: #dd5d5d;
  color: #000000;
}

.entry-content,
.site-description,
.powered-by-wordpress,
.pagination-single a,
.widget li,
.widget_recent_entries li,
.widget_recent_comments li {
  color: var(--bnb-color-text);
}

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.site-title {
  font-family: var(--bnb-font-heading);
  letter-spacing: 0.03em;
}

a {
  color: var(--bnb-color-accent-strong);
}

a:hover,
a:focus {
  color: #ff8eaa;
}

button,
.button,
.faux-button,
.wp-block-button__link {
  background: var(--bnb-color-accent);
  border-radius: 999px;
  border: 0;
  color: #ffffff;
  font-weight: 700;
}

.widget,
.wp-block-group,
.archive-header,
.singular .entry-header {
  border-color: var(--bnb-color-border);
}

/* ---- Gutenberg editor overrides ---- */
.editor-styles-wrapper {
  background: var(--bnb-color-bg);
  color: var(--bnb-color-text);
  font-family: var(--bnb-font-body);
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
  font-family: var(--bnb-font-heading);
}

/* ---- Custom block styles ---- */
.wp-block-button.is-style-bnb-primary .wp-block-button__link {
  background: var(--bnb-color-accent);
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  border: 0;
}

.wp-block-button.is-style-bnb-ghost .wp-block-button__link {
  background: transparent;
  border: 2px solid var(--bnb-color-accent);
  color: var(--bnb-color-accent-strong);
  border-radius: 999px;
}

.wp-block-button.is-style-bnb-ghost .wp-block-button__link:hover {
  background: var(--bnb-color-accent);
  color: #ffffff;
}

/* ---- Download catalog grid ---- */
.bnb-downloads-catalog .entry-title {
  font-size: clamp(28px, 5vw, 48px);
}

/* ---- Game hero ---- */
.bnb-game-hero {
  border-radius: 8px;
  overflow: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .bnb-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .bnb-game-hero {
    min-height: 300px !important;
  }
}

/* ---- Login page branding ---- */
#login h1 a {
  background-image: none;
  color: var(--bnb-color-accent-strong, #d9305d);
  font-family: var(--bnb-font-heading, "Space Grotesk", sans-serif);
  font-size: 24px;
  font-weight: 700;
  height: auto;
  letter-spacing: 0.05em;
  text-indent: 0;
  width: auto;
}

#login h1 a::before {
  content: "🐾 Bark No Byte";
}

#loginform,
#lostpasswordform,
#registerform {
  background: var(--bnb-color-surface);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--bnb-color-text);
}

body.login {
  background: var(--bnb-color-bg);
}

/* Standalone layout and navigation */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.65;
  overflow-wrap: break-word;
  overflow-x: clip;
}

img,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
input[type="submit"],
.button {
  cursor: pointer;
  padding: .7em 1.3em;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
textarea,
select {
  background: var(--bnb-color-surface);
  border: 1px solid var(--bnb-color-border);
  border-radius: .35rem;
  color: var(--bnb-color-text);
  max-width: 100%;
  padding: .65rem;
}

:focus-visible {
  outline: 3px solid var(--bnb-color-accent-strong);
  outline-offset: 3px;
}

.serial-hidden {
  display: none !important;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: .75rem 1rem;
  clip: auto;
  color: #100c08;
  background: var(--bnb-color-accent-strong);
  z-index: 100;
}

.bnb-header-inner,
.bnb-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header {
  border-bottom: 1px solid var(--bnb-color-border);
}

.bnb-brand {
  flex: 0 0 auto;
}

.site-title {
  color: #000000;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
}

.custom-logo {
  display: block;
  max-width: 180px;
  max-height: 80px;
  width: auto;
}

.site-description {
  color: #251212;
  font-size: .85rem;
  margin: .15rem 0 0;
}

.bnb-menu,
.bnb-menu ul,
.bnb-footer-menu,
.bnb-desktop-navigation .menu,
.bnb-mobile-navigation .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bnb-desktop-navigation > .bnb-menu,
.bnb-desktop-navigation > .menu,
.bnb-footer-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1rem;
}

.bnb-menu li {
  position: relative;
}

.bnb-menu a,
.bnb-footer-menu a {
  color: #000000;
  display: block;
  padding: .5rem .15rem;
  text-decoration: none;
}

.bnb-menu a:hover,
.bnb-menu a:focus,
.bnb-menu .current-menu-item > a,
.bnb-footer-menu a:hover {
  color: #470013;
}

.bnb-desktop-navigation .sub-menu {
  display: none;
  position: absolute;
  z-index: 10;
  min-width: 14rem;
  padding: .5rem 1rem;
  background: #dd5d5d;
  border: 1px solid #d03333;
  border-radius: .5rem;
}

.bnb-desktop-navigation .sub-menu .sub-menu {
  top: 0;
  left: 100%;
}

.bnb-desktop-navigation li:hover > .sub-menu,
.bnb-desktop-navigation li:focus-within > .sub-menu {
  display: block;
}

.bnb-mobile-navigation {
  display: none;
}

.bnb-content {
  width: min(100% - 3rem, 1240px);
  margin: 0 auto;
  padding: 3rem 0 5rem;
  min-height: 50vh;
}

.bnb-entry {
  width: min(100%, 720px);
  margin: 0 auto 3rem;
}

.bnb-full-width-entry {
  width: min(100% - 3rem, 1240px);
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.bnb-member-dashboard {
  width: min(100%, 720px);
  margin: 0 auto;
}

.bnb-account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid var(--bnb-color-border);
  margin: 2rem 0;
}

.bnb-account-tabs a {
  padding: .5rem 0;
}

.bnb-account-tabs [aria-current="page"] {
  font-weight: 700;
  border-bottom: 2px solid var(--bnb-color-accent);
}

.bnb-account-form,
.bnb-code-form form {
  display: grid;
  gap: .5rem;
  max-width: 32rem;
}

.bnb-account-form button,
.bnb-code-form form button {
  justify-self: start;
  margin-top: 1rem;
}

.bnb-account-downloads {
  width: 100%;
  text-align: left;
}

.bnb-account-downloads th,
.bnb-account-downloads td {
  padding: .75rem;
  border-bottom: 1px solid var(--bnb-color-border);
}

.bnb-page-header {
  width: min(100%, 720px);
  margin: 0 auto 3rem;
}

.entry-title,
.bnb-page-header h1 {
  line-height: 1.15;
}

.entry-title a {
  color: inherit;
  text-decoration: none;
}

.bnb-entry-meta {
  color: var(--bnb-color-muted);
  font-size: .9rem;
}

.bnb-featured-image {
  margin: 1.5rem 0;
}

.bnb-featured-image img {
  display: block;
  border-radius: .5rem;
}

.entry-content .alignwide {
  width: min(1240px, calc(100vw - 3rem));
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.entry-content .alignfull {
  width: 100vw;
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.entry-content .alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

.entry-content .alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.entry-content::after {
  content: "";
  display: table;
  clear: both;
}

.bnb-comments {
  margin-top: 3rem;
  border-top: 1px solid var(--bnb-color-border);
}

.bnb-comments textarea {
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--bnb-color-border);
}

.bnb-footer-widgets {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 2rem;
}

.bnb-footer-widgets a {
  color: #470013;
}

.bnb-footer-inner {
  color: #000000;
  font-size: .9rem;
}

@media (max-width: 900px) {
  .bnb-header-inner {
    flex-wrap: wrap;
  }

  .bnb-desktop-navigation {
    display: none;
  }

  .bnb-mobile-navigation {
    display: block;
  }

  .bnb-mobile-navigation summary {
    cursor: pointer;
    color: #000000;
    padding: .5rem;
  }

  .bnb-mobile-navigation nav {
    position: absolute;
    z-index: 10;
    left: 0;
    right: 0;
    max-height: 70vh;
    overflow: auto;
    background: #dd5d5d;
    border-bottom: 1px solid #d03333;
    padding: 1rem 1.5rem;
  }

  .bnb-mobile-navigation .sub-menu {
    padding-left: 1.25rem;
  }

  .bnb-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
