/*
Theme Name: Podcast Child - PHXPodcast.club
Theme URI: https://phxpodcast.club
Description: Child theme for PHXPodcast.club with bbPress forum styling
Author: Don Burnside
Author URI: https://donburnside.com
Template: podcast
Version: 1.0.0
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: podcast-child
*/

/* ==========================================================================
   bbPress Forum Styles for Podcast Theme
   ========================================================================== */

/* ---------------------------------------------------------------------
   Forum Layout & Containers
   --------------------------------------------------------------------- */

#bbpress-forums {
    font-family: var(--podcast-ff-primary);
    font-size: 1rem;
    line-height: 1.6;
}

#bbpress-forums .bbp-breadcrumb,
#bbpress-forums .bbp-breadcrumb a {
    font-size: 0.875rem;
    color: var(--podcast-secondary-text-color);
}

#bbpress-forums .bbp-breadcrumb a:hover {
    color: var(--podcast-link-color);
}

/* Forum/Topic Lists */
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-replies {
    list-style: none;
    margin: 0;
    padding: 0;
}

#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
    background-color: var(--podcast-special-background-color);
    color: var(--podcast-primary-accent-complementary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.875rem 1.25rem;
    border-radius: 0;
}

#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums li.bbp-body ul.topic {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Individual Forum/Topic Rows */
#bbpress-forums li.bbp-body .bbp-forum-info,
#bbpress-forums li.bbp-body .bbp-topic-title {
    padding: 1.25rem;
}

#bbpress-forums .bbp-forums-list {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
}

#bbpress-forums .bbp-forums-list a {
    color: var(--podcast-secondary-text-color);
}

#bbpress-forums .bbp-forums-list a:hover {
    color: var(--podcast-link-color);
}

/* Forum/Topic Titles */
#bbpress-forums .bbp-forum-title,
#bbpress-forums .bbp-topic-permalink {
    font-family: var(--podcast-ff-accent);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--podcast-primary-text-color);
    text-decoration: none;
}

#bbpress-forums .bbp-forum-title:hover,
#bbpress-forums .bbp-topic-permalink:hover {
    color: var(--podcast-link-color);
    text-decoration: underline;
}

/* Forum Descriptions */
#bbpress-forums .bbp-forum-content {
    color: var(--podcast-secondary-text-color);
    font-size: 0.9375rem;
    margin-top: 0.375rem;
}

/* Row Styling */
#bbpress-forums .bbp-body > ul {
    border-bottom: 1px solid var(--podcast-border-color-900);
}

#bbpress-forums .bbp-body > ul:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

#bbpress-forums .bbp-body > ul:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Column Widths */
#bbpress-forums .bbp-forum-topic-count,
#bbpress-forums .bbp-forum-reply-count,
#bbpress-forums .bbp-topic-voice-count,
#bbpress-forums .bbp-topic-reply-count {
    font-size: 0.875rem;
    color: var(--podcast-secondary-text-color);
    text-align: center;
}

#bbpress-forums .bbp-forum-freshness,
#bbpress-forums .bbp-topic-freshness {
    font-size: 0.8125rem;
    color: var(--podcast-secondary-text-color);
}

#bbpress-forums .bbp-forum-freshness a,
#bbpress-forums .bbp-topic-freshness a {
    color: var(--podcast-secondary-text-color);
}

#bbpress-forums .bbp-forum-freshness a:hover,
#bbpress-forums .bbp-topic-freshness a:hover {
    color: var(--podcast-link-color);
}

/* ---------------------------------------------------------------------
   Single Topic & Replies
   --------------------------------------------------------------------- */

#bbpress-forums div.bbp-topic-header,
#bbpress-forums div.bbp-reply-header {
    background-color: var(--podcast-special-background-color);
    color: var(--podcast-primary-accent-complementary-color);
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
}

#bbpress-forums div.bbp-topic-header a,
#bbpress-forums div.bbp-reply-header a {
    color: var(--podcast-primary-accent-complementary-color);
}

#bbpress-forums div.bbp-topic-header a:hover,
#bbpress-forums div.bbp-reply-header a:hover {
    color: var(--podcast-neutral-color-100);
    text-decoration: underline;
}

/* Reply/Topic Author */
#bbpress-forums div.bbp-topic-author,
#bbpress-forums div.bbp-reply-author {
    text-align: center;
    padding: 1.25rem;
    background-color: rgba(0, 0, 0, 0.02);
}

#bbpress-forums .bbp-author-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--podcast-primary-text-color);
    display: block;
    margin-top: 0.5rem;
}

#bbpress-forums .bbp-author-role {
    font-size: 0.75rem;
    color: var(--podcast-secondary-text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Reply/Topic Content */
#bbpress-forums div.bbp-topic-content,
#bbpress-forums div.bbp-reply-content {
    padding: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    border-bottom: 1px solid var(--podcast-border-color-900);
}

#bbpress-forums div.bbp-reply-content p:last-child {
    margin-bottom: 0;
}

