/**
 * GLOBAL
 **/
#bbpress-forums,
#bbp-user-wrapper,
.bbp-alert-outer,
.bbp-login-form,
.bbp-template-notice {
  --bbp-bg: var(--wp--preset--color--base);
  --bbp-text: var(--wp--preset--color--contrast);
  --bbp-primary: var(--wp--preset--color--accent-1);

  --bbp-surface: #0e0e0e;
  --bbp-surface-2: #141414;
  --bbp-surface-3: #1b1b1b;
  --bbp-text-muted: rgba(255,255,255,.75);
  --bbp-border: #2a2a2a;
  --bbp-border-2: #333;

  --fs-xs: clamp(1rem, var(--wp--preset--font-size--custom-1), 999rem);
  --fs-sm: clamp(1rem, var(--wp--preset--font-size--small), 999rem);
  --fs-md: clamp(1rem, var(--wp--preset--font-size--medium), 999rem);
  --fs-lg: clamp(1rem, var(--wp--preset--font-size--large), 999rem);
  --fs-xl: clamp(1rem, var(--wp--preset--font-size--x-large), 999rem);
  --fs-xxl: clamp(1rem, var(--wp--preset--font-size--xx-large), 999rem);
}

/**
 * BASIC
 **/
#bbpress-forums {
  width: 100%;
  max-width: 1280px;
  /*background: var(--bbp-bg) !important;*/
  /*color: var(--bbp-text) !important;*/
  font-size: var(--fs-md) !important;
  line-height: 1.6 !important;
}

#bbpress-forums ul.bbp-forums, 
#bbpress-forums ul.bbp-lead-topic, 
#bbpress-forums ul.bbp-replies, 
#bbpress-forums ul.bbp-search-results, 
#bbpress-forums ul.bbp-topics {
  font-size: var(--fs-md) !important;
}

#bbpress-forums p,
#bbpress-forums li,
#bbpress-forums td,
#bbpress-forums th { 
  font-size: var(--fs-md);
}
#bbpress-forums h1 { 
  font-size: var(--fs-xxl);
  line-height: 1.2;
}
#bbpress-forums h2 { 
  font-size: var(--fs-xl);
  line-height: 1.25;
}
#bbpress-forums h3 { 
  font-size: var(--fs-lg);
  line-height: 1.3;
}
#bbpress-forums h4 { 
  font-size: var(--fs-md);
  line-height: 1.35;
}
#bbpress-forums h5,
#bbpress-forums h6 {
  font-size: var(--fs-sm);
  line-height: 1.4;
}

:root :where(#bbpress-forums .wp-element-button:focus,
#bbpress-forums .wp-block-button__link:focus) {
  outline-color: var(--wp--preset--color--accent-1);
}

/**
 * LINKS / STATES
 **/
#bbpress-forums a {
  color: var(--bbp-primary);
  text-decoration-color: var(--bbp-primary);
}
#bbpress-forums a:hover,
#bbpress-forums a:focus {
  color: color-mix(in srgb, var(--bbp-primary) 75%, white);
  text-decoration-color: currentColor;
}


