/**
 * wpForo Styles for Extendable Theme
 */

#wpforo {
    width: var(--wp--style--global--wide-size);
    max-width: var(--wp--style--global--wide-size) !important;
    margin-left: calc(
        (var(--wp--style--global--content-size) - var(--wp--style--global--wide-size)) / 2
    );
    box-sizing: border-box;
}

/* ── Hide "Main Category" ─────────────────────────────────── */

.wpforo-cat-panel {
    display: none !important;
}

/* From breadcrumbs — always the 2nd item, never root or active */
#wpforo #wpforo-wrap .wpf-breadcrumb .wpf-item-element:nth-child(2):not(.wpf-root):not(.active) {
    display: none !important;
}

/* ── Breadcrumb — plain text style ───────────────────────── */

/* Switch from float chain to simple flex row */
#wpforo #wpforo-wrap .wpf-breadcrumb {
    display: flex !important;
    align-items: center !important;
    background: transparent !important;
    border: none !important;
    margin: 12px 0 !important;
    overflow: visible !important;
}

#wpforo #wpforo-wrap .wpf-breadcrumb div {
    display: inline-flex !important;
    align-items: center !important;
    float: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    position: static !important;
    color: #888 !important;
}

#wpforo #wpforo-wrap .wpf-breadcrumb div:hover {
    background: transparent !important;
}

/* Remove the left border from root item */
#wpforo #wpforo-wrap .wpf-breadcrumb .wpf-root {
    border: none !important;
}

/* Replace rotated-square chevrons with plain " > " */
#wpforo #wpforo-wrap .wpf-breadcrumb div:after,
#wpforo #wpforo-wrap .wpf-breadcrumb div.active:after {
    content: ">" !important;
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    font-size: 11px !important;
    color: #bbb !important;
    padding: 0 6px !important;
    z-index: auto !important;
    display: inline !important;
}

/* Remove the trailing > after the active (current) item */
#wpforo #wpforo-wrap .wpf-breadcrumb div.active:after {
    display: none !important;
}

/* Hide hover ::after too */
#wpforo #wpforo-wrap .wpf-breadcrumb div:hover:after {
    background: transparent !important;
}

/* Hide the house icon, show "Forum" text */
#wpforo #wpforo-wrap .wpf-breadcrumb .wpf-root a i.fa-home {
    display: none !important;
}

#wpforo #wpforo-wrap .wpf-breadcrumb .wpf-root a span {
    display: inline !important;
}

/* Breadcrumb links */
#wpforo #wpforo-wrap .wpf-breadcrumb a {
    color: #888 !important;
    text-decoration: none !important;
    font-size: 13px !important;
}

#wpforo #wpforo-wrap .wpf-breadcrumb a:hover {
    color: #333 !important;
}

/* Active item */
#wpforo #wpforo-wrap .wpf-breadcrumb div.active {
    background: transparent !important;
    color: #555 !important;
}

/* Hide .wpf-end trailing space */
#wpforo #wpforo-wrap .wpf-breadcrumb .wpf-end {
    display: none !important;
}

/* ── Subtop — no border between breadcrumb and forum list ─ */

.wpforo-subtop {
    padding: 8px 0 16px;
    background: transparent;
    border-bottom: none !important;
    margin-bottom: 0;
}

/* ── Forum list ───────────────────────────────────────────── */