/* Avatar Styling */
#bbpress-forums .bbp-topic-author img.avatar,
#bbpress-forums .bbp-reply-author img.avatar {
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ---------------------------------------------------------------------
   Forms: New Topic, Reply, Search
   --------------------------------------------------------------------- */

#bbpress-forums fieldset.bbp-form {
    border: none;
    margin: 2rem 0;
    padding: 0;
}

#bbpress-forums fieldset.bbp-form legend {
    font-family: var(--podcast-ff-accent);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--podcast-primary-text-color);
    padding: 0;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--podcast-special-background-color);
    padding-bottom: 0.5rem;
    width: 100%;
}

#bbpress-forums label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--podcast-primary-text-color);
}

#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 {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: var(--podcast-ff-primary);
    border: 1px solid var(--podcast-border-color-900);
    background-color: var(--podcast-neutral-color-100);
    color: var(--podcast-primary-text-color);
    border-radius: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#bbpress-forums input[type="text"]:focus,
#bbpress-forums input[type="email"]:focus,
#bbpress-forums input[type="url"]:focus,
#bbpress-forums input[type="password"]:focus,
#bbpress-forums textarea:focus,
#bbpress-forums select:focus {
    border-color: var(--podcast-primary-accent-color);
    box-shadow: inset 0 0 0 1px var(--podcast-primary-accent-color);
    outline: none;
}

#bbpress-forums textarea {
    min-height: 200px;
    line-height: 1.6;
}

/* Submit Buttons */
#bbpress-forums button,
#bbpress-forums input[type="submit"],
#bbpress-forums .bbp-submit-wrapper button {
    background-color: var(--podcast-primary-accent-color);
    color: var(--podcast-primary-accent-complementary-color);
    font-family: var(--podcast-ff-primary);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.9375rem 1.875rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
}

#bbpress-forums button:hover,
#bbpress-forums input[type="submit"]:hover,
#bbpress-forums .bbp-submit-wrapper button:hover {
    background-color: var(--podcast-primary-text-color);
    color: var(--podcast-neutral-color-100);
    text-decoration: underline;
}

/* Form Spacing */
#bbpress-forums .bbp-form p {
    margin-bottom: 1.25rem;
}

#bbpress-forums .bbp-submit-wrapper {
    margin-top: 1.5rem;
}

/* ---------------------------------------------------------------------
   Pagination
   --------------------------------------------------------------------- */

#bbpress-forums .bbp-pagination {
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

#bbpress-forums .bbp-pagination-count {
    color: var(--podcast-secondary-text-color);
}

#bbpress-forums .bbp-pagination-links a,
#bbpress-forums .bbp-pagination-links span.current {
    display: inline-block;
    padding: 0.5rem 0.875rem;
    margin: 0 0.125rem;
    text-decoration: none;
}

#bbpress-forums .bbp-pagination-links a {
    background-color: var(--podcast-neutral-color-100);
    color: var(--podcast-primary-text-color);
    border: 1px solid var(--podcast-border-color-900);
}

#bbpress-forums .bbp-pagination-links a:hover {
    background-color: var(--podcast-special-background-color);
    color: var(--podcast-primary-accent-complementary-color);
    border-color: var(--podcast-special-background-color);
}

#bbpress-forums .bbp-pagination-links span.current {
    background-color: var(--podcast-special-background-color);
    color: var(--podcast-primary-accent-complementary-color);
    font-weight: 600;
}

/* ---------------------------------------------------------------------
   Search
   --------------------------------------------------------------------- */

#bbpress-forums #bbp-search-form {
    margin-bottom: 2rem;
}

#bbpress-forums #bbp-search-form #bbp_search {
    width: calc(100% - 120px);
    display: inline-block;
    vertical-align: top;
}

#bbpress-forums #bbp-search-form #bbp_search_submit {
    width: 110px;
    display: inline-block;
    vertical-align: top;
    margin-left: 0.5rem;
}

/* Search Results */
#bbpress-forums .bbp-search-results {
    margin-top: 1.5rem;
}

/* ---------------------------------------------------------------------
   Notices & Alerts
   --------------------------------------------------------------------- */

#bbpress-forums div.bbp-template-notice,
#bbpress-forums div.indicator-hint {
    background-color: var(--podcast-special-background-color);
    color: var(--podcast-primary-accent-complementary-color);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--podcast-primary-accent-color);
}

#bbpress-forums div.bbp-template-notice.info {
    background-color: #e8f4f8;
    color: var(--podcast-primary-text-color);
    border-left-color: #0288d1;
}

#bbpress-forums div.bbp-template-notice.warning {
    background-color: #fff3e0;
    color: var(--podcast-primary-text-color);
    border-left-color: #ff9800;
}

#bbpress-forums div.bbp-template-notice.error {
    background-color: #ffebee;
    color: var(--podcast-primary-text-color);
    border-left-color: #f44336;
}

