/*
 Theme Name: Steel City LUG – Brickburgh
 Theme URI: https://www.steelcitylug.com
 Author: Steel City LUG
 Author URI: https://www.steelcitylug.com
 Description: Custom LEGO/Pittsburgh theme for Steel City LUG with bbPress + Envira integration.
 Version: 1.1.0
 Requires at least: 5.3
 Requires PHP: 7.4
 License: GNU General Public License v2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: brickburgh
*/

:root {
    color-scheme: dark;
    --bg: #111111;
    --bg-alt: #181818;
    --bg-soft: #151515;
    --text: #f4f4f4;
    --text-muted: #aaaaaa;
    --accent: #ffc800;
    --accent-soft: #ffe25e;
    --accent-fill: #ffc800;
    --accent-fill-hover: #ffe25e;
    --accent-readable: #ffd34d;
    --card-border: rgba(255, 255, 255, 0.05);
    --control-border: #6d6d6d;
    --focus: #ffd34d;
    --header-bg: #111111;
    --header-bg-alt: #222222;
    --header-text: #f4f4f4;
    --header-muted: #c7c7c7;
    --header-accent: #ffd34d;
}

/* Light theme overrides */
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f5f5;
    --bg-alt: #ffffff;
    --bg-soft: #eeeeee;
    --text: #111111;
    --text-muted: #555555;
    --accent: #755600;
    --accent-soft: #5b4300;
    --accent-fill: #e0a400;
    --accent-fill-hover: #ffd95e;
    --accent-readable: #755600;
    --card-border: rgba(0, 0, 0, 0.08);
    --control-border: #888888;
    --focus: #755600;
}

.card-grid--quick-links {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.eligibility-bubble {
  display: inline-block;
  background: linear-gradient(135deg, #006b57, #00866d);
  color: #fff;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  animation: pulse 2s infinite;
}
.eligibility-bubble.ineligible {
  background: #e9ecef;
  color: #555;
  box-shadow: none;
  animation: none;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,184,148,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(0,184,148,0); }
}

@media (prefers-reduced-motion: reduce) {
  .eligibility-bubble {
    animation: none;
  }

  .skip-link,
  .main-navigation .menu-item-has-children > a::after {
    transition: none;
  }
}

.forum-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}
.events-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.events-list li + li {
    margin-top: 0.4rem;
}

.forum-list li + li {
    margin-top: 0.5rem;
}

.theme-toggle {
    margin-left: 1rem;
    background: transparent;
    border-radius: 999px;
    border: 1px solid var(--header-accent);
    min-height: 44px;
    min-width: 44px;
    padding: 0.35rem 0.75rem;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--header-accent);
    cursor: pointer;
}
.quick-links-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.quick-links-menu a {
    color: var(--accent);
    text-decoration: none;
}

.quick-links-menu a:hover {
    text-decoration: underline;
}

.theme-toggle:hover {
    background: rgba(255, 200, 0, 0.1);
}


html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