.wpforo-section,
.wpfl-2.wpforo-section {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wpfl-2.wpforo-section > .wpforo-category {
    display: none !important;
}

.forum-wrap {
    border-bottom: 1px solid #e8e8e8;
    margin: 0 !important;
    padding: 0 !important;
}

.forum-wrap:first-of-type {
    border-top: 1px solid #e8e8e8;
}

.wpforo-forum {
    padding: 16px 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    align-items: center;
}

.wpforo-forum:hover {
    background: #fafafa !important;
}

/* ── Forum titles ─────────────────────────────────────────── */

.wpforo-forum-title a {
    font-size: 15px !important;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}

.wpforo-forum-title a:hover {
    color: var(--wp--preset--color--primary, #e07020);
}

/* Override inline styles in descriptions */
.wpforo-forum-description,
.wpforo-forum-description p,
.wpforo-forum-description span {
    font-family: inherit !important;
    font-size: 13px !important;
    color: #777 !important;
    line-height: 1.5 !important;
}

/* ── Stats — match description font/size ─────────────────── */

.wpf-compact-view,
.wpf-compact-view .wpf-compact-row,
.wpf-compact-last-post,
.wpf-cl-title {
    font-family: inherit !important;
    font-size: 13px !important;
    color: #777 !important;
    line-height: 1.5 !important;
}

/* ── Reply form — hide auto-populated title field ─────────── */
/* Only on post/reply pages (.wpft-post), not on new topic creation */

.wpft-post .wpf-field-name-title {
    display: none !important;
}

/* ── Post view — remove clutter ──────────────────────────── */

.wpf-post-head-top,
.wpf-topic-more-info {
    display: none !important;
}

/* ── Subforum / topic list ────────────────────────────────── */

.wpforo-forum-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-bottom: 1px solid #e8e8e8 !important;
    padding: 16px 0 !important;
    margin-bottom: 0 !important;
}

.wpforo-forum-header .wpforo-forum-description,
.wpforo-forum-header .wpforo-forum-description p,
.wpforo-forum-header .wpforo-forum-description span {
    font-family: inherit !important;
    font-size: 13px !important;
    color: #777 !important;
}

.wpforo-topic-wrap {
    border-bottom: 1px solid #e8e8e8;
}

.wpforo-topic {
    background: transparent !important;
    box-shadow: none !important;
}

.wpforo-topic:hover {
    background: #fafafa !important;
}

/* ── Reset / Lost Password Form ──────────────────────────── */

/* Hide breadcrumb on reset/lost password pages */
#wpforo #wpforo-wrap:has(#wpforo-title) .wpf-breadcrumb {
    display: none !important;
}

/* Title */
#wpforo #wpforo-wrap #wpforo-title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    color: var(--wp--preset--color--foreground, #333) !important;
    margin-bottom: 1.5rem !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* The card — white + shadow, replacing wpForo's gray box */
#wpforo #wpforo-wrap .wpforo-login-wrap .wpforo-login-table {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12) !important;
    padding: 2rem !important;
    width: 100% !important;
    max-width: 420px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Remove alternating gray row backgrounds */
#wpforo #wpforo-wrap .wpforo-login-wrap .wpforo-table .wpfw-1 .wpf-field:nth-child(even) {
    background-color: transparent !important;
}

/* Field spacing */
#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field {
    background: transparent !important;
    margin-bottom: 1.25rem;
}

/* Labels — override wpForo's inline text-align:center */
#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field-wrap label {
    text-align: left !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--wp--preset--color--foreground, #333) !important;
    padding-bottom: 0.5rem !important;
    line-height: 1.5 !important;
}

/* Inputs */
#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field-wrap input[type="password"],
#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field-wrap input[type="text"],
#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field-wrap input[type="email"] {
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    background-color: #fff !important;
    border: 1px solid #999 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: auto !important;
}

#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field-wrap input[type="password"]:focus,
#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field-wrap input[type="text"]:focus,
#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field-wrap input[type="email"]:focus {
    outline: none !important;
    border-color: var(--wp--preset--color--primary, #e07020) !important;
    box-shadow: 0 0 0 3px rgba(224, 112, 32, 0.15) !important;
}

/* Submit button — orange */
#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field-wrap input[type="submit"] {
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    color: #fff !important;
    background-color: var(--wp--preset--color--primary, #e07020) !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: opacity 0.15s ease !important;
    height: auto !important;
}

#wpforo #wpforo-wrap .wpforo-login-wrap .wpf-field-wrap input[type="submit"]:hover {
    opacity: 0.9;
}