#bbpress-forums div.bbp-template-notice p {
    margin: 0;
}

#bbpress-forums div.bbp-template-notice a {
    color: inherit;
    text-decoration: underline;
}

/* ---------------------------------------------------------------------
   User Profile
   --------------------------------------------------------------------- */

#bbpress-forums #bbp-user-wrapper {
    margin-top: 1rem;
}

#bbpress-forums #bbp-user-avatar img.avatar {
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#bbpress-forums #bbp-user-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.5rem;
}

#bbpress-forums #bbp-user-navigation li {
    margin: 0;
}

#bbpress-forums #bbp-user-navigation a {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--podcast-secondary-text-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

#bbpress-forums #bbp-user-navigation a:hover {
    background-color: var(--podcast-neutral-color-100);
    color: var(--podcast-primary-text-color);
}

#bbpress-forums #bbp-user-navigation li.current a {
    background-color: var(--podcast-special-background-color);
    color: var(--podcast-primary-accent-complementary-color);
}

/* User Profile Content */
#bbpress-forums #bbp-user-body {
    margin-top: 1.5rem;
}

#bbpress-forums .bbp-user-section {
    margin-bottom: 2rem;
}

#bbpress-forums .bbp-user-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid var(--podcast-special-background-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* ---------------------------------------------------------------------
   Topic Tags
   --------------------------------------------------------------------- */

#bbpress-forums .bbp-topic-tags a {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--podcast-secondary-text-color);
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    margin: 0.125rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

#bbpress-forums .bbp-topic-tags a:hover {
    background-color: var(--podcast-special-background-color);
    color: var(--podcast-primary-accent-complementary-color);
}

/* ---------------------------------------------------------------------
   Sticky & Closed Topics
   --------------------------------------------------------------------- */

#bbpress-forums .bbp-topics .status-closed .bbp-topic-permalink,
#bbpress-forums .bbp-topics .super-sticky .bbp-topic-permalink,
#bbpress-forums .bbp-topics .sticky .bbp-topic-permalink {
    font-weight: 700;
}

#bbpress-forums .bbp-topics .super-sticky,
#bbpress-forums .bbp-topics .sticky {
    background-color: rgba(0, 0, 0, 0.04);
}

#bbpress-forums .bbp-topics .status-closed .bbp-topic-permalink::before {
    content: "🔒 ";
    font-size: 0.875em;
}

/* ---------------------------------------------------------------------
   Admin Links
   --------------------------------------------------------------------- */

#bbpress-forums .bbp-admin-links {
    font-size: 0.75rem;
    margin-top: 0.75rem;
}

#bbpress-forums .bbp-admin-links a {
    color: var(--podcast-secondary-text-color);
    text-decoration: none;
    margin-right: 0.75rem;
}

#bbpress-forums .bbp-admin-links a:hover {
    color: var(--podcast-link-color);
    text-decoration: underline;
}

/* ---------------------------------------------------------------------
   Responsive Adjustments
   --------------------------------------------------------------------- */

@media screen and (max-width: 768px) {
    #bbpress-forums .bbp-forum-topic-count,
    #bbpress-forums .bbp-forum-reply-count,
    #bbpress-forums .bbp-topic-voice-count,
    #bbpress-forums .bbp-topic-reply-count,
    #bbpress-forums .bbp-forum-freshness,
    #bbpress-forums .bbp-topic-freshness {
        display: none;
    }

    #bbpress-forums li.bbp-header .bbp-forum-info,
    #bbpress-forums li.bbp-header .bbp-topic-title-data {
        width: 100% !important;
    }

    #bbpress-forums div.bbp-topic-author,
    #bbpress-forums div.bbp-reply-author {
        width: 100%;
        padding: 1rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }

    #bbpress-forums .bbp-topic-author img.avatar,
    #bbpress-forums .bbp-reply-author img.avatar {
        width: 48px !important;
        height: 48px !important;
    }

    #bbpress-forums .bbp-author-name {
        margin-top: 0;
    }

    #bbpress-forums div.bbp-topic-content,
    #bbpress-forums div.bbp-reply-content {
        width: 100%;
    }

    #bbpress-forums #bbp-search-form #bbp_search {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    #bbpress-forums #bbp-search-form #bbp_search_submit {
        width: 100%;
        margin-left: 0;
    }

    #bbpress-forums #bbp-user-navigation ul {
        flex-direction: column;
    }
}

/* ---------------------------------------------------------------------
   Fixes for Podcast Theme Specific Issues
   --------------------------------------------------------------------- */

/* Ensure proper width in content area */
.bbp-forum-page .entry-content,
.bbp-topic-page .entry-content,
.bbp-reply-page .entry-content,
.bbp-user-page .entry-content,
.bbp-search-page .entry-content {
    max-width: 100%;
}

/* Fix for odd spacing on forum pages */
#site-main .bbp-template-notice {
    margin-top: 0;
}

/* Ensure forums don't break the grid */
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-topics {
    overflow: hidden;
}