iframe,
embed,
object,
.wp-caption {
    max-width: 100%;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link {
    background: var(--header-accent);
    border-radius: 0 0 0.5rem 0;
    color: #111111;
    font-weight: 700;
    left: 0;
    padding: 0.75rem 1rem;
    position: fixed;
    top: 0;
    transform: translateY(-150%);
    transition: transform 0.15s ease-out;
    z-index: 100000;
}

.skip-link:focus {
    color: #111111;
    transform: translateY(0);
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

/* These surfaces stay dark even when the rest of the site uses light mode. */
.site-header :where(a, button, input, textarea, select, [tabindex]):focus-visible,
.hero :where(a, button, input, textarea, select, [tabindex]):focus-visible {
    outline-color: var(--header-accent);
}

/* Layout */

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

.site-header {
    background: linear-gradient(135deg, var(--header-bg) 0%, #181818 60%, var(--header-bg-alt) 100%);
    border-bottom: 4px solid var(--header-accent);
    position: sticky;
    top: 0;
    z-index: 999;
}

body.admin-bar .site-header {
    top: 32px;
}

:target {
    scroll-margin-top: 6rem;
}

body.admin-bar :target {
    scroll-margin-top: 8rem;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
}
.user-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.user-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-list li + li {
    margin-top: 0.45rem;
}

.user-list-avatar img {
    border-radius: 50%;
    display: block;
}

.user-list-meta a {
    color: var(--accent);
    text-decoration: none;
}

.user-list-meta a:hover {
    text-decoration: underline;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.site-title {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--header-accent);
    margin: 0;
}

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

.site-description {
    font-size: .8rem;
    color: var(--header-muted);
    margin: 0.15rem 0 0;
}

/* Nav */

.main-navigation {
    font-size: 0.9rem;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.main-navigation a {
    text-decoration: none;
    color: var(--header-text);
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    position: relative;
}

.site-logo img {
    max-height: 44px;
    width: auto;
    display: block;
}
/* --- Primary menu + dropdowns --- */
.main-navigation .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
  align-items: center;
}

.main-navigation .menu li {
  position: relative;
}
/* Submenu indicator */
.main-navigation .menu-item-has-children > a::after {
  content: "\25BE";
  display: inline-block;
  margin-left: 6px;
  font-size: 0.75em;
  opacity: 0.7;
  transform: translateY(-1px);
  transition: transform 0.15s ease-out;
}

/* Optional: rotate caret when open */
.main-navigation .menu-item-has-children.is-open > a::after,
.main-navigation .menu-item-has-children:hover > a::after,
.main-navigation .menu-item-has-children:focus-within > a::after {
  transform: rotate(180deg);
}

.main-navigation .menu-item-has-children.is-focus-closed:hover > a::after,
.main-navigation .menu-item-has-children.is-focus-closed:focus-within > a::after {
  transform: translateY(-1px);
}

/* Submenu indicator */
.main-navigation .menu-item-has-children > a {
  padding-right: 16px;
}


.main-navigation .menu a {
  display: inline-block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--header-text);
}

.main-navigation .menu a:hover,
.main-navigation .menu a:focus-visible {
  background: #303030;
}

.header-account-links {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.header-signin {
  border: 1px solid var(--header-accent);
  color: var(--header-accent) !important;
  display: inline-block;
  font-weight: 700;
  padding: 10px 12px !important;
}

.header-signin:hover,
.header-signin:focus-visible {
  background: rgba(255, 200, 0, 0.12);
}

.main-navigation .menu li.menu-item-has-children::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:100%;
  height:10px;     /* bridge height */
}
.main-navigation .menu > li > a {
  border-bottom: 2px solid transparent;
  padding: 10px 12px 8px;
}

.main-navigation .menu > li > a:hover,
.main-navigation .menu > .current-menu-item > a,
.main-navigation .menu > .current-menu-ancestor > a {
  border-bottom-color: var(--header-accent);
}
.main-navigation .menu-item-has-children.is-open > .sub-menu { display:block; }
.main-navigation .menu .sub-menu {
  display: none;
  position: absolute;
  left: 0;
top: 100%;
margin-top: 0;
  min-width: 220px;
  padding: 8px;
  margin: 0;
  list-style: none;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  z-index: 9999;
}

.main-navigation .menu .sub-menu li {
  width: 100%;
}

.main-navigation .menu .sub-menu a {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

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

/* Pointer hover; keyboard and touch state is controlled by main.js. */
.main-navigation .menu li:hover > .sub-menu,
.main-navigation .menu li:focus-within > .sub-menu {
  display: block;
}

.main-navigation .menu li.is-focus-closed:hover > .sub-menu,
.main-navigation .menu li.is-focus-closed:focus-within > .sub-menu {
  display: none;
}

/* Mobile nav (simple) */

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--header-accent);
    border-radius: 999px;
    min-height: 44px;
    padding: .5rem .85rem;
    color: var(--header-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-navigation ul {
        flex-direction: column;
        align-items: flex-end;
    }
}

/* Hero */

.hero {
    background: linear-gradient(135deg, #111111, #242424);
    color: var(--header-text);
    padding: 3.5rem 1.25rem 2.5rem;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
}

.hero-title {
    font-family: 'Bangers', cursive;
    font-size: clamp(2.2rem, 4vw, 3rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
    color: var(--header-accent);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--header-text);
    max-width: 32rem;
}

.hero-actions {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.button,
.button-secondary {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.6rem 1.3rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.button {
    background: var(--accent-fill);
    color: #111;
}

.button:hover {
    background: var(--accent-fill-hover);
}

.button-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.button-secondary:hover {
    background: rgba(255, 200, 0, 0.12);
}

.hero .button-secondary {
    border-color: var(--header-accent);
    color: var(--header-accent);
}



/* Hero stats card (theme-aware) */
.hero-card {
    background: var(--bg-alt);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
    color: var(--text);
}

.hero-card h3 {
    margin-top: 0;
    margin-bottom: .75rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
}

.hero-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: .9rem;
    color: var(--text);
}

.hero-card-list li + li {
    margin-top: .35rem;
}


/* Main content */

.site-main {
    flex: 1 0 auto;
}

/* Friendly fallback for missing or member-only pages */
.card.not-found-card {
    border-color: var(--card-border);
    box-sizing: border-box;
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3rem);
    text-align: center;
}

.not-found-code {
    color: var(--accent-readable);
    font-family: 'Bangers', cursive;
    font-size: clamp(3.5rem, 12vw, 6rem);
    letter-spacing: .08em;
    line-height: .9;
    margin-bottom: .75rem;
}

.not-found-message,
.not-found-member-status {
    color: var(--text-muted);
    line-height: 1.7;
    margin: .75rem auto 0;
    max-width: 38rem;
}

.widget.not-found-login {
    background: var(--bg-soft);
    border-color: var(--control-border);
    margin: 1.75rem auto 0;
    max-width: 28rem;
    text-align: left;
}

.not-found-card .section-title,
.not-found-login .widget-title,
.not-found-card .not-found-login a {
    color: var(--accent-readable);
}

.not-found-login-copy {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 1rem;
}

.not-found-login-links {
    margin: .75rem 0 0;
}

.not-found-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.not-found-card .not-found-actions a {
    text-decoration: none;
}

.not-found-card .not-found-actions .button {
    color: #111;
}

.not-found-card .not-found-actions .button-secondary {
    border-color: var(--accent-readable);
    color: var(--accent-readable);
}

.section {
    padding: 2.5rem 1.25rem;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: 'Bangers', cursive;
    font-size: 1.6rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0;
}

.section-subtitle {
    font-size: .9rem;
    color: var(--text-muted);
}

/* Cards for events / posts */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--bg-alt);
    border-radius: 1rem;
    padding: 1.1rem 1.1rem 1.2rem;
    border: 1px solid var(--card-border);
}

.card h3,
article.card > h2 {
    margin-top: 0;
    margin-bottom: .4rem;
    font-size: 1rem;
}

.card a {
    color: var(--accent);
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}

.card-meta {
    font-size: .75rem;
    color: var(--text-muted);
}

/* Content typography */

.entry-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: .98rem;
    line-height: 1.7;
    color: var(--text);
}

