/*
Theme Name: Baddie Books Oxygen CUX
Theme URI: https://smutclub.online/
Author: Smut Club
Description: Oxygen-compatible fallback theme for Smut Club and the Baddie Books plugin ecosystem. Provides accessible defaults, safe block alignment support, and Baddie Books Engine fallback templates without competing with Oxygen layouts.
Version: 0.2.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: baddie-books-oxygen-cux
*/

:root {
  --bbcux-bg: #000000;
  --bbcux-surface: #10090a;
  --bbcux-surface-soft: #171011;
  --bbcux-red: #d02d33;
  --bbcux-red-dark: #78181a;
  --bbcux-text: #efe1e1;
  --bbcux-muted: #bdaaaa;
  --bbcux-border: rgba(239, 225, 225, 0.18);
  --bbcux-focus: #ffffff;
  --bbcux-max: 1160px;
  --bbcux-radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bbcux-bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bbcux-bg);
  color: var(--bbcux-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

a {
  color: var(--bbcux-red);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--bbcux-text);
}

:focus-visible {
  outline: 2px solid var(--bbcux-focus);
  outline-offset: 3px;
}

.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;
}

.screen-reader-text:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--bbcux-red);
  color: #fff;
  border-radius: var(--bbcux-radius);
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header,
.site-footer {
  background: var(--bbcux-bg);
  border-color: var(--bbcux-border);
}

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--bbcux-border);
}

.site-header__inner,
.site-footer__inner,
.site-main {
  width: min(100% - 32px, var(--bbcux-max));
  margin-inline: auto;
}

.site-header__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 12px;
}

.site-branding {
  min-width: 0;
}

.site-title {
  margin: 0;
  color: var(--bbcux-text);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.15;
}

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

.site-description {
  margin: 4px 0 0;
  color: var(--bbcux-muted);
  font-size: 0.9rem;
  line-height: 1.25;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--bbcux-border);
  border-radius: var(--bbcux-radius);
  background: var(--bbcux-surface);
  color: var(--bbcux-text);
  cursor: pointer;
}

.menu-toggle:hover {
  background: var(--bbcux-red-dark);
}

.primary-navigation ul,
.footer-navigation ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-navigation a,
.footer-navigation a {
  color: var(--bbcux-text);
  text-decoration: none;
  font-weight: 650;
}

.primary-navigation a:hover,
.footer-navigation a:hover {
  color: var(--bbcux-red);
}

.site-main {
  flex: 1;
  padding-block: 28px 44px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 20px;
}

.footer-note {
  margin: 0;
  color: var(--bbcux-muted);
  font-size: 0.92rem;
}

.content-wrap {
  display: grid;
  gap: 22px;
}

.content-panel {
  background: var(--bbcux-surface);
  border: 1px solid var(--bbcux-border);
  border-radius: var(--bbcux-radius);
  padding: clamp(18px, 4vw, 30px);
}

.entry-title,
.archive-title,
h1,
h2,
h3 {
  color: var(--bbcux-red);
  line-height: 1.18;
}

.entry-title,
.archive-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 6vw, 3.5rem);
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  min-height: 44px;
  border: 0;
  border-radius: var(--bbcux-radius);
  background: var(--bbcux-red-dark);
  color: #fff;
  padding: 10px 16px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--bbcux-red);
  color: #fff;
}

input,
select,
textarea {
  max-width: 100%;
  border: 1px solid var(--bbcux-border);
  border-radius: var(--bbcux-radius);
  background: #111;
  color: var(--bbcux-text);
  padding: 10px 12px;
  font: inherit;
}

textarea {
  width: 100%;
}

.alignwide {
  width: min(100%, 1280px);
  max-width: 1280px;
  margin-inline: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.bbe-fallback-template {
  display: grid;
  gap: 28px;
}

.bbe-fallback-template .bbe-showcase,
.bbe-fallback-template .bbe-book-grid-wrap {
  width: 100%;
}

.bbe-fallback-template > .bbe-member-actions,
.bbe-fallback-template > .bbe-user-ratings-wrap,
.bbe-fallback-template > .bbe-related {
  width: 100%;
}

.comments-area {
  margin-top: 28px;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment-body {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--bbcux-border);
  border-radius: var(--bbcux-radius);
  background: var(--bbcux-surface-soft);
}

@media (max-width: 800px) {
  .site-header__inner {
    align-items: flex-start;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: absolute;
    inset: 72px 16px auto 16px;
    z-index: 30;
    display: none;
    padding: 14px;
    border: 1px solid var(--bbcux-border);
    border-radius: var(--bbcux-radius);
    background: var(--bbcux-bg);
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-navigation ul {
    display: grid;
    gap: 4px;
  }

  .primary-navigation a {
    display: block;
    padding: 10px 8px;
  }

  .site-footer__inner {
    display: grid;
  }
}