/**
 * LISTS / TABLES
 *
#bbpress-forums ul,
#bbpress-forums.bbpress-wrapper ul { 
  background: transparent;
}

#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-lead-topic,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results,
#bbpress-forums ul.bbp-topics {
  background: var(--bbp-surface) !important;
  border: 1px solid var(--bbp-border) !important;
}

#bbpress-forums div.even,
#bbpress-forums ul.even,
#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
  background-color: var(--bbp-surface) !important;
  border-top: 1px solid var(--bbp-border) !important;
}
#bbpress-forums div.odd,
#bbpress-forums ul.odd { background-color: var(--bbp-surface-2) !important; }

#bbpress-forums .status-spam.even,
#bbpress-forums .status-trash.even,
#bbpress-forums .status-spam.odd,
#bbpress-forums .status-trash.odd { background-color: #2a0016 !important; }
#bbpress-forums .status-pending.even,
#bbpress-forums .status-pending.odd,
#bbpress-forums ul.status-pending a { background-color: #1a0f18 !important; }

/**
 * HEADER / FOOTER ROWS
 *
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer,
#bbpress-forums div.bbp-forum-header,
#bbpress-forums div.bbp-reply-header,
#bbpress-forums div.bbp-topic-header {
  background: var(--bbp-surface-2) !important;
  color: var(--bbp-text) !important;
  border-top: 1px solid var(--bbp-border) !important;
  font-size: var(--fs-sm);
}
#bbpress-forums li.bbp-header { background: var(--bbp-surface-3) !important; }

/**
 * META / SUB-LISTS
 *
#bbpress-forums .bbp-forums-list { border-left: 1px solid var(--bbp-border) !important; }
#bbpress-forums .bbp-forum-info .bbp-forum-content,
#bbpress-forums p.bbp-topic-meta {
  color: var(--bbp-text-muted) !important;
  font-size: var(--fs-sm);
}

/**
 * AUTHORS / AVATARS
 *
#bbpress-forums div.bbp-forum-author,
#bbpress-forums div.bbp-reply-author,
#bbpress-forums div.bbp-topic-author { color: var(--bbp-text) !important; }

#bbpress-forums .widget_display_replies img.avatar,
#bbpress-forums .widget_display_topics img.avatar,
#bbpress-forums div.bbp-template-notice img.avatar,
#bbpress-forums p.bbp-topic-meta img.avatar,
#bbpress-forums ul.bbp-reply-revision-log img.avatar,
#bbpress-forums ul.bbp-topic-revision-log img.avatar {
  border: 3px double var(--bbp-border) !important;
}

/**
 * CONTENT / CODE
 *
#bbpress-forums div.bbp-forum-content,
#bbpress-forums div.bbp-reply-content,
#bbpress-forums div.bbp-topic-content { color: var(--bbp-text) !important; }

#bbpress-forums div.bbp-reply-content a,
#bbpress-forums div.bbp-topic-content a {
  color: var(--bbp-primary) !important;
  text-decoration-color: var(--bbp-primary) !important;
}

#bbpress-forums div.bbp-reply-content a.bbp-user-mention,
#bbpress-forums div.bbp-topic-content a.bbp-user-mention {
  color: var(--bbp-primary) !important;
  background: color-mix(in srgb, var(--bbp-primary) 20%, transparent);
  padding: 0 .2em;
  border-radius: 2px;
}

#bbpress-forums div.bbp-reply-content code,
#bbpress-forums div.bbp-reply-content pre,
#bbpress-forums div.bbp-topic-content code,
#bbpress-forums div.bbp-topic-content pre {
  background-color: #111 !important;
  border: 1px solid var(--bbp-border) !important;
  color: var(--bbp-text) !important;
  font-size: var(--fs-sm);
}

/**
 * BREADCRUMBS / ADMIN
 *
div.bbp-breadcrumb,
div.bbp-topic-tags,
span.bbp-admin-links { color: var(--bbp-text-muted) !important; }
span.bbp-admin-links a { color: var(--bbp-text-muted) !important; font-size: var(--fs-xs) !important; }
span.bbp-admin-links a:hover { color: var(--bbp-primary) !important; }

/**
 * FAVORITES / SUBSCRIPTIONS
 *
.bbp-row-actions #favorite-toggle a,
.bbp-row-actions #subscription-toggle a {
  color: var(--bbp-primary) !important;
  border: 1px solid var(--bbp-primary) !important;
  background-color: transparent !important;
  font-size: var(--fs-sm);
}
.bbp-row-actions #favorite-toggle a:hover,
.bbp-row-actions #subscription-toggle a:hover {
  background-color: color-mix(in srgb, var(--bbp-primary) 18%, transparent) !important;
}
.bbp-row-actions #favorite-toggle span.is-favorite a,
.bbp-row-actions #subscription-toggle span.is-subscribed a {
  background-color: color-mix(in srgb, var(--bbp-primary) 18%, transparent) !important;
}

/**
 * PAGINATION
 *
#bbpress-forums .bbp-pagination { color: var(--bbp-text-muted); }
#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span.current {
  border: 1px solid var(--bbp-border) !important;
  color: var(--bbp-text) !important;
  background: var(--bbp-surface-2) !important;
  font-size: var(--fs-sm);
}
#bbpress-forums .bbp-pagination-links a:hover,
#bbpress-forums .bbp-pagination-links span.current,
#bbpress-forums .bbp-topic-pagination a:hover {
  background: color-mix(in srgb, var(--bbp-primary) 18%, transparent) !important;
  border-color: var(--bbp-primary) !important;
}

/**
 * FORMS / INPUTS
 *
#bbpress-forums fieldset.bbp-form {
  border: 1px solid var(--bbp-border) !important;
  background: var(--bbp-surface) !important;
  color: var(--bbp-text) !important;
  font-size: var(--fs-md);
}
#bbpress-forums fieldset.bbp-form legend,
#bbpress-forums label { color: var(--bbp-text) !important; }

#bbpress-forums fieldset.bbp-form input[type=text],
#bbpress-forums fieldset.bbp-form input[type=password],
#bbpress-forums fieldset.bbp-form select,
#bbpress-forums fieldset.bbp-form textarea,
#bbpress-forums #bbp-your-profile fieldset input,
#bbpress-forums #bbp-your-profile fieldset textarea,
#bbpress-forums #bbp-your-profile fieldset select {
  background: #0f0f0f !important;
  border: 1px solid var(--bbp-border-2) !important;
  color: var(--bbp-text) !important;
  font-size: var(--fs-md);
}
#bbpress-forums fieldset.bbp-form input:focus,
#bbpress-forums fieldset.bbp-form textarea:focus,
#bbpress-forums #bbp-your-profile fieldset input:focus,
#bbpress-forums #bbp-your-profile fieldset textarea:focus,
#bbpress-forums #bbp-your-profile fieldset select:focus {
  outline: none;
  border-color: var(--bbp-primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bbp-primary) 20%, transparent) !important;
}

#bbpress-forums div.bbp-the-content-wrapper input[type=button] {
  color: var(--bbp-text) !important;
  border: 1px solid var(--bbp-border) !important;
  font-size: var(--fs-sm);
}
#bbpress-forums div.bbp-the-content-wrapper input[type=button]:hover {
  border-color: var(--bbp-primary) !important;
  background-color: color-mix(in srgb, var(--bbp-primary) 18%, transparent) !important;
}

/**
 * USER / PROFILE NAV
 *
#bbpress-forums #bbp-single-user-details #bbp-user-navigation a {
  border: 1px solid var(--bbp-border) !important;
  color: var(--bbp-text) !important;
  background: var(--bbp-surface) !important;
  font-size: var(--fs-sm);
}
#bbpress-forums #bbp-single-user-details #bbp-user-navigation li.current a {
  background: color-mix(in srgb, var(--bbp-primary) 18%, transparent) !important;
}

/**
 * NOTICES / ALERTS
 *
div.bbp-template-notice,
div.indicator-hint {
  background: #111 !important;
  border-color: var(--bbp-border) !important;
  color: var(--bbp-text) !important;
  font-size: var(--fs-sm);
}
div.bbp-template-notice.info { background: #0f1520 !important; border-color: #233 !important; }
div.bbp-template-notice.important { background: #1a1500 !important; border-color: #443300 !important; }
div.bbp-template-notice.error,
div.bbp-template-notice.warning { background: #22070f !important; border-color: #5a0f22 !important; }
div.bbp-template-notice a { color: var(--bbp-primary) !important; }

/**
 * MISC
 *
span.bbp-author-ip { color: var(--bbp-text-muted) !important; font-size: var(--fs-xs); }
#bbpress-forums hr { border: 0; border-top: 1px solid var(--bbp-border) !important; }

/**
 * RESPONSIVE (typography-only tweaks where relevant)
 *
@media (max-width: 1023px) {
  #bbpress-forums div.bbp-forum-title h3,
  #bbpress-forums div.bbp-reply-title h3,
  #bbpress-forums div.bbp-topic-title h3 { font-size: var(--fs-lg); }
}

@media (max-width: 480px) {
  #bbpress-forums .bbp-body div.bbp-reply-author,
  #bbpress-forums .bbp-body div.bbp-topic-author {
    border-bottom: 1px solid var(--bbp-border) !important;
  }
}