.entry-content a {
    color: var(--accent);
}

/* Sidebar */

.sidebar {
    max-width: 300px;
}

.widget {
    background: var(--bg-alt);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--card-border);
    font-size: .9rem;
}

.widget-title {
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-top: 0;
    color: var(--accent);
}

/* Footer */

.site-footer {
    background: #050505;
    border-top: 3px solid var(--accent);
    padding: 1.5rem 1.25rem;
    font-size: .8rem;
    color: var(--text-muted);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu a {
    color: var(--accent);
}

/* bbPress tweaks */

/* Envira tweaks */

.envira-gallery-wrap {
    background: var(--bg-alt);
    border-radius: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--card-border);
}

.envira-gallery-item img {
    border-radius: .5rem;
}

/* Utility */

.text-center { text-align: center; }
/* ===== bbPress: use theme light/dark palette and restore table layout ===== */
/* ===== bbPress: use theme light/dark palette and restore table layout ===== */

/* Kill bullets + spacing so we can layout like a table */
ul.bbp-replies,
ul.bbp-replies > li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Wrapper around reply list */
ul.bbp-replies {
    background: var(--bg-alt) !important;
    border: 1px solid var(--card-border) !important;
}

/* Header & footer rows ("Author" / "Posts") */
li.bbp-header,
li.bbp-footer {
    background-color: var(--bg-soft) !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--card-border) !important;
    display: flex !important;
}

/* Header/footer cell labels */
li.bbp-header .bbp-reply-author,
li.bbp-header .bbp-reply-content,
li.bbp-footer .bbp-reply-author,
li.bbp-footer .bbp-reply-content {
    font-weight: 600 !important;
    padding: 0.5rem 0.75rem !important;
    color: var(--text) !important;  /* visible in both light/dark */
}

/* Each reply row container (your loop-item-0, loop-item-1 divs) */
ul.bbp-replies > li.bbp-body > div[class*="loop-item"],
ul.bbp-replies > li.bbp-body > div.reply,
ul.bbp-replies > li.bbp-body > div.topic {
    display: flex !important;
    background: var(--bg-alt) !important;
    color: var(--text) !important;
    border-top: 1px solid var(--card-border) !important;
}

/* Author column */
.bbp-reply-author {
    width: 180px !important;
    padding: 0.75rem !important;
    border-right: 1px solid var(--card-border) !important;
    background: transparent !important;
    color: var(--text) !important;
    vertical-align: top !important;
}
@media (max-width: 800px) {
  .site-header {
    position: static;
  }

  body.admin-bar .site-header {
    top: auto;
  }

  .site-header .header-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 10px 14px;
  }

  .main-navigation {
    flex: 1 0 100%;
  }

  .nav-toggle {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin-left: auto;
  }

  /* Hide the full horizontal menu by default */
  .main-navigation .menu {
    align-items: stretch;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding: 10px;
  }

  /* When open */
  .main-navigation.is-open .menu {
    display: flex;
  }

  /* Submenus become indented lists on mobile */
  .main-navigation .menu .sub-menu {
    background: transparent;
    border: 0;
    box-shadow: none;
    display: none;
    margin: 0;
    min-width: 0;
    padding: 6px 0 0 12px;
    position: static;
  }

  .main-navigation .menu li:hover > .sub-menu {
    display: none;
  }

  .main-navigation .menu li.menu-item-has-children.is-open > .sub-menu {
    display: block;
  }

  /* Bigger tap targets */
  .main-navigation .menu a {
    display: block;
    min-height: 44px;
    padding: 12px 10px;
    white-space: normal;
  }

  /* Hide the desktop caret behavior if you want, but it’s OK to keep */
}

/* Content column */
.bbp-reply-content {
    flex: 1 1 auto !important;
    padding: 0.75rem !important;
    background: transparent !important;
    color: var(--text) !important;
}

/* Meta line & small text */
.bbp-meta,
.bbp-reply-post-date,
.bbp-admin-links,
.bbp-author-role,
.bbp-author-ip {
    color: var(--text-muted) !important;
}

/* Links inside forums */
.bbp-replies a {
    color: var(--accent) !important;
}

.bbp-replies a:hover {
    color: var(--accent-soft) !important;
}
/* ===== bbPress: table-style layout + light/dark colors ===== */
/* Envira "View more" / pagination / load-more buttons (light + dark) */
.envira-gallery-wrap .envira-pagination,
.envira-gallery-wrap .envira-pagination a,
.envira-gallery-wrap .envira-pagination span,
.envira-gallery-wrap .envira-load-more,
.envira-gallery-wrap .envira-load-more a,
.envira-gallery-wrap .envira-load-more button,
.envira-gallery-wrap .envira-gallery-load-more,
.envira-gallery-wrap .envira-gallery-load-more a,
.envira-gallery-wrap .envira-gallery-load-more button,
.envira-gallery-wrap .envira-gallery-load-more-button {
  color: var(--text) !important;
}

/* Make them look like theme buttons and stay visible in dark mode */
.envira-gallery-wrap .envira-pagination a,
.envira-gallery-wrap .envira-load-more a,
.envira-gallery-wrap .envira-load-more button,
.envira-gallery-wrap .envira-gallery-load-more a,
.envira-gallery-wrap .envira-gallery-load-more button,
.envira-gallery-wrap .envira-gallery-load-more-button {
  display: inline-block;
  background: var(--bg-soft) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 0.75rem;
  padding: 0.55rem 0.9rem;
  text-decoration: none !important;
  font-weight: 600;
}

/* Hover/focus */
.envira-gallery-wrap .envira-pagination a:hover,
.envira-gallery-wrap .envira-load-more a:hover,
.envira-gallery-wrap .envira-load-more button:hover,
.envira-gallery-wrap .envira-gallery-load-more a:hover,
.envira-gallery-wrap .envira-gallery-load-more button:hover,
.envira-gallery-wrap .envira-gallery-load-more-button:hover {
  border-color: var(--accent) !important;
}

/* Your "recent gallery ribbon" below the album on the front page (safe catch-all) */
.section-builds a {
  color: var(--accent);
}
.section-builds a:hover {
  text-decoration: underline;
}

/* Show breadcrumbs; keep topic tags hidden for now */
.bbp-breadcrumb {
  display: block;
  margin: 0 0 12px 0;
  padding: 8px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: .9rem;
}

.bbp-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.bbp-breadcrumb a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
}

.bbp-topic-tags { display: none; }


/* Base forum font size */
#bbpress-forums {
    font-size: .95rem;
}

/* Kill bullets + base spacing on the replies list */
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-replies > li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Wrapper around the whole replies list */
#bbpress-forums ul.bbp-replies {
    background: var(--bg-alt) !important;
    border: 1px solid var(--card-border) !important;
}

/* Per-post meta rows (date, moderation links, and permalink) */
#bbpress-forums div.bbp-topic-header,
#bbpress-forums div.bbp-reply-header {
    background: var(--bg-soft) !important;
    color: var(--text-muted) !important;
    border-color: var(--card-border) !important;
}

/* Header & footer rows ("Author" / "Posts") */
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
    display: flex !important;
    background: var(--bg-soft) !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--card-border) !important;
}

/* "Author" / "Posts" text – make sure it’s visible on both themes */
#bbpress-forums li.bbp-header .bbp-reply-author,
#bbpress-forums li.bbp-header .bbp-reply-content,
#bbpress-forums li.bbp-footer .bbp-reply-author,
#bbpress-forums li.bbp-footer .bbp-reply-content {
    font-weight: 600 !important;
    padding: 0.5rem 0.75rem !important;
    color: var(--text) !important;
}

/* Each reply row (your loop-item-0, loop-item-1, etc.) */
#bbpress-forums ul.bbp-replies > li.bbp-body > div[class*="loop-item"],
#bbpress-forums ul.bbp-replies > li.bbp-body > div.reply,
#bbpress-forums ul.bbp-replies > li.bbp-body > div.topic {
    display: flex !important;
    background: var(--bg-alt) !important;
    color: var(--text) !important;
    border-top: 1px solid var(--card-border) !important;
}

/* Author column */
#bbpress-forums .bbp-reply-author {
    width: 180px !important;
    padding: 0.75rem !important;
    border-right: 1px solid var(--card-border) !important;
    background: transparent !important;
    color: var(--text) !important;
    vertical-align: top !important;
}
/* bbPress index tables (forums/topics) – make dark mode consistent */
#bbpress-forums .bbp-forums,
#bbpress-forums .bbp-topics,
#bbpress-forums .bbp-search-results {
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}

/* Header rows on index tables */
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
  background: var(--bg-soft) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--card-border) !important;
}

/* Body rows */
#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
  background: var(--bg-alt);
  border-top: 1px solid var(--card-border);
}

/* Row hover */
#bbpress-forums li.bbp-body ul.forum:hover,
#bbpress-forums li.bbp-body ul.topic:hover {
  background: var(--bg-soft);
}

/* Cell text */
#bbpress-forums .bbp-forum-info,
#bbpress-forums .bbp-topic-title,
#bbpress-forums .bbp-forum-content,
#bbpress-forums .bbp-topic-content {
  color: var(--text);
}

/* Freshness/voices columns + counts */
#bbpress-forums .bbp-forum-reply-count,
#bbpress-forums .bbp-forum-topic-count,
#bbpress-forums .bbp-topic-reply-count,
#bbpress-forums .bbp-topic-voice-count,
#bbpress-forums .bbp-forum-freshness,
#bbpress-forums .bbp-topic-freshness {
  color: var(--text-muted);
}

/* Ensure “meta” bits don’t go low-contrast in dark */
#bbpress-forums .bbp-topic-meta,
#bbpress-forums .bbp-forum-info .bbp-forum-content,
#bbpress-forums p.bbp-topic-meta {
  color: var(--text-muted);
}

/* Content column */
#bbpress-forums .bbp-reply-content {
    flex: 1 1 auto !important;
    padding: 0.75rem !important;
    background: transparent !important;
    color: var(--text) !important;
}

/* Meta text (date, role, IP, admin links) */
#bbpress-forums .bbp-meta,
#bbpress-forums .bbp-reply-post-date,
#bbpress-forums .bbp-admin-links,
#bbpress-forums .bbp-author-role,
#bbpress-forums .bbp-author-ip {
    color: var(--text-muted) !important;
}

/* Links inside forums */
#bbpress-forums a {
    color: var(--accent) !important;
}
#bbpress-forums a:hover {
    color: var(--accent-soft) !important;
}
/* bbPress should not be constrained to post/article width */
/* Let bbPress breathe (forum pages wider than blog posts) */
body.bbpress .entry-content,
body.bbp-user-page .entry-content,
body.bbp-search .entry-content {
  max-width: 1100px;
}
/* bbPress code blocks – readable in light + dark */
#bbpress-forums .bbp-topic-content code,
#bbpress-forums .bbp-reply-content code,
#bbpress-forums .bbp-topic-content pre,
#bbpress-forums .bbp-reply-content pre {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 10px;
}

/* Inline code */
#bbpress-forums .bbp-topic-content code,
#bbpress-forums .bbp-reply-content code {
  padding: 2px 6px;
  font-size: 0.95em;
}
#bbpress-forums code,
#bbpress-forums pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}
/* bbPress code readability fix (dark + light) */
#bbpress-forums .bbp-topic-content code,
#bbpress-forums .bbp-reply-content code {
  background: rgba(0,0,0,0.08); /* light mode fallback */
  color: var(--text);
}

/* Dark mode: stronger contrast */
:root:not([data-theme="light"]) #bbpress-forums .bbp-topic-content code,
:root:not([data-theme="light"]) #bbpress-forums .bbp-reply-content code {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
}

/* Block code */
#bbpress-forums .bbp-topic-content pre,
#bbpress-forums .bbp-reply-content pre {
  background: rgba(0,0,0,0.12);
}

/* Dark mode block code */
:root:not([data-theme="light"]) #bbpress-forums .bbp-topic-content pre,
:root:not([data-theme="light"]) #bbpress-forums .bbp-reply-content pre {
  background: rgba(0,0,0,0.45);
  color: #f5f7fa;
}

/* Code blocks */
#bbpress-forums .bbp-topic-content pre,
#bbpress-forums .bbp-reply-content pre {
  padding: 12px 14px;
  overflow: auto;
  margin: 10px 0;
}

/* If your theme or a plugin sets code color elsewhere, this wins */
#bbpress-forums .bbp-topic-content pre code,
#bbpress-forums .bbp-reply-content pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}


/* Let the forum container use the full width available */
body.bbpress #bbpress-forums {
  width: 100%;
}
/* bbPress buttons + inputs follow theme colors */
#bbpress-forums input[type="text"],
#bbpress-forums input[type="email"],
#bbpress-forums input[type="url"],
#bbpress-forums input[type="password"],
#bbpress-forums textarea,
#bbpress-forums select {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
}

#bbpress-forums button,
#bbpress-forums input[type="submit"],
#bbpress-forums .button {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

#bbpress-forums button:hover,
#bbpress-forums input[type="submit"]:hover,
#bbpress-forums .button:hover {
  border-color: var(--accent);
}

/* =====================================================================
   Forum layout + footer theme + mobile wins (2026-01-25)
   ===================================================================== */

/* Footer: theme-aware background (light/dark) */
.site-footer { background: var(--bg-alt); }

/* Forum page: 2-column layout (content + sidebar) */
.layout-two-col{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:1.5rem;
  align-items:start;
}
.layout-main,
.layout-sidebar{
  min-width:0;
}
.entry-content--wide{ max-width:none; margin:0; }
.user-list--inline{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:0.6rem 1rem;
}
.user-list--inline li + li{ margin-top:0; }

/* Theme forms in homepage tools, sidebars, search fallbacks, and the member-aware 404. */
.widget form p,
.home-tools form p {
  margin: 0 0 0.65rem;
}

.widget form label,
.home-tools form label,
.site-main .search-form label {
  color: var(--text-muted);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.widget form input[type="text"],
.widget form input[type="search"],
.widget form input[type="email"],
.widget form input[type="url"],
.widget form input[type="password"],
.widget form input[type="tel"],
.widget form textarea,
.widget form select,
.home-tools form input[type="text"],
.home-tools form input[type="search"],
.home-tools form input[type="email"],
.home-tools form input[type="url"],
.home-tools form input[type="password"],
.home-tools form input[type="tel"],
.home-tools form textarea,
.home-tools form select,
.site-main .search-form input[type="search"] {
  background: var(--bg-alt);
  border: 1px solid var(--control-border);
  border-radius: 10px;
  box-sizing: border-box;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.widget form input[type="submit"],
.widget form button[type="submit"],
.home-tools form input[type="submit"],
.home-tools form button[type="submit"],
.site-main .search-form input[type="submit"],
.site-main .search-form button[type="submit"] {
  background: var(--accent-fill);
  border: 0;
  border-radius: 999px;
  color: #111111;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 14px;
}

.widget form input[type="submit"]:hover,
.widget form button[type="submit"]:hover,
.home-tools form input[type="submit"]:hover,
.home-tools form button[type="submit"]:hover,
.site-main .search-form input[type="submit"]:hover,
.site-main .search-form button[type="submit"]:hover {
  background: var(--accent-fill-hover);
}

.widget form input:focus-visible,
.widget form textarea:focus-visible,
.widget form select:focus-visible,
.home-tools form input:focus-visible,
.home-tools form textarea:focus-visible,
.home-tools form select:focus-visible,
.site-main .search-form input:focus-visible,
.site-main .search-form button:focus-visible {
  border-color: var(--focus);
}

.bbp-search-form form > div,
.theme-forum-search__controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bbp-search-form input[type="text"],
.bbp-search-form input[type="search"] {
  flex: 1 1 12rem;
}

.bbp-search-form input[type="submit"] {
  flex: 0 0 auto;
}

/* Desktop win: make sidebar feel "anchored" when scrolling long threads */
@media (min-width: 951px){
  .layout-sidebar{
    position: sticky;
    top: 90px; /* below the sticky header */
  }
}

/* Mobile wins: stack layout, increase tap targets, reduce cramped spacing */
@media (max-width: 950px){
  .layout-two-col{ grid-template-columns:1fr; }
  .sidebar{ max-width:none; }
  .widget{ padding:0.9rem 1rem; }
}

/* Mobile win: make reply layout readable (author column collapses above content) */
@media (max-width: 700px){
  #bbpress-forums ul.bbp-replies > li.bbp-body > div[class*="loop-item"],
  #bbpress-forums ul.bbp-replies > li.bbp-body > div.reply,
  #bbpress-forums ul.bbp-replies > li.bbp-body > div.topic{
    flex-direction: column;
  }

  body.bbpress #bbpress-forums ul.bbp-replies > li.bbp-body div.bbp-reply-author{
    box-sizing:border-box !important;
    flex:0 0 auto !important;
    margin:0 !important;
    max-width:none !important;
    min-height:84px;
    min-width:0 !important;
    padding:0.75rem 0.75rem 0.75rem 5.25rem !important;
    position:relative;
    text-align:left;
    width:100% !important;
    border-right:0 !important;
    border-bottom:1px solid var(--card-border) !important;
  }

  body.bbpress #bbpress-forums ul.bbp-replies > li.bbp-body div.bbp-reply-author img.avatar{
    height:auto !important;
    left:0.75rem !important;
    margin:0 !important;
    max-width:60px !important;
    position:absolute !important;
    top:0.75rem !important;
    width:60px !important;
  }

  body.bbpress #bbpress-forums ul.bbp-replies > li.bbp-body div.bbp-reply-author .bbp-author-name,
  body.bbpress #bbpress-forums ul.bbp-replies > li.bbp-body div.bbp-reply-author .bbp-author-role,
  body.bbpress #bbpress-forums ul.bbp-replies > li.bbp-body div.bbp-reply-author .bbp-reply-ip{
    clear:none;
    display:block;
    margin-left:0;
    max-width:100%;
    overflow-wrap:anywhere;
  }

  body.bbpress #bbpress-forums ul.bbp-replies > li.bbp-body div.bbp-reply-content{
    box-sizing:border-box !important;
    margin:0 !important;
    max-width:none !important;
    min-width:0 !important;
    overflow-wrap:anywhere;
    width:100% !important;
  }
}

/* Mobile win: allow forum index tables to scroll instead of squishing columns */
@media (max-width: 700px){
  #bbpress-forums .bbp-forums,
  #bbpress-forums .bbp-topics,
  #bbpress-forums .bbp-search-results{
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
  }
  #bbpress-forums ul.bbp-forums,
  #bbpress-forums ul.bbp-topics{
    min-width: 680px; /* keeps columns usable */
  }
}

/* ===== Sidebar link styling (fix default blue links in widgets) ===== */
.sidebar .widget a,
.layout-sidebar .widget a {
  color: var(--accent);
  text-decoration: none;
}
.sidebar .widget a:visited,
.layout-sidebar .widget a:visited {
  color: var(--accent);
}
.sidebar .widget a:hover,
.layout-sidebar .widget a:hover {
  color: var(--accent-soft);
  text-decoration: underline;
}
.sidebar .widget a:focus,
.layout-sidebar .widget a:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}


/* Home: login + forum search tools */
.card-grid--tools{
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
}
.home-tools .card h3{
    margin-top: 0;
}
.home-tools-hint{
    margin-top: 10px;
}

/* BuddyPress Messages: ensure readable in dark mode (and consistent in light) */
#buddypress .messages-notices,
#buddypress #message-threads,
#buddypress .message-box,
#buddypress .thread-content,
#buddypress .thread-from,
#buddypress .thread-subject,
#buddypress .thread-date,
#buddypress .thread-count,
#buddypress .messages .pagination,
#buddypress .messages .item-list-tabs,
#buddypress .standard-form,
#buddypress form#send_message_form,
#buddypress form#send-reply{
    color: var(--text);
}

#buddypress table#message-threads,
#buddypress .message-box,
#buddypress .messages-notices,
#buddypress .standard-form,
#buddypress form#send_message_form,
#buddypress form#send-reply{
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    border-radius: 14px;
}

#buddypress table#message-threads td,
#buddypress table#message-threads th{
    background: transparent;
    border-color: var(--card-border);
}

#buddypress .thread-subject a,
#buddypress a{
    color: var(--accent);
}

#buddypress input[type="text"],
#buddypress input[type="search"],
#buddypress input[type="password"],
#buddypress textarea{
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--card-border);
}

#buddypress .item-list-tabs ul li a{
    color: var(--text);
}

#buddypress .item-list-tabs ul li.selected a,
#buddypress .item-list-tabs ul li.current a{
    color: var(--accent);
}

/* BuddyPress Activity: keep stream cards readable in dark mode */
:root:not([data-theme="light"]) #buddypress #activity-stream,
:root:not([data-theme="light"]) #buddypress .activity-list,
:root:not([data-theme="light"]) #buddypress .activity-list > li,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-item,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-content,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-inner,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-comments,
:root:not([data-theme="light"]) #buddypress .activity-list .acomment-content{
    background: var(--bg-alt) !important;
    border-color: var(--card-border) !important;
    color: var(--text) !important;
}

:root:not([data-theme="light"]) #buddypress .activity-list .activity-content,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-inner,
:root:not([data-theme="light"]) #buddypress .activity-list .acomment-content{
    background: transparent !important;
}

:root:not([data-theme="light"]) #buddypress .activity-list .activity-header,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-header p,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-inner p,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-meta,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-meta a,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-read-more,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-time-since,
:root:not([data-theme="light"]) #buddypress .activity-list .acomment-meta,
:root:not([data-theme="light"]) #buddypress .activity-list .acomment-options{
    color: var(--text) !important;
}

:root:not([data-theme="light"]) #buddypress .activity-list a,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-header a,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-meta a:hover,
:root:not([data-theme="light"]) #buddypress .activity-list .acomment-options a{
    color: var(--accent-soft) !important;
}

:root:not([data-theme="light"]) #buddypress .activity-list .activity-meta a,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-read-more a,
:root:not([data-theme="light"]) #buddypress .activity-list .button,
:root:not([data-theme="light"]) #buddypress .activity-list button,
:root:not([data-theme="light"]) #buddypress .activity-list input[type="submit"]{
    background: var(--bg-soft) !important;
    border-color: var(--control-border) !important;
    color: var(--accent-soft) !important;
}

:root:not([data-theme="light"]) #buddypress .activity-list .activity-meta a:hover,
:root:not([data-theme="light"]) #buddypress .activity-list .activity-read-more a:hover,
:root:not([data-theme="light"]) #buddypress .activity-list .button:hover,
:root:not([data-theme="light"]) #buddypress .activity-list button:hover,
:root:not([data-theme="light"]) #buddypress .activity-list input[type="submit"]:hover{
    background: var(--bg) !important;
    color: var(--accent) !important;
}

:root:not([data-theme="light"]) #buddypress #activity-filter-select select,
:root:not([data-theme="light"]) #buddypress .activity-type-tabs,
:root:not([data-theme="light"]) #buddypress .activity-subnav{
    background: var(--bg-soft) !important;
    border-color: var(--card-border) !important;
    color: var(--text) !important;
}


/* ------------------------------
   bbPress search results – dark mode hard overrides
   (Some bbPress templates inject light backgrounds)
---------------------------------*/
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results,
:root:not([data-theme="light"]) #bbpress-forums ul.bbp-search-results {
  background: var(--bg-alt) !important;
}

:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results li.bbp-body,
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results li.bbp-body ul.topic,
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results li.bbp-body ul.forum {
  background: var(--bg-alt) !important;
  color: var(--text) !important;
}

:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results .bbp-topic-content,
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results .bbp-reply-content,
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results .bbp-search-content,
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results .bbp-topic-excerpt,
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results .bbp-reply-excerpt {
  background: transparent !important;
  color: var(--text) !important;
}

:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results a {
  color: var(--accent-soft) !important;
}
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results a:hover {
  color: var(--accent) !important;
}

:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results .bbp-pagination,
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results .bbp-pagination-count,
:root:not([data-theme="light"]) #bbpress-forums .bbp-search-results .bbp-pagination-links {
  color: var(--text-muted) !important;
}


/* ------------------------------
   bbPress search results – dark mode (table + reply wrappers)
---------------------------------*/
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results > li,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-header,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-footer {
  background: var(--bg-alt) !important;
  color: var(--text) !important;
  border-color: var(--card-border) !important;
}

:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-header .bbp-search-author,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-header .bbp-search-content {
  background: transparent !important;
  color: var(--text) !important;
}

:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-reply-header,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-reply-header .bbp-meta,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-reply-header .bbp-reply-title,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-reply-author,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-reply-content,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-reply-content *,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-author-role,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-author-role * {
  background: transparent !important;
  color: var(--text) !important;
}

:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-reply-header {
  border-bottom: 1px solid var(--card-border) !important;
}

:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-body,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-body > div,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-body > .hentry {
  background: var(--bg) !important;
  border-color: var(--card-border) !important;
}

:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-body > .hentry {
  border-radius: 12px;
  overflow: hidden;
}

:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results .bbp-reply-permalink,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results a.bbp-topic-permalink,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results a.bbp-author-link,
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results a {
  color: var(--accent-soft) !important;
}
:root:not([data-theme="light"]) #bbpress-forums #bbp-search-results a:hover {
  color: var(--accent) !important;
}

@media (max-width: 600px) {
  .bbp-search-form input[type="submit"] {
    flex-basis: 100%;
    width: 100%;
  }

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

  .site-title {
    font-size: 1.45rem;
  }

  .site-description {
    font-size: 0.75rem;
  }
}

/* bbPress front-end link dialog: WordPress loads this outside #bbpress-forums. */
:root:not([data-theme="light"]) #wp-link-wrap {
  background: var(--bg-alt) !important;
  border: 1px solid var(--card-border) !important;
  color: var(--text) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap .link-target,
:root:not([data-theme="light"]) #wp-link-wrap .howto,
:root:not([data-theme="light"]) #wp-link-wrap h1,
:root:not([data-theme="light"]) #wp-link-wrap h2,
:root:not([data-theme="light"]) #wp-link-wrap h3,
:root:not([data-theme="light"]) #wp-link-wrap label,
:root:not([data-theme="light"]) #wp-link-wrap .query-notice,
:root:not([data-theme="light"]) #wp-link-wrap .query-results,
:root:not([data-theme="light"]) #wp-link-wrap .query-results li,
:root:not([data-theme="light"]) #wp-link-wrap .query-results li a,
:root:not([data-theme="light"]) #wp-link-wrap .query-results li a * {
  color: var(--text) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap input[type="text"],
:root:not([data-theme="light"]) #wp-link-wrap input[type="search"] {
  background: var(--bg-soft) !important;
  border: 1px solid var(--control-border) !important;
  color: var(--text) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap input::placeholder {
  color: var(--text-muted) !important;
  opacity: 1;
}

:root:not([data-theme="light"]) #wp-link-wrap .query-results {
  background: var(--bg-soft) !important;
  border-color: var(--control-border) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap .query-results li {
  border-color: var(--card-border) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap .query-results li:hover,
:root:not([data-theme="light"]) #wp-link-wrap .query-results .selected {
  background: var(--bg) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap .query-results li a:hover,
:root:not([data-theme="light"]) #wp-link-wrap .query-results .selected a {
  color: var(--accent-soft) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap .submitbox {
  background: var(--bg-alt) !important;
  border-top-color: var(--card-border) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap .button,
:root:not([data-theme="light"]) #wp-link-wrap .button-secondary {
  background: var(--bg-soft) !important;
  border-color: var(--control-border) !important;
  color: var(--text) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap .button-primary {
  background: var(--accent-fill) !important;
  border-color: var(--accent-fill) !important;
  color: #111111 !important;
}

:root:not([data-theme="light"]) #wp-link-wrap .submitbox .cancel {
  color: var(--accent-soft) !important;
}

:root:not([data-theme="light"]) #wp-link-wrap .close,
:root:not([data-theme="light"]) #wp-link-wrap .toggle-arrow {
  color: var(--accent-readable) !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
