/*----------------------------------------------------*/
@use "el-widgets/variables" as *;
@use "el-widgets/columns";
@use "titlebar";
/*---------------------------------------------------- */

.forum-single-content {

    .content,
    .comment-content {
        img {
            max-width: 100%;
            height: auto;
            border: 1px solid #eaeeef;
        }
    }

    p {
        word-break: break-word;
    }
}

.forum-post-top {
    display: flex;
    justify-content: start;
    margin-bottom: 14px;

    .bbp-author-wrap {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-right: auto;

        >.bbp-author-link {
            img {
                border-radius: 50%;
                max-width: 38px;
                height: auto;
                margin-top: -2px;
            }

            @media (max-width: 550px) {
                display: none;
            }
        }
    }

    .topic-author {
        display: flex;
        align-items: center;
        gap: 6px;

        a {
            text-decoration: none;
        }
    }

    .forum-post-content .content.editor-content p {
        font-size: 16px;
    }

    .forum-post-author {
        margin-right: auto;

        .bbp-author-link {
            font-size: 14px;
            font-weight: 500;
            color: var(--black_700);
            line-height: 1.4;

            &:hover {
                color: var(--bbpc_brand_color);
            }
        }

        .bbp-author-name {
            font-size: 15px;
            font-weight: 500;
            color: var(--black_700);
            line-height: 1.4;
        }

        .forum-author-meta {
            display: flex;
            align-items: center;

            a:hover {
                color: var(--bbpc_brand_color);
            }

            .author-badge {

                >svg,
                >img {
                    margin-top: -5px;
                    margin-right: 5px;
                }

                .forumax-role-icon {
                    margin-right: 5px;
                }

                i {
                    margin-right: 5px;
                    color: #838793;
                }

                &:first-child {
                    margin-right: 20px;
                    margin-top: -2px;
                }
            }

            &.meta {
                font-size: 14px;
                font-weight: 400;
                color: var(--black_400);

                .dot {
                    @media (max-width: 480px) {
                        display: none;
                    }
                }

                .replies-count {
                    @media (max-width: 480px) {
                        display: none;
                    }
                }
            }
        }
    }

    .reply-admin-links {
        width: auto;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        flex-shrink: 0;
        flex-wrap: nowrap;
        justify-content: flex-end;

        .private-reply-badge {
            display: inline-flex;
            align-items: center;
            height: 28px;
            padding: 0 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0;
            line-height: 1;
            color: #8a5a00;
            background: #fff4cf;
            border: 1px solid #ffe7ab;
            white-space: nowrap;
        }

        .reply-admin-menu-wrap {
            display: inline-flex;
            align-items: center;
            height: 30px;
            min-width: 34px;
        }

        .bbp-admin-links-dropdown {
            display: inline-flex;
            align-items: center;
            margin: 0;
        }

        .bbp-admin-links-dropdown .frmx-nice-select {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 34px;
            height: 30px;
            padding: 0 6px;
            line-height: 1;
        }

        .bbp-admin-links-dropdown .frmx-nice-select .current::before {
            line-height: 1;
            display: block;
        }
    }
}

.author-badge.badge {
    font-weight: 500;
    padding: 2px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 20px;
    height: auto !important;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: capitalize;
    // background: transparent;
    color: var(--black_500);
    border: none !important;


    &.moderator {
        background: rgb(8 102 255 / 10%);
        color: #6b7280;
    }

    &.keymaster {
        background: var(--black_100);
        color: var(--black_750);
    }

    &.participant {
        background: rgb(37 99 235 / 10%);
        color: #1d4ed8;
    }

    &.member {
        background: rgb(71 85 105 / 10%);
        color: #334155;
    }

    >img,
    >svg {
        margin-right: 0;
        width: 14px;
        height: 14px;
    }

    .forumax-role-icon {
        width: 18px;
        height: 18px;
        min-width: 18px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgb(71 85 105 / 16%);
        color: #fff;
    }

    .forumax-role-icon svg {
        width: 11px;
        height: 11px;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
        fill: none;
    }

    &.keymaster .forumax-role-icon {
        background: #111827;
        color: #fff;
    }

    &.moderator .forumax-role-icon {
        background: #2563eb;
        color: #fff;
    }

    &.participant .forumax-role-icon {
        background: #2563eb;
        color: #fff;
    }

    &.member .forumax-role-icon {
        background: #475569;
        color: #fff;
    }

    &.spectator .forumax-role-icon {
        background: #0891b2;
        color: #fff;
    }

    &.blocked .forumax-role-icon {
        background: #dc2626;
        color: #fff;
    }
}

.action-button-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;

    @media (max-width: 425px) {
        flex-direction: column;
        gap: 10px;
    }

    &.action-btns {
        justify-content: flex-start;
        margin-top: 12px;
        // align-items: center;
        justify-content: space-between;

        ul {
            padding-left: 0;
        }

        .action_btn {
            height: 30px;
            font-size: 14px;
            line-height: 30px;
            padding: 0 15px;
            font-weight: 400;
        }

        .bbp-admin-links {
            margin-bottom: 0;
            flex-wrap: wrap;
            display: flex;
            gap: 12px;
            padding: 0;
            margin: 0;

            li {
                list-style: none;
                padding-right: 14px;
                margin-bottom: 0;

                &:hover a::before {
                    width: 100%;
                }

                a {
                    position: relative;
                    color: var(--bbpc_brand_color);
                    font-size: 14px;
                    font-weight: 500;
                    text-decoration: none;
                    border-color: var(--black_50);
                }
            }
        }
    }

    .ask-btn {
        box-shadow: none;
        font-size: 16px;
        font-weight: 500;
        padding: 8px 28px;
        margin-top: 2px;

        &:hover {
            background: #16c9f0;
        }
    }

    .reply-btn {
        margin-right: 10px;
    }

    .too-btn {
        background: #fff;
        border: 1px solid #d0d8dc;
        color: var(--secondary_color);

        &:hover {
            background: #fff;
            border: 1px solid var(--secondary_color);
            color: var(--secondary_color);
        }
    }
}

.q-title {
    display: flex;
    padding: 0 15px 30px 2px;
    align-items: center;
    gap: 20px;

    h1 {
        font-size: 34px;
        line-height: 1.3;
        flex: 1;
        margin: 0;
    }

    .badge {
        margin-left: 10px;
        line-height: 1.4;
        margin-top: 5px;
    }

    .solved-topic-bar {
        display: inline-block;
        margin-left: 10px;

        .accepted-ans-mark {
            color: #0d600d;
            display: inline-flex;
            align-items: center;
            font-size: 14px;
            font-weight: 400;
            background: rgb(62 204 62 / 18%);
            border-radius: 20px;
            padding: 5px 12px;
            margin: 0;
            gap: 5px;
        }

        .icon_check_alt2:before {
            margin-right: 3px;
        }
    }
}

.badge {
    font-size: 11px;
    background: rgba(175, 184, 193, 0.2);
    color: var(--black_800);
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 5px;
    display: inline-block;
    vertical-align: middle;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-decoration: none !important;
    box-sizing: content-box;
    line-height: unset;

    &.badge-14 {
        font-size: 14px;
        padding: 5px 15px;
    }
}

.forum-post-content {

    p {
        word-break: break-word;
    }

    .forum-post-btm {
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid var(--black_50);
        padding-bottom: 20px;
        padding-top: 30px;

        .taxonomy {
            font-size: 14px;
            display: flex;
            align-items: center;

            i,
            img {
                margin-right: 10px;
            }

            img {
                max-width: 20px;
                max-height: 20px;
                margin-right: 10px !important;
            }
        }
    }
}


.forum-post-content {
    .topic-content-layout {
        display: flex;
        align-items: flex-start;
        gap: 0;
    }

    .topic-vote-column {
        flex: 0 0 48px;
        display: flex;
        justify-content: center;
    }

    .topic-vote-column .bbp-voting {
        position: static !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 0;
        margin: 6px 0 0;
        border: none;
        background: transparent;
    }

    .topic-content-body {
        flex: 1;
        min-width: 0;
    }
}



@media (max-width: 576px) {
    .forum-post-content {
        .topic-content-layout {
            flex-direction: column;
            gap: 12px;
        }

        .topic-vote-column {
            flex: 0 0 auto;
            justify-content: flex-start;
        }

        .topic-vote-column .bbp-voting {
            flex-direction: row;
        }
    }
}

.dot {
    width: 3px;
    height: 3px;
    background-color: var(--black_400);
    border-radius: 50%;
    margin: 0 6px;
}

.question-icon {
    color: var(--secondary_color);
    font-weight: 600;
    font-size: 22px;
    margin-left: -2px;
    line-height: normal;

    @media (max-width: 576px) {
        display: none !important;
    }
}

.bbp-admin-links-dropdown {
    position: relative;

    .frmx-nice-select,
    .bbp-admin-dropdown-menu {
        background: transparent;
        border: 1px solid var(--black_75, #e5e7eb);
        cursor: pointer;
        width: auto;
        padding: 0;
        height: auto;
        line-height: 1;
        border-radius: 6px;
        transition: all 0.2s ease;

        &:hover {
            background: rgba(var(--bbpc_brand_color_rgb, 67, 97, 238), 0.05);
            /* Brand color slight tint */
            border-color: rgba(var(--bbpc_brand_color_rgb, 67, 97, 238), 0.3);
            /* Brand color border highlight */
        }

        // Hide the dropdown arrow, only show ⋮ icon.
        &::after {
            display: none;
        }

        .current {
            font-size: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 30px;
            height: 26px;

            &::before {
                content: "⋮";
                font-size: 20px;
                color: var(--black_500, #6b7280);
                vertical-align: middle;
                line-height: 1;
                transition: color 0.2s ease;
            }
        }

        &:hover .current::before {
            color: var(--bbpc_brand_color, #4f46e5);
        }

        // Dropdown panel.
        .list {
            right: 0;
            left: auto;
            min-width: 180px;
            padding: 6px;
            margin-top: 6px;
            border-radius: 10px;
            border: 1px solid var(--black_75, #e5e7eb);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
            overflow: visible;
        }

        // Individual option items.
        .list .option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            min-height: auto;
            line-height: 1.4;
            font-size: 13.5px;
            font-weight: 450;
            color: var(--black_700, #374151);
            border-radius: 6px;
            transition: background 0.12s ease, color 0.12s ease;
            cursor: pointer;

            &:hover,
            &.focus,
            &.selected.focus {
                background: var(--black_25, #f7f8fa) !important;
                color: var(--black_900, #111827) !important;
            }

            // First item (trigger/placeholder) should be hidden in the list.
            &:first-child {
                display: none;
            }

            // Destructive actions styling.
            &[data-action="trash"],
            &[data-action="spam"] {
                color: #dc2626;

                .frmx-dropdown-icon svg {
                    stroke: #dc2626;
                }

                &:hover,
                &.focus {
                    background: #fef2f2 !important;
                    color: #b91c1c !important;

                    .frmx-dropdown-icon svg {
                        stroke: #b91c1c;
                    }
                }
            }

            // Approve/Unapprove uses amber tone.
            &[data-action="approve"] {
                color: #b45309;

                .frmx-dropdown-icon svg {
                    stroke: #b45309;
                }

                &:hover,
                &.focus {
                    background: #fffbeb !important;
                    color: #92400e !important;

                    .frmx-dropdown-icon svg {
                        stroke: #92400e;
                    }
                }
            }
        }

        // Separator divider.
        .list .option.frmx-dropdown-separator {
            padding: 3px 8px;
            min-height: 0;
            cursor: default;
            pointer-events: none;

            hr {
                border: none;
                border-top: 1px solid var(--black_75, #e5e7eb);
                margin: 0;
            }

            &:hover {
                background: transparent !important;
            }
        }
    }

    // Icon wrapper inside dropdown items.
    .frmx-dropdown-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 18px;
        height: 18px;

        svg {
            width: 15px;
            height: 15px;
            stroke: var(--black_400, #9ca3af);
            transition: stroke 0.12s ease;
        }
    }

    // Option label next to icons.
    .frmx-dropdown-label {
        flex: 1;
        white-space: nowrap;
    }

    // On hover, icon inherits the text color.
    .frmx-nice-select .list .option:hover .frmx-dropdown-icon svg,
    .frmx-nice-select .list .option.focus .frmx-dropdown-icon svg {
        stroke: var(--black_700, #374151);
    }
}

/* ─── Inline Edit Styles ─── */
.frmx-is-editing {
    .q-title {
        padding-bottom: 0;
    }
}

.frmx-inline-edit-title {
    width: 100%;

    .frmx-edit-title-input {
        width: 100%;
        font-size: 28px;
        font-weight: 700;
        line-height: 1.35;
        color: var(--black_900);
        background: var(--bs-white);
        border: 2px solid var(--bbpc_brand_color, #4f46e5);
        border-radius: 10px;
        padding: 12px 16px;
        outline: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;

        &:focus {
            border-color: var(--bbpc_brand_color, #4f46e5);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
        }
    }
}

.frmx-inline-edit-content {
    .frmx-edit-content-textarea {
        width: 100%;
        min-height: 200px;
        font-size: 15px;
        line-height: 1.75;
        color: var(--black_700);
        background: var(--bs-white);
        border-radius: 10px;
        padding: 14px 16px;
        resize: vertical;
        font-family: inherit;
        outline: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;

        &:focus {
            border-color: var(--bbpc_brand_color, #4f46e5);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
        }
    }
}

/* ─── Reply Inline Edit Header Bar ─── */
.frmx-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: var(--bbpc_brand_color_light, rgba(79, 70, 229, 0.06));
    border: 1px solid var(--bbpc_brand_color_border, rgba(79, 70, 229, 0.15));
    border-radius: 8px;
    flex-wrap: wrap;

    .frmx-edit-header-label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 600;
        color: var(--bbpc_brand_color, #4f46e5);
        white-space: nowrap;

        svg {
            flex-shrink: 0;
        }
    }

    .frmx-edit-header-shortcut {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: var(--black_500, #6b7280);
        font-weight: 400;
        flex-wrap: wrap;
        line-height: 1.6;

        kbd {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            padding: 1px 6px;
            font-size: 11px;
            font-weight: 600;
            font-family: -apple-system, BlinkMacSystemFont, "SF Mono", Menlo, Consolas, monospace;
            color: var(--black_700, #374151);
            background: var(--bs-white, #fff);
            border: 1px solid var(--black_150, #d4d4d4);
            border-bottom-width: 2px;
            border-radius: 4px;
            line-height: 1.2;

            &+kbd {
                margin-left: 2px;
            }
        }

        .frmx-edit-shortcut-sep {
            color: var(--black_200, #d1d5db);
            margin: 0 4px;
        }
    }
}

@media (max-width: 640px) {
    .frmx-edit-header {
        gap: 8px;

        .frmx-edit-header-shortcut {
            display: none;
        }
    }
}

/* ─── Inline Edit Action Buttons ─── */
.frmx-inline-edit-actions {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--black_50, #f0f0f0);
    flex-wrap: wrap;

    .frmx-edit-actions-left {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        flex: 1;
        min-width: 0;
        font-size: 12px;
        line-height: 1.4;
    }

    .frmx-edit-actions-right {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .frmx-edit-unsaved-hint {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        color: #b45309;
        font-weight: 500;

        &:not(:empty) {
            animation: frmxNoticeSlide 0.3s ease;

            &::before {
                content: "";
                width: 6px;
                height: 6px;
                border-radius: 50%;
                background: #d97706;
                flex-shrink: 0;
            }
        }
    }

    .frmx-edit-char-count {
        font-size: 12px;
        color: var(--black_400, #9ca3af);
        font-variant-numeric: tabular-nums;
    }

    .frmx-edit-save {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 22px;
        font-size: 13px;
        font-weight: 600;
        color: var(--bs-white);
        background: var(--bbpc_brand_color, #4f46e5);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        line-height: 1.4;

        svg {
            flex-shrink: 0;
        }

        &:hover {
            opacity: 0.92;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
        }

        &:active {
            transform: translateY(0);
            box-shadow: 0 1px 3px rgba(79, 70, 229, 0.2);
        }

        &:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35);
        }

        &:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
    }

    .frmx-edit-cancel {
        padding: 8px 18px;
        font-size: 13px;
        font-weight: 500;
        color: var(--black_600);
        background: var(--bs-white);
        border: 1px solid var(--black_150);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        line-height: 1.4;

        &:hover {
            background: var(--black_25);
            border-color: var(--black_200);
            color: var(--black_900);
        }

        &:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
            border-color: var(--bbpc_brand_color, #4f46e5);
        }

        &:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
    }

    /* Inline discard-changes confirmation */
    .frmx-edit-discard-prompt {
        display: none;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 10px 14px;
        background: #fffbeb;
        border: 1px solid #fcd34d;
        border-radius: 8px;
        animation: frmxNoticeSlide 0.2s ease;
        flex-wrap: wrap;
    }

    &.frmx-show-discard {

        .frmx-edit-actions-left,
        .frmx-edit-actions-right {
            display: none;
        }

        .frmx-edit-discard-prompt {
            display: flex;
        }
    }

    .frmx-edit-discard-text {
        font-size: 13px;
        font-weight: 500;
        color: #92400e;
    }

    .frmx-edit-discard-actions {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;

        button {
            padding: 6px 14px;
            font-size: 12px;
            font-weight: 600;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
            line-height: 1.4;
        }

        .frmx-edit-discard-keep {
            color: var(--black_700, #374151);
            background: var(--bs-white, #fff);
            border: 1px solid #fcd34d;

            &:hover {
                background: #fef3c7;
            }
        }

        .frmx-edit-discard-confirm {
            color: var(--bs-white, #fff);
            background: #dc2626;
            border: 1px solid #dc2626;

            &:hover {
                background: #b91c1c;
                border-color: #b91c1c;
            }
        }
    }
}

/* ─── Loading Spinner Overlay ─── */
.frmx-edit-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    backdrop-filter: blur(2px);
    animation: frmxNoticeSlide 0.2s ease;

    span {
        font-size: 13px;
        color: var(--black_500);
        font-weight: 500;
    }
}

.frmx-edit-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--black_100, #e5e5e5);
    border-top-color: var(--bbpc_brand_color, #4f46e5);
    border-radius: 50%;
    animation: frmxSpin 0.6s linear infinite;
}

/* ─── Save Button Spinner ─── */
.frmx-btn-spinner {
    animation: frmxSpin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes frmxSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── TinyMCE Editor Wrapper Inside Inline Edit ─── */
.frmx-inline-edit-content {

    /* Outer wrapper — borderless container, brand focus ring */
    .wp-editor-wrap {
        border: 1.5px solid var(--black_100) !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
        background: var(--bs-white);

        &:focus-within {
            border-color: var(--bbpc_brand_color) !important;
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--bbpc_brand_color) 10%, transparent) !important;
        }
    }

    /* ------ Visual / Code tab row ------ */
    .wp-editor-tabs {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 0 !important;
        background: var(--black_25) !important;
        border-bottom: 1px solid var(--black_75) !important;
        margin: 0 !important;
        width: auto !important;
        float: none !important;
    }

    .wp-switch-editor {
        border: none !important;
        border-bottom: 2px solid transparent !important;
        background: transparent !important;
        color: var(--black_400) !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        padding: 10px 14px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        transition: color 0.15s ease, border-color 0.15s ease;
        cursor: pointer;
        float: none !important;
        height: auto !important;
        box-shadow: none !important;
        top: 0 !important;

        &:hover {
            color: var(--black_700) !important;
        }

        &.switch-tmce,
        &.switch-html {

            &[aria-pressed="true"],
            &:focus {
                color: var(--bbpc_brand_color) !important;
                border-bottom-color: var(--bbpc_brand_color) !important;
                background: transparent !important;
            }
        }
    }

    /* ------ Toolbar container ------ */
    .wp-editor-container {
        border: none !important;
        box-shadow: none !important;
        clear: none !important;

        &:hover {
            border: none !important;
            box-shadow: none !important;
        }
    }

    /* ------ Quicktags (Code view toolbar) — hidden by default, only shown in HTML/Code mode ------ */
    .quicktags-toolbar {
        display: none !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    .wp-editor-wrap.html-active .quicktags-toolbar {
        display: flex !important;
        height: auto !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        background: var(--black_25) !important;
        border-top: none !important;
        border-bottom: 1px solid var(--black_75) !important;
        border-left: none !important;
        border-right: none !important;
        padding: 8px 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;

        .ed_button {
            all: unset;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            background: transparent !important;
            border: none !important;
            color: var(--black_500) !important;
            height: 32px !important;
            min-width: 32px !important;
            font-family: 'Inter', sans-serif !important;
            font-size: 13px !important;
            font-weight: 600 !important;
            border-radius: 6px !important;
            cursor: pointer;
            text-align: center;
            transition: background 0.15s ease, color 0.15s ease;
            padding: 0 6px !important;
            box-shadow: none !important;

            &:hover {
                background: var(--black_75) !important;
                color: var(--black_800) !important;
            }
        }
    }

    /* ------ TinyMCE Visual editor toolbar ------ */
    .mce-tinymce {
        border: none !important;
        box-shadow: none !important;
    }

    .mce-tinymce .mce-toolbar-grp,
    .mce-toolbar-grp {
        background: var(--black_25) !important;
        background-color: var(--black_25) !important;
        border-bottom: 1px solid var(--black_75) !important;
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;
        padding: 6px 10px !important;

        .mce-toolbar {
            .mce-btn-group {
                padding: 0 2px;
                border: none !important;
                background: transparent !important;
                box-shadow: none !important;
                margin: 0 !important;

                &::after {
                    content: '';
                    display: inline-block;
                    vertical-align: middle;
                    width: 1px;
                    height: 18px;
                    background: var(--black_150);
                    margin: 0 4px;
                }

                &:last-child::after {
                    display: none;
                }
            }

            .mce-btn {
                background: transparent !important;
                border: none !important;
                box-shadow: none !important;
                border-radius: 5px !important;
                transition: background 0.15s ease;
                margin: 0 !important;

                button {
                    padding: 5px 7px !important;
                    color: var(--black_500);
                }

                &:hover {
                    background: var(--black_75) !important;

                    button {
                        color: var(--black_800);
                    }
                }

                &.mce-active {
                    background: color-mix(in srgb, var(--bbpc_brand_color) 10%, transparent) !important;

                    button {
                        color: var(--bbpc_brand_color);
                    }
                }
            }
        }
    }

    /* ------ iframe / content area ------ */
    .mce-edit-area {
        border: none !important;

        iframe {
            min-height: 160px !important;
            background: var(--bs-white) !important;
        }
    }

    // Raw textarea (Code/HTML view) — no border, integrated look
    .frmx-edit-content-textarea {
        width: 100% !important;

        &.wp-editor-area {
            border: none !important;
            outline: none !important;
            padding: 14px 16px !important;
            min-height: 160px !important;
            font-size: 14px;
            line-height: 1.6;
            resize: vertical;
            background: var(--bs-white) !important;
            color: var(--black_800);

            &::placeholder {
                color: var(--black_400);
                font-weight: 400;
            }
        }
    }
}

/* ─── Inline Edit Notice Messages ─── */
.frmx-inline-edit-notice {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    animation: frmxNoticeSlide 0.3s ease;

    &.frmx-notice-success {
        background: #ecfdf5;
        border: 1px solid #a7f3d0;
        color: #065f46;
    }

    &.frmx-notice-error {
        background: #fef2f2;
        border: 1px solid #fecaca;
        color: #991b1b;
    }
}

/* ─── Reply Inline Edit Specific Styles ─── */
.forum-comment.frmx-is-editing {
    >.frmx-reply-card {
        border-color: var(--bbpc_brand_color, #4f46e5);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
        transition: border-color 0.25s ease, box-shadow 0.25s ease;
    }

    >.comment-content,
    .comment-content {
        overflow: visible;
    }

    .frmx-reply-inline-edit {
        margin-top: 0;
        width: 100%;
    }
}

@keyframes frmxNoticeSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.forum-comment {
    .action-button-container.action-btns .bbp-topic-reply-link {
        height: 26px;
        font-size: 12px;
        line-height: 26px;
    }

    .bbp-author-link {
        padding-top: 2px;
    }
}

.bbp-topic-reply-link {
    background-color: transparent !important;
}

.answer-action .action-content .ans-title {
    margin-bottom: 5px;
}

#favorite-toggle {
    .favorite-toggle {
        font-size: 14px;
        padding: 2px 20px;
        font-weight: 400;
        border-radius: 4px;
        transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.18s ease-in-out;
        background: var(--bs-white);
        border: 1px solid var(--black_50);
        color: var(--black_900);
        text-decoration: none;
        word-break: normal;

        &:hover {
            background: rgba(60, 64, 67, 0.04);
        }
    }
}

span#favorite-toggle {
    margin-top: 2px;
}

.best-answer {
    background: #f1fdf3;
    padding: 30px 25px !important;
    margin-top: 60px;
    border-radius: 6px;

    .accepted-ans-mark {
        color: #0abe76;
        font-size: 14px;
        text-align: right;

        i {
            padding-right: 5px;
        }
    }

    .best-ans-content {
        margin-top: 30px;

        .question-icon {
            margin-top: 10px;
            margin-right: 20px;
        }

        p {
            font-size: 15px;

            &:last-child {
                margin-bottom: 0;
            }
        }
    }

    &.type-reply {
        position: relative;

        .forum-post-top {
            justify-content: start;

            .meta {
                margin-left: 5px;
            }
        }

        .comment-content {
            border-bottom: 0;
            padding-bottom: 0;
        }
    }
}

body.bbpress {

    .all-answers,
    .bbp-topic-merge {
        background: transparent !important;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 30px;
        padding: 0;
        position: relative;
        transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
        border: none;

        ul {
            list-style: none;
            padding-left: 0;
        }

        .title {
            margin-bottom: 0;
        }

        .frmx-all-replies-header {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            border-radius: 12px;
            padding: 15px 1px;
            margin-bottom: 25px;
            margin-top: 50px;

            /* Left section: reply count + participant avatars */
            .frmx-header-left {
                display: flex;
                align-items: center;
                gap: 14px;
                flex: 1;
                min-width: 0;
                flex-wrap: wrap;
            }

            .replies-title {
                font-size: 22px;
                font-weight: 600;
                color: var(--black_900);
                margin: 0;
                display: flex;
                align-items: center;
                gap: 8px;
                white-space: nowrap;

                .frmx-reply-count-icon {
                    display: inline-flex;
                    color: var(--black_500);
                }
            }

            .frmx-header-right {
                display: flex;
                align-items: center;
                gap: 12px;
            }
        }

        .filter-bar {
            background: #f7f8f9;
            border: 1px solid #eaeeef;
            padding: 10px 30px;
            justify-content: space-between;
            border-radius: 4px;

            .custom-select {
                box-shadow: none;

                &:focus {
                    outline: none;
                    box-shadow: 0 0 0 0.2rem transparent;
                    border: none;
                }

                &::after {
                    border-bottom: 1px solid #6b707f;
                    border-right: 1px solid #6b707f;
                    height: 6px;
                    width: 6px;
                    right: 5px;
                }
            }

            p {
                margin-top: 8px;
                margin-bottom: 0;
                font-size: 14px;
                color: #6b707f;
            }

            .frmx-nice-select {
                background: #f7f8f9;
                height: 100%;
                border: 0;
                padding: 0 25px 0 0;

                .list {
                    width: 100px;
                }

                &::-ms-expand {
                    display: none;
                }
            }
        }

        .forum-comment {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 16px;
            padding-bottom: 0 !important;
            border-bottom: none;

            .frmx-reply-avatar {
                flex-shrink: 0;

                img {
                    width: 36px;
                    height: 36px;
                    border-radius: 50%;
                    vertical-align: top;
                }

                /* Thread vertical line */
                position: relative;
            }

            /* Hide thread line on last child in flat list */
            &:last-child .frmx-reply-avatar::after {
                display: none;
            }

            .frmx-reply-card {
                flex: 1;
                min-width: 0;
                background: var(--bs-white);
                border: 1px solid var(--black_50);
                border-radius: 10px;
                padding: 18px 20px;

                .bbp-attachments-errors,
                .bbp-attachments {
                    width: 100%;

                    h6 {
                        font-size: 16px;
                    }

                    .d4p-bbp-att-wrapper {
                        font-size: 16px;
                    }

                    .with-icons {
                        padding: 5px 0 0 0;
                    }
                }

                .bbp-author-wrap {
                    margin: 0;
                    /* Reset inherited flex margin */
                }

                .comment-content {
                    p {
                        font-size: 16px;
                    }
                }

                .forum-post-author {
                    display: flex;
                    align-items: center;
                    gap: 10px;
                    margin: 0;

                    .topic-author {
                        margin: 0 !important;

                        .bbp-author-name {
                            font-size: 14px;
                            font-weight: 600;
                            color: var(--black_900);
                        }
                    }

                    .meta {
                        font-size: 13px;
                        color: var(--black_500);

                        a {
                            color: inherit;
                        }
                    }
                }
            }

            @media (max-width: 576px) {
                flex-direction: row;
                align-items: flex-start;
                gap: 12px;

                .frmx-reply-avatar {
                    width: 34px;
                    min-width: 34px;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    gap: 8px;
                    padding-top: 2px;

                    img {
                        width: 30px;
                        height: 30px;
                    }
                }

                .frmx-reply-card {
                    flex: 1 1 auto;
                    width: auto;
                    padding: 14px 15px;
                    border-radius: 12px;

                    .forum-post-top {
                        flex-wrap: nowrap;
                        align-items: flex-start;
                        gap: 8px;
                    }

                    .bbp-author-wrap {
                        flex: 1 1 auto;
                        width: auto;
                        min-width: 0;
                    }

                    .forum-post-author {
                        flex-direction: column;
                        align-items: flex-start;
                        gap: 4px;

                        .topic-author {
                            flex-wrap: wrap;
                            gap: 6px;
                        }

                        .meta {
                            line-height: 1.5;
                        }
                    }

                    .reply-admin-links {
                        width: auto;
                        display: flex;
                        align-items: center;
                        gap: 8px;
                        justify-content: flex-end;
                        margin-left: auto;
                        flex-shrink: 0;

                        .private-reply-badge {
                            display: inline-flex;
                            align-items: center;
                            height: 28px;
                            padding: 0 10px;
                            border-radius: 999px;
                            font-size: 12px;
                            font-weight: 600;
                            letter-spacing: 0;
                            color: #8a5a00;
                            background: #fff4cf;
                            border: 1px solid #ffe7ab;
                            white-space: nowrap;
                        }
                    }
                }
            }

            &.bbp-private-reply {
                .frmx-reply-card {
                    background: rgb(255 255 241) !important;
                    padding: 25px;
                }

                @media (max-width: 736px) {
                    .frmx-reply-card {
                        padding: 15px;
                    }
                }

                .bbp-admin-links {
                    background: var(--black_25);

                    li:hover {
                        background: var(--black_50);
                    }
                }

                .comment-content {
                    border: none;
                    padding: 0;
                }
            }

            &.status-trash {
                .frmx-reply-card {
                    background: #ff00001f;
                }
            }

            .comment-content {
                margin-left: 0;
                padding-bottom: 0;
                margin-top: 10px;

                @media (max-width: 576px) {
                    margin-left: 0;
                }

                .alert {
                    padding: 2px 10px;
                    font-size: 14px;
                    background: var(--black_25);
                    border-color: var(--black_25);
                    color: var(--black_900);
                }

                ul,
                ol {
                    line-height: 2;
                }

                p:last-child {
                    margin-bottom: 0;
                }

                .action-btns {
                    margin-top: 20px;
                    display: none;
                    opacity: 0;
                    transition: all 5s ease-in;
                }
            }

            &:hover .comment-content .action-btns {
                display: block;
                opacity: 1;
            }
        }

        .pagination-wrapper {
            background: transparent;
            box-shadow: none;
            padding: 0;
            flex-direction: row;
            gap: 12px;

            &.paged {
                margin-top: 15px;
            }

            +.pagination-wrapper {
                margin-top: 25px;
            }

            .bbp-pagination {
                justify-content: flex-end;
            }

            .view-post-of {
                text-align: left;
                margin-left: 55px;
            }

            @media (max-width: 576px) {
                flex-direction: column;
                align-items: flex-start;

                .bbp-pagination {
                    width: 100%;
                    justify-content: flex-start;
                }
            }
        }
    }
}

.replies-sorting .custom-select {
    font-size: 14px;
    box-shadow: none;
    padding: 0 80px 0 20px;
    height: 100%;
    background-color: var(--bs-white);
    border-radius: 5px;
    border: solid 1px var(--black_50);
    color: var(--black_600);
}

select#sort-replies:focus {
    border-color: #999;
    outline: none;
    box-shadow: 0 0 3px #999;
}

.topic_comments {
    +.pagination-wrapper {
        margin-top: 30px;
    }
}

ul.bbp-topic-revision-log {
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 30px !important;
}

.bbp-topic-revision-log,
.bbp-topic-revision-log-item,
.bbp-reply-revision-log .bbp-reply-revision-log-item {
    font-size: 12px;
    color: var(--black_400);
    font-style: italic;

    img {
        display: none;
    }
}

.bbp-topic-revision-log-item,
.bbp-reply-revision-log-item {
    margin-bottom: 0;
}

.topic-info {
    text-align: left;
    position: relative;
    padding: 22px 10px 22px 26px;
    margin: 0 0 7%;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);

    p {
        position: relative;
        margin: 0 0 10px;
        padding-left: 90px;
        height: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
        line-height: 1.5;

        a {
            padding-left: 5px;
        }

        strong.mini-title {
            position: absolute;
            top: 2px;
            left: 0;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 400;
        }

        img {
            width: 15px;
            height: 15px;
            position: relative;
            float: left;
            margin: 0 2px 0 0;
            padding: 0;
            top: 1px;
            border-radius: 3px;
        }
    }

    .delete-ticket {
        color: #e85e3c;
        margin-top: 15px;
    }
}

.single-topic {
    .main-post {
        word-break: break-all;
        position: relative;
        background: var(--bs-white) !important;
        border-radius: 16px;
        box-shadow: 0 2px 12px rgb(0 0 0 / 0.06);
        margin-bottom: 24px;
        padding: 24px 28px 28px;
        transition: all 0.3s ease-in-out;
        border: 1px solid var(--black_50);

        &:hover {
            box-shadow: 0 4px 20px rgb(0 0 0 / 0.08);
        }

        .forum-post-top {
            padding-bottom: 16px;
            border-bottom: 1px solid var(--black_50);
            margin-bottom: 20px;
            align-items: center;

            .bbp-author-wrap {
                gap: 12px;

                >.bbp-author-link img {
                    width: 48px;
                    max-width: 48px;
                    height: 48px;
                    border-radius: 50%;
                    object-fit: cover;
                    border: 2px solid var(--black_50);
                }
            }

            .forum-post-author {
                .topic-author {
                    gap: 10px;

                    .bbp-author-name {
                        font-size: 15px;
                        font-weight: 600;
                        color: var(--black_900);
                    }
                }

                .forum-author-meta.meta {
                    margin-top: 4px;
                    font-size: 13px;
                    color: var(--black_400);
                }
            }

            #subscription-toggle {
                a {
                    font-size: 14px;
                    font-weight: 500;
                    padding: 10px 24px;
                    color: var(--bs-white);
                    border-radius: 8px;
                    background: var(--black_800);
                    display: inline-flex;
                    align-items: center;
                    gap: 6px;
                    text-decoration: none;
                    transition: all 0.2s ease;
                    border: none;

                    &:hover {
                        background: var(--black_900);
                        transform: translateY(-1px);
                    }

                    &.is-subscribed {
                        background: var(--black_50);
                        color: var(--black_700);

                        &:hover {
                            background: var(--black_100);
                        }
                    }
                }
            }

            .bbp-admin-links-dropdown {
                display: flex;
                align-items: center;

                .frmx-nice-select {
                    padding: 8px 8px;
                    border-radius: 8px;
                    transition: background 0.2s ease;
                    line-height: 1;

                    &:hover {
                        background: var(--black_50);
                    }

                    .current::before {
                        color: var(--black_600);
                        font-size: 22px;
                    }
                }
            }
        }

        .q-title {
            padding: 0 0 20px 0;
            gap: 10px;
            border-bottom: none;

            h1 {
                font-size: 26px;
                font-weight: 700;
                line-height: 1.35;
                color: var(--black_900);
                margin: 0;
            }

            .solved-topic-bar {
                .accepted-ans-mark {
                    background: #e6f7ed;
                    color: #0a8043;
                }
            }
        }

        .forum-post-content {

            /* Hide Share this Topic - show only Share button inline */
            .frmx-share-topic {

                .share-text,
                span:not(.share-icon) {
                    display: none;
                }
            }

            .content.editor-content {
                font-size: 15px;
                line-height: 1.75;
                color: var(--black_700);

                p {
                    margin-bottom: 16px;

                    &:last-child {
                        margin-bottom: 0;
                    }

                    strong {
                        color: var(--black_900);
                        font-weight: 600;
                    }
                }
            }

            /* Reaction Buttons Section - All in one horizontal row */
            .forumax-reactions-container {
                margin-top: 25px;
                padding-top: 0;
                border-top: none;
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                gap: 12px;

                /* All reaction wrappers inline */
                .forumax-reactions-wrapper,
                .frmx-same-question-wrapper,
                .frmx-share-wrapper {
                    display: inline-flex;
                    align-items: center;
                    gap: 10px;
                }

                .forumax-reactions-wrapper {
                    flex-wrap: nowrap;
                }

                .forumax-reaction-option {
                    display: inline-flex;
                    align-items: center;
                    gap: 8px;
                    padding: 8px 16px;
                    border-radius: 50px;
                    border: 1px solid var(--black_100);
                    background: var(--bs-white);
                    font-size: 14px;
                    font-weight: 500;
                    color: var(--black_700);
                    cursor: pointer;
                    transition: all 0.2s ease;

                    &:hover {
                        background: var(--black_25);
                        border-color: var(--black_150);
                    }

                    /* Agree button with blue fill when active */
                    &.active,
                    &.reacted {
                        background: #e3f2fd;
                        border-color: #2196f3;
                        color: #1976d2;

                        svg path {
                            fill: currentColor;
                        }
                    }

                    svg {
                        width: 16px;
                        height: 16px;
                    }

                    .reaction-count {
                        font-weight: 600;
                        margin-left: 0;
                        min-width: auto;
                    }
                }

                /* Share button styling */
                .frmx-share-topic-btn {
                    display: inline-flex;
                    align-items: center;
                    gap: 6px;
                    padding: 8px 16px;
                    border-radius: 50px;
                    border: none;
                    background: transparent;
                    font-size: 14px;
                    font-weight: 500;
                    color: var(--black_600);
                    cursor: pointer;
                    transition: all 0.2s ease;

                    &:hover {
                        background: var(--black_25);
                    }

                    svg {
                        width: 16px;
                        height: 16px;
                    }
                }
            }

            .forum-post-btm {
                flex-wrap: wrap;
                gap: 12px;
                padding: 20px 0 18px;
                border-bottom: none;
                align-items: center;

                .taxonomy {
                    &.forum-post-tags {
                        display: flex;
                        flex-wrap: wrap;
                        align-items: center;
                        gap: 6px;

                        strong {
                            display: none;
                        }

                        .tags-label {
                            font-size: 15px;
                            font-weight: 600;
                            color: var(--black_700);
                        }

                        .tags {
                            font-size: 15px;
                            line-height: 1.7;
                            color: var(--black_500);

                            a {
                                display: inline;
                                padding: 0;
                                background: transparent;
                                border: 0;
                                border-radius: 0;
                                font-size: inherit;
                                font-weight: 400;
                                color: var(--black_600);
                                text-decoration: none;
                                transition: color 0.2s ease;

                                &:hover {
                                    background: transparent;
                                    border-color: transparent;
                                    color: var(--black_800);
                                }
                            }
                        }
                    }

                    &.forum-post-cat {
                        margin-left: auto;
                        padding: 6px 14px;
                        background: #fff0e6;
                        border: 1px solid #ffc9a8;
                        border-radius: 50px;
                        display: flex;
                        align-items: center;
                        gap: 8px;

                        img {
                            width: 16px;
                            height: 16px;
                            border-radius: 4px;
                            margin-right: 0 !important;
                        }

                        a {
                            font-size: 13px;
                            font-weight: 600;
                            color: #e65100;
                            text-decoration: none;

                            &:hover {
                                text-decoration: underline;
                            }
                        }
                    }
                }

                /* Three dot menu */
                .frmx-more-options {
                    margin-left: 8px;

                    button {
                        background: transparent;
                        border: none;
                        padding: 8px;
                        cursor: pointer;
                        color: var(--black_400);
                        font-size: 18px;

                        &:hover {
                            color: var(--black_600);
                        }
                    }
                }
            }

            .action-button-container.action-btns {
                margin-top: 30px;
                padding-top: 15px;
                border-top: 1px solid var(--black_50);
                flex-wrap: wrap;

                /* Reaction wrap (same-question + emoji reactions) — inline */
                >.frmx-reaction-topic-wrap {
                    display: inline-flex;
                    align-items: center;
                    gap: 10px;
                    flex-wrap: wrap;
                }

                /* Voting inside action buttons — horizontal inline */
                >.bbp-voting {
                    position: static !important;
                    display: inline-flex !important;
                    flex-direction: row !important;
                    align-items: center;
                    gap: 6px;
                    padding: 0;
                    margin: 0;
                    border: none;
                    background: transparent;

                    .bbp-voting-label {
                        display: none !important;
                    }

                    a.vote {
                        font-size: 0;
                        line-height: 0;
                        padding: 4px;

                        &::before {
                            font-size: 18px;
                            line-height: 1;
                        }
                    }

                    .score {
                        font-size: 14px;
                        font-weight: 600;
                        min-width: 22px;
                        text-align: center;
                    }
                }

                .taxonomy.forum-post-tags {
                    display: flex;
                    flex-wrap: wrap;
                    align-items: center;
                    gap: 6px;
                    flex: 1;

                    .tags-label {
                        font-size: 15px;
                        font-weight: 600;
                        color: var(--black_700);
                    }

                    .tags {
                        font-size: 13px;
                        line-height: 1.7;
                        color: var(--black_500);

                        a {
                            display: inline;
                            padding: 0;
                            background: transparent;
                            border: 0;
                            border-radius: 0;
                            font-size: inherit;
                            font-weight: 400;
                            color: var(--black_600);
                            text-decoration: none;
                            transition: color 0.2s ease;

                            &:hover {
                                background: transparent;
                                border-color: transparent;
                                color: var(--black_800);
                            }
                        }
                    }
                }

                .frmx-action-btns-right {
                    display: flex;
                    align-items: center;
                    gap: 12px;
                    margin-left: auto;
                }

                &.has-topic-tags {
                    justify-content: space-between;

                    .taxonomy.forum-post-tags {
                        flex: 1 1 auto;
                    }

                    .frmx-action-btns-right {
                        margin-left: auto;
                    }
                }

                &.no-topic-tags {
                    justify-content: flex-start;

                    .frmx-action-btns-right {
                        margin-left: 0;
                    }
                }

                #favorite-toggle {
                    .favorite-toggle {
                        padding: 6px 14px;
                        font-size: 14px;
                        font-weight: 500;
                        border-radius: 50px;
                        border: 1px solid var(--black_100);
                        background: var(--bs-white);
                        color: var(--black_700);
                        transition: all 0.2s ease;

                        &:hover {
                            background: var(--black_25);
                            border-color: var(--black_150);
                        }

                        &.is-favorite {
                            background: #fff8e1;
                            border-color: #ffc107;
                            color: #b28704;
                        }
                    }
                }

                .bbp-admin-links {
                    gap: 4px;

                    li {
                        padding-right: 0;

                        a {
                            align-items: center;
                            gap: 6px;
                            padding: 6px 12px;
                            font-size: 14px;
                            font-weight: 400;
                            color: var(--black_600);
                            background: transparent;
                            border: none;
                            border-radius: 4px;
                            text-decoration: none;
                            transition: all 0.2s ease;

                            &:hover {
                                background: var(--black_25);
                                color: var(--bbpc_brand_color);
                            }

                            &::before {
                                display: none;
                            }
                        }

                        /* Mark as solved button special styling */
                        &:has(a.bbpc-resolve-topic-button) a,
                        a.bbpc-resolve-topic-button {
                            color: #0a8043;

                            &::before {
                                content: "✓";
                                display: inline-block;
                                margin-right: 4px;
                            }

                            &:hover {
                                background: #e6f7ed;
                            }
                        }
                    }
                }
            }
        }

        @media (max-width: 576px) {
            padding: 25px 18px;
            border-radius: 16px;

            .forum-post-top {
                flex-wrap: wrap;
                align-items: flex-start;
                gap: 12px;

                .bbp-author-wrap {
                    width: 100%;
                    margin-right: 0;
                    min-width: 0;
                    align-items: flex-start;
                }

                .forum-post-author {
                    min-width: 0;

                    .topic-author {
                        flex-wrap: wrap;
                    }

                    .forum-author-meta.meta {
                        flex-wrap: wrap;
                        gap: 6px;
                    }
                }

                .action-button-container {
                    width: 100%;
                    justify-content: flex-start;
                    align-items: flex-start;
                    flex-direction: row;
                    flex-wrap: wrap;
                }

                #subscription-toggle a {
                    padding: 9px 14px;
                    font-size: 13px;
                }
            }

            .q-title h1 {
                font-size: 22px;
            }

            .forum-post-content {
                .action-button-container.action-btns {
                    flex-wrap: wrap;
                    gap: 12px;

                    .taxonomy.forum-post-tags {
                        flex: 0 0 100%;
                    }

                    .frmx-action-btns-right {
                        margin-left: 0;
                        flex-wrap: wrap;
                    }
                }
            }
        }
    }
}

.accepted-ans-mark {
    color: #3b9b3b;
    border-radius: 20px;
    padding: 3px 10px;
    background-color: var(--black_75);
}

#best-answer {
    position: absolute;
    right: -4px;
    top: 0;

    &.solved-topic-bar .badge {
        padding: 8px 10px;
        background: #05ad6a;
        font-size: 12px;
        color: #fff;
        display: flex;
        align-items: center;
        gap: 5px;
    }
}

.bbp-attachments-form .d4p-attachment-addfile {
    font-size: 14px;
    margin: 10px 0;
    display: block;
}

.bbp-voting {
    @media screen and (min-width: 561px) {
        padding-right: 0;
        position: absolute;
    }
}

.subscription-login-btn {
    cursor: pointer;
}


.bbp-no-topic {
    .frmx-inline-login-prompt {
        margin: 0 auto;
        padding: 42px 36px 24px 36px;
    }
}

/* Inline login prompt (replaces modal in no-reply / no-topic / subscription contexts) */
.frmx-inline-login-prompt {
    background: var(--bs-white);
    border: 1px solid var(--black_100, #e5e7eb);
    border-radius: 12px;
    padding: 24px 28px 28px;
    margin: 16px 0;
    box-sizing: border-box;
    max-width: 480px;

    .frmx-inline-login-title {
        font-size: 20px;
        font-weight: 600;
        margin: 0 0 6px;
        color: var(--black_900);
    }

    .frmx-inline-login-subtitle {
        font-size: 14px;
        margin: 0 0 18px;
        line-height: 1.5;
        color: var(--black_600);
    }

    &.frmx-inline-login-prompt--compact {
        padding: 18px 20px 20px;
        max-width: 360px;

        .frmx-inline-login-title {
            font-size: 17px;
        }

        .frmx-inline-login-subtitle {
            font-size: 13px;
            margin-bottom: 14px;
        }
    }
}

/* Shared embedded login form styles (used by the inline login prompt) */
.frmx-subscription-login-form {

    .bbp-login-form {
        margin: 0;
        padding: 0;

        fieldset.bbp-form {
            border: none;
            padding: 0;
            margin: 0;

            legend {
                display: none !important;
            }
        }

        .bbp-username,
        .bbp-password {
            margin-bottom: 15px;

            label {
                display: block;
                font-size: 14px;
                font-weight: 500;
                color: var(--black_700);
                margin-bottom: 6px;
            }

            input {
                width: 100%;
                height: 44px;
                padding: 8px 14px;
                border: 1px solid var(--black_100);
                border-radius: 8px;
                font-size: 14px;
                background: var(--bs-white);
                color: var(--black_800);
                transition: border-color 0.2s ease;
                box-sizing: border-box;

                &:focus {
                    border-color: var(--bbpc_brand_color);
                    outline: none;
                    box-shadow: 0 0 0 3px rgba(8, 102, 255, 0.1);
                }
            }
        }

        .bbp-remember-me {
            input[type="checkbox"] {
                margin-right: 4px;
            }

            label {
                color: var(--black_600);
                cursor: pointer;
            }
        }

        .bbp-submit-wrapper {
            float: none !important;
            margin-top: 0;
            clear: both;

            .user-submit {
                width: 100%;
                padding: 12px 20px;
                font-size: 15px;
                font-weight: 600;
                background: var(--bbpc_brand_color);
                color: #fff;
                border: none;
                border-radius: 8px;
                cursor: pointer;
                transition: background 0.2s ease;

                &:hover {
                    opacity: 0.9;
                }
            }
        }
    }
}

@media screen and (max-width: 480px) {
    .frmx-inline-login-prompt {
        padding: 20px 18px 22px;
    }
}

.entry-meta {
    >*::after {
        content: none;
    }

    >span {
        margin-right: 12px;
    }
}

ul.list-unstyled.d-flex.bbp-admin-links {
    display: flex;
    list-style: none !important;

    li a {
        text-decoration: none;
    }
}

.bbpress-admin-settings-container {
    position: relative;
    padding-left: 0;
    padding-top: 3px;
    list-style: none;

    li {
        a {
            text-decoration: none;
        }

        &:not(:first-child) a {
            margin-left: 8px;
        }
    }
}

.bbp-reply-form,
.bbp-topic-split {
    background: var(--bs-white) !important;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    padding: 18px 25px 25px;
    position: relative;
    transition: box-shadow 0.25s ease;
    border: none !important;

    @media (max-width: 576px) {
        padding: 16px;
        border-radius: 12px;
    }

    fieldset.bbp-form {
        border: none;
        padding: 0;
        margin: 0;
    }
}

/* ============================================================
   Reply Form — polished, compact UI/UX
   ============================================================ */
.bbp-reply-form {

    /* ----- Header / Legend ----- */
    >form>fieldset.bbp-form>legend {
        display: block !important;
        width: 100%;
        padding: 0 0 14px;
        margin: 0 0 16px;
        border-bottom: 1px solid var(--black_75);

        .frmx-reply-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-family: 'Roboto', sans-serif;
            font-size: 16px;
            font-weight: 700;
            line-height: 1.4;
            color: var(--black_900);
            margin-bottom: 4px;

            a.frmx-back-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                color: var(--bbpc_brand_color);
                transition: color 0.2s ease;
                text-decoration: none;

                &:hover {
                    color: color-mix(in srgb, var(--bbpc_brand_color) 80%, black);
                }
            }
        }

        .frmx-reply-subtitle {
            font-size: 12.5px;
            color: var(--black_500);
            padding-left: 30px;
            /* align with text, bypassing back arrow */
        }
    }

    /* ----- Vertical rhythm for body ----- */
    >form>fieldset.bbp-form>div {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px;

        /* Full-width items sit on their own row */
        >.bbp-the-content-wrapper,
        >.bbp-template-notice,
        >.upload-attachments-form,
        >.bbp-submit-wrapper,
        >p:has(> #bbp_topic_tags),
        >.bbp-form-topic-tags,
        >fieldset.bbp-form {
            width: 100%;
        }

        /* Non-checkbox p elements also full width */
        >p:not(:has(> input[type='checkbox'])) {
            width: 100%;
            margin: 0 !important;
        }

        /* Checkbox p: width auto, flows alongside siblings in the same flex row */
        >p:has(> input[type='checkbox']) {
            width: auto;
            margin: 0 !important;
            flex-shrink: 0;
        }

        /* 2-column Grid for Attachments and Options */
        >.frmx-reply-bottom-grid {
            width: 100%;
            display: grid;
            grid-template-columns: 1fr 420px;
            gap: 20px;
            margin-top: 10px;

            @media (max-width: 768px) {
                grid-template-columns: 1fr;
            }

            .frmx-reply-options legend,
            .frmx-reply-attachments legend {
                display: block !important;
                float: none !important;
                font-size: 11.5px !important;
                font-family: 'Inter', sans-serif;
                font-weight: 700 !important;
                color: var(--black_500) !important;
                letter-spacing: 0.8px;
                text-transform: uppercase;
                margin: 0 0 10px 0 !important;
                border: none !important;
                padding: 0 !important;
            }

            .upload-attachments-form {
                legend {
                    display: none !important;
                }

                /* hide inner legend, we provide our own */
            }

            .frmx-options-inner {
                background: var(--bs-white);
                border-radius: 8px;
                display: flex;
                flex-direction: column;
                box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.03);
                overflow: hidden;

                /* ─── Individual Option Row ─── */
                .frmx-option-row {
                    display: flex;
                    align-items: center;
                    gap: 12px;
                    padding: 14px 16px;
                    transition: background 0.15s ease;
                    cursor: pointer;

                    &:hover {
                        background: var(--black_25, #f9fafb);
                    }

                    &+.frmx-option-row {
                        border-top: 1px solid var(--black_50, #f0f0f0);
                    }
                }

                /* ─── Icon Badge ─── */
                .frmx-option-icon {
                    width: 32px;
                    height: 32px;
                    min-width: 32px;
                    border-radius: 8px;
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    flex-shrink: 0;

                    svg {
                        width: 16px;
                        height: 16px;
                    }

                    &--notify {
                        background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
                        color: var(--bbpc_brand_color, #4f46e5);
                    }

                    &--private {
                        background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.15));
                        color: #b45309;
                    }
                }

                /* ─── Label Block (Title + Description) ─── */
                .frmx-option-label {
                    flex: 1;
                    display: flex;
                    flex-direction: column;
                    gap: 1px;
                    cursor: pointer;
                    min-width: 0;
                }

                .frmx-option-title {
                    display: block;
                    font-size: 13.5px;
                    font-weight: 600;
                    color: var(--black_800, #1f2937);
                    line-height: 1.3;
                }

                .frmx-option-desc {
                    display: block;
                    font-size: 11.5px;
                    font-weight: 400;
                    color: var(--black_400, #9ca3af);
                    line-height: 1.4;
                }

                /* ─── Toggle Switch ─── */
                .frmx-toggle {
                    position: relative;
                    display: inline-flex;
                    align-items: center;
                    cursor: pointer;
                    flex-shrink: 0;
                    width: 40px;
                    height: 22px;
                    margin: 0 !important;

                    input[type='checkbox'] {
                        appearance: none;
                        -webkit-appearance: none;
                        width: 0;
                        height: 0;
                        opacity: 0;
                        position: absolute;
                        pointer-events: none;
                        margin: 0 !important;
                    }

                    .frmx-toggle-slider {
                        position: absolute;
                        inset: 0;
                        background: var(--black_150, #d4d4d4);
                        border-radius: 22px;
                        transition: background 0.25s ease, box-shadow 0.25s ease;

                        &::before {
                            content: '';
                            position: absolute;
                            width: 16px;
                            height: 16px;
                            left: 3px;
                            top: 3px;
                            background: #fff;
                            border-radius: 50%;
                            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
                            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
                        }
                    }

                    input[type='checkbox']:checked+.frmx-toggle-slider {
                        background: var(--bbpc_brand_color, #4f46e5);

                        &::before {
                            transform: translateX(18px);
                        }
                    }

                    input[type='checkbox']:focus-visible+.frmx-toggle-slider {
                        box-shadow: 0 0 0 3px color-mix(in srgb, var(--bbpc_brand_color, #4f46e5) 20%, transparent);
                    }
                }

                /* ─── Legacy <p> fallback for hook-injected options ─── */
                p:has(> input[type='checkbox']) {
                    display: flex;
                    align-items: center;
                    width: 100%;
                    padding: 12px 16px;
                    margin: 0 !important;

                    &+p:has(> input[type='checkbox']),
                    &+.frmx-option-row {
                        border-top: 1px solid var(--black_50, #f0f0f0);
                    }

                    label {
                        flex: 1;
                        font-size: 13.5px;
                        font-weight: 500;
                        color: var(--black_800);
                        cursor: pointer;
                    }

                    input[type='checkbox'] {
                        appearance: none;
                        -webkit-appearance: none;
                        width: 18px;
                        height: 18px;
                        border: 1.5px solid var(--black_200);
                        border-radius: 4px;
                        background-color: transparent;
                        margin: 0 12px 0 0;
                        cursor: pointer;
                        position: relative;
                        flex-shrink: 0;

                        &:checked {
                            background-color: var(--bbpc_brand_color);
                            border-color: var(--bbpc_brand_color);

                            &::after {
                                content: '';
                                position: absolute;
                                display: block;
                                width: 4px;
                                height: 8px;
                                border: solid #fff;
                                border-width: 0 1.5px 1.5px 0;
                                transform: rotate(45deg);
                                top: 2px;
                                left: 6px;
                            }
                        }
                    }
                }
            }
        }
    }

    /* ----- Tags field (chip-based input) ----- */
    .frmx-tags-field {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        background: var(--bs-white) !important;
        border: 1px solid var(--black_100) !important;
        border-radius: 8px !important;
        padding: 8px 14px !important;
        min-height: 44px !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
        cursor: text;
        margin: 0 !important;

        &:focus-within {
            border-color: var(--bbpc_brand_color) !important;
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--bbpc_brand_color) 12%, transparent) !important;
        }

        .frmx-tags-icon {
            display: flex;
            align-items: center;
            color: var(--black_400);
            flex-shrink: 0;
            line-height: 0;
        }

        .frmx-tags-chips {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 6px;
        }

        .frmx-tag-chip {
            display: inline-flex !important;
            align-items: center !important;
            gap: 6px !important;
            background: color-mix(in srgb, var(--bbpc_brand_color) 10%, transparent) !important;
            color: var(--bbpc_brand_color) !important;
            border-radius: 20px !important;
            padding: 5px 6px 5px 12px !important;
            font-size: 12.5px !important;
            font-weight: 600 !important;
            line-height: 1.3 !important;
            white-space: nowrap !important;
            border: none !important;
            box-shadow: none !important;
            margin: 0 !important;
            animation: frmxChipIn 0.15s ease;

            .frmx-tag-text {
                color: inherit;
            }

            .frmx-tag-remove {
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                background: color-mix(in srgb, var(--bbpc_brand_color) 15%, transparent) !important;
                border: none !important;
                color: var(--bbpc_brand_color) !important;
                cursor: pointer;
                padding: 3px !important;
                border-radius: 50% !important;
                transition: background 0.15s ease, color 0.15s ease;
                line-height: 0;
                width: 20px !important;
                height: 20px !important;
                box-shadow: none !important;
                margin: 0 !important;

                svg {
                    width: 12px !important;
                    height: 12px !important;
                    display: block;
                }

                &:hover {
                    background: color-mix(in srgb, var(--bbpc_brand_color) 25%, transparent) !important;
                }
            }
        }

        .frmx-tags-input {
            flex: 1 1 80px !important;
            min-width: 80px !important;
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
            background: transparent !important;
            padding: 0 !important;
            margin: 0 !important;
            font-size: 13.5px !important;
            height: auto !important;
            min-height: auto !important;
            color: var(--black_800) !important;
            width: auto !important;

            &::placeholder {
                color: var(--black_400);
                font-weight: 400;
            }
        }
    }

    @keyframes frmxChipIn {
        from {
            transform: scale(0.85);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    /* ----- Legacy tags selectors (hidden, kept for specificity overrides) ----- */
    .bbp-form-topic-tags,
    p:has(> #bbp_topic_tags) {
        display: none !important;
    }

    label[for='bbp_topic_tags'] {
        display: none !important;
    }

    #bbp_topic_tags {
        /* hidden input — no visual styles needed */
    }


    /* ----- Checkboxes: lightweight, side-by-side within the flex row ----- */
    p:has(> input[type='checkbox']) {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        margin: 0 !important;
        padding: 5px 0;
        background: transparent;
        border: none;
        border-radius: 0;
        width: auto;

        &:hover {
            background: transparent;
        }

        input[type='checkbox'] {
            width: 15px;
            height: 15px;
            accent-color: var(--bbpc_brand_color);
            cursor: pointer;
            margin: 0;
            flex: 0 0 auto;
        }

        label {
            font-size: 13px !important;
            font-weight: 400 !important;
            color: var(--black_600) !important;
            margin: 0 !important;
            cursor: pointer;
            line-height: 1.4;
        }
    }

    /* Visual divider between adjacent checkbox options */
    >form>fieldset.bbp-form>div>p:has(> input[type='checkbox'])+p:has(> input[type='checkbox']) {
        padding-left: 14px;
        border-left: 1px solid var(--black_100);
    }

    /* ----- Upload Attachments section ----- */
    .upload-attachments-form {
        margin: 0 !important;
        padding: 0 !important;
        background: transparent;
        border: none !important;
        border-radius: 0;

        .frmx-attachments-ui {
            display: flex;
            flex-direction: column;
            gap: 8px;
            width: 100%;

            /* File list — stacked cards */
            .frmx-attachments-list {
                display: flex;
                flex-direction: column;
                gap: 6px;

                .frmx-attachment-item {
                    display: flex;
                    align-items: center;
                    background: var(--bs-white);
                    border: 1px solid var(--black_75);
                    border-radius: 8px;
                    padding: 9px 12px;
                    gap: 10px;
                    transition: border-color 0.15s ease, box-shadow 0.15s ease;
                    animation: frmxAttachIn 0.18s ease both;

                    &:hover {
                        border-color: var(--black_150);
                        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
                    }

                    /* Coloured file-type badge */
                    .frmx-file-icon-wrapper {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        flex-shrink: 0;
                        width: 34px;
                        height: 34px;
                        background: color-mix(in srgb, var(--bbpc_brand_color) 10%, transparent);
                        border-radius: 6px;

                        svg {
                            color: var(--bbpc_brand_color);
                        }
                    }

                    /* Name + size stacked */
                    .frmx-file-info {
                        flex: 1;
                        min-width: 0;
                        display: flex;
                        flex-direction: column;
                        gap: 2px;
                    }

                    .frmx-file-name {
                        font-size: 13px;
                        color: var(--black_800);
                        font-weight: 500;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }

                    .frmx-file-size {
                        font-size: 11px;
                        color: var(--black_400);
                        font-weight: 400;
                        line-height: 1;
                    }

                    /* Remove button */
                    .frmx-remove-file {
                        flex-shrink: 0;
                        display: flex !important;
                        align-items: center;
                        justify-content: center;
                        width: 28px;
                        height: 28px;
                        border-radius: 6px;
                        color: var(--black_400) !important;
                        background: transparent !important;
                        border: none !important;
                        cursor: pointer;
                        transition: background 0.15s ease, color 0.15s ease;
                        padding: 0 !important;
                        margin-left: auto;

                        &:hover {
                            background: color-mix(in srgb, #dc3545 10%, transparent) !important;
                            color: #dc3545 !important;
                        }
                    }
                }
            }

            /* "Add more files" drop-zone button */
            .frmx-add-file-btn {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 7px;
                padding: 11px 16px;
                background: transparent;
                border: 1.5px dashed var(--black_150);
                border-radius: 8px;
                color: var(--black_500);
                font-size: 13px;
                font-weight: 500;
                cursor: pointer;
                transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
                line-height: 1;

                .frmx-add-icon {
                    display: flex;
                    align-items: center;
                    flex-shrink: 0;
                    opacity: 0.7;
                    transition: opacity 0.2s ease, transform 0.2s ease;
                }

                &:hover {
                    border-color: var(--bbpc_brand_color);
                    color: var(--bbpc_brand_color);
                    background: color-mix(in srgb, var(--bbpc_brand_color) 4%, transparent);

                    .frmx-add-icon {
                        opacity: 1;
                        transform: scale(1.1);
                    }
                }

                &.frmx-drag-over {
                    border-color: var(--bbpc_brand_color);
                    background: color-mix(in srgb, var(--bbpc_brand_color) 6%, transparent);
                    color: var(--bbpc_brand_color);
                }
            }

            /* Limit note — small, muted */
            .frmx-attachment-limit-note {
                font-size: 11px;
                color: var(--black_350, #adb5bd);
                line-height: 1.4;
                display: flex;
                align-items: center;
                gap: 4px;
            }
        }
    }

    @keyframes frmxAttachIn {
        from {
            opacity: 0;
            transform: translateY(-4px) scale(0.98);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    /* ----- Submit wrapper ----- */
    .bbp-submit-wrapper {
        float: none !important;
        clear: both;
        margin: 4px 0 0 !important;
        padding-top: 12px;
        border-top: 1px solid var(--black_75);
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 14px;
        flex-flow: row wrap !important;

        /* Cancel reply link – clean text style matching reference */
        #bbp-cancel-reply-to-link {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 14px;
            font-weight: 500;
            color: var(--black_500, #7a808c);
            text-decoration: none !important;
            padding: 10px 16px;
            border-radius: 8px;
            transition: color 0.15s ease, background 0.15s ease;
            cursor: pointer;

            &:hover {
                color: var(--black_800);
                background: var(--black_50, #f5f5f5);
            }

            &:active {
                background: var(--black_75, #ebebeb);
            }
        }

        a:not(#bbp-cancel-reply-to-link) {
            color: var(--black_600);
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;

            &:hover {
                color: var(--bbpc_brand_color);
            }
        }

        .frmx-cancel-divider {
            display: none;
            /* Not needed – Cancel sits next to Post Reply */
        }

        .submit,
        .fill-brand {
            margin: 0 !important;
            padding: 11px 28px !important;
            font-size: 14.5px !important;
            font-weight: 700 !important;
            letter-spacing: 0.2px;
            border: none !important;
            border-radius: 8px !important;
            background: var(--bbpc_brand_color) !important;
            color: #fff !important;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(76, 76, 241, 0.28);
            transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.15s ease;
            width: auto !important;
            line-height: 1.4;

            &:hover {
                background: color-mix(in srgb, var(--bbpc_brand_color) 88%, #000) !important;
                box-shadow: 0 7px 22px rgba(76, 76, 241, 0.34);
                transform: translateY(-1px);
            }

            &:active {
                transform: translateY(0);
                box-shadow: 0 3px 10px rgba(76, 76, 241, 0.22);
            }

            &:focus-visible {
                outline: 3px solid rgba(76, 76, 241, 0.38);
                outline-offset: 2px;
            }
        }

        @media (max-width: 576px) {
            justify-content: stretch;
            flex-direction: column;
            align-items: stretch;

            a {
                text-align: center;
                margin-right: 0;
            }

            .submit,
            .fill-brand {
                width: 100% !important;
                text-align: center;
            }
        }
    }
}

.bbp-form {
    padding: 0;
    margin: 0;
    border: none;

    legend {
        font-family: 'Roboto', sans-serif;
        color: var(--black_900);
        font-size: 20px;
        font-weight: 500;
        line-height: 1.4;
        display: inline !important;
    }

    .bbp-attachments-form label,
    .bbp_topic_tags {
        font-weight: 500;
        font-family: 'Roboto', sans-serif;
        color: var(--black_800);
        font-size: 14px;
        margin-bottom: 2px;
    }

    label {
        font-size: 14px;
        font-weight: 500;
        color: #425466;
        font-family: "Roboto", sans-serif;
    }

    font-size: 14px;
    font-weight: 400;
    border: none !important;
}

.bbpc_attachments input[type='file'] {

    &::file-selector-button,
    &::-webkit-file-upload-button {
        background-color: #e9ecef;
        color: black;
        border: none;
        padding: 12px;
        cursor: pointer;
        font-weight: 500;
        font-family: roboto, sans-serif;
    }
}

.bbpress-reply-head .bbpress-reply-head-abovetitle {
    color: var(--black_800);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
}

/* Legacy tags label – no longer visible in reply form */
label[for='bbp_topic_tags'] {
    font-weight: 500;
    color: var(--black_800);
    font-size: 14px;
}

/* Legacy tags input — now hidden in reply form, kept for topic form */
#new-post #bbp_topic_tags[type="hidden"] {
    display: none;
}

.bbp-the-content-wrapper {
    margin-top: 30px;
    margin-bottom: 25px;

    .bbp-reply-form & {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

.bbp-reply-author {
    img {
        max-width: 40px;
        height: auto;
        margin-top: -5px;
        border-radius: 50%;
    }

    .bbp-voting {
        left: 34px;
    }
}

.bbp-reply-content .bbp-head-area {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 5px;
}

.reply-result>.type-reply {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    padding: 15px 0;

    &.forum-comment {

        .forum-post-top {
            width: 100%;
            justify-content: space-between;
        }
    }

    .forum-post-top {
        justify-content: start;

    }

    .comment-content {
        border-bottom: 0;
        padding-bottom: 0;
    }
}

.bbp-reply-content {
    flex-grow: 1;
}

.reply-author-displayname a {
    text-decoration: none;

    .bbp-author-name {
        font-size: 15px;
        font-weight: 500;
        color: var(--black_700);
        line-height: 1.4;
        text-decoration: none !important;
        list-style: none;
    }
}

.bbp-meta a {
    font-size: 14px;
    color: var(--black_400);
    font-weight: 500;
}

.bbp-admin-links-dropdown select:focus,
.bbp-admin-links-dropdown select:focus-visible {
    border: 1px solid #999 !important;
    outline: none;
}

.replies-sorting .replies-sort-select {
    font-size: 14px;
    border: solid 1px var(--black_50);
    box-shadow: none;
    // padding: 10px 20px 10px 20px;
    background-color: var(--bs-white);
    border-radius: 5px;
    color: var(--black_600);
}

.forum-layout a {
    text-decoration: none !important;
}

.post-header .category-menu .all-users a img {
    width: 20px;
    margin-right: 10px;
    display: inline-block;
    border-radius: 50%;
}

.post-header .category-menu .tagList a span {
    border-radius: 4px;
    width: 12px;
    height: 12px;
    background: var(--bbpc_brand_color);
    display: inline-block;
    margin-right: 10px;
    vertical-align: -3px;
}

.action_btn {
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    box-shadow: 0 20px 30px 0 rgba(8, 102, 255, 0.24);
    border-radius: 4px;
    background: var(--bbpc_brand_color);
    display: inline-block;
    padding: 14px 28px;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.18s ease-in-out;
    text-decoration: none !important;
}

.dropdown-menu .all-users {
    padding-left: 22px !important;
}

.dropdown-menu .all-users .userlist {
    padding-left: 0px;
}

#bbpress-forums {
    font-size: 14px;
    line-height: 1.7;

    .bbp-single-user-details {
        background: var(--bs-white);
        border-radius: 10px;
        padding: 30px 20px;
        margin-bottom: 70px;
        margin-left: 1rem;
        margin-right: 1rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;

        #bbp-user-navigation {
            ul {
                padding-left: 0;
                margin-bottom: 0;
            }

            li {
                margin-top: 4px;
                list-style: none;

                &.current {
                    a {
                        color: #fff;
                        background-color: #0766FF;
                    }
                }
            }

            a {
                padding: 10px 15px;
                border: none;
                font-size: 14px;
                color: var(--black_800);
                background: rgb(208 215 222 / .32);
                border-radius: 3px;
                display: block;
                text-decoration: none;
                font-family: "Roboto", sans-serif;
            }
        }
    }

    .bbp-user-body {
        background: var(--bs-white);
        margin-bottom: 120px;
        border-radius: 10px;
    }

    #bbp-user-wrapper {
        display: flex;

        @media screen and (max-width: 767px) {
            display: block;
        }
    }
}

.bbp-user-section {
    h3 {
        font-size: 1.75rem;
        font-weight: 700;
    }
}

hr {
    margin: 1rem 0;
    color: inherit;
    background-color: currentColor;
    border: 0;
    opacity: .25;
}

@media (min-width: 992px) {
    .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
    }

    .col-lg-9 {
        flex: 0 0 auto;
        width: 75%;
    }
}

input:not(input[type=radio], input[type=checkbox], input[type=submit], input[type=range], input[type=file]),
textarea {
    width: 100%;
}

/* ============================================================
   Editor wrapper — shared between reply form and topic form
   ============================================================ */
.bbp-reply-form,
.bbp-topic-form {
    .bbp-the-content-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 10px;
        border: 1px solid var(--black_100);
        overflow: hidden;
        background: var(--bs-white);
        transition: border-color 0.15s ease, box-shadow 0.15s ease;

        &:focus-within {
            border-color: var(--bbpc_brand_color);
            box-shadow: 0 0 0 3px rgba(76, 76, 241, 0.08);
        }

        /* ------ wp-editor-wrap – reset WP layout ------ */
        .wp-editor-wrap {
            overflow: hidden;
            /* clear floats */
        }

        /* ------ Editor tab bar (Visual / Code) ------ */
        .wp-editor-tabs {
            display: flex !important;
            float: none !important;
            /* Override WP core float: right */
            background: transparent !important;
            border-bottom: 1px solid var(--black_100) !important;
            padding: 0 4px !important;
            gap: 0 !important;
            justify-content: flex-start !important;
            width: auto !important;
        }

        .wp-switch-editor {
            border: none !important;
            border-bottom: 2px solid transparent !important;
            background: transparent !important;
            color: var(--black_400) !important;
            font-size: 13px !important;
            font-weight: 600 !important;
            padding: 10px 14px !important;
            margin: 0 !important;
            border-radius: 0 !important;
            transition: color 0.15s ease, border-color 0.15s ease;
            cursor: pointer;
            float: none !important;
            height: auto !important;
            box-shadow: none !important;
            top: 0 !important;

            &:hover {
                color: var(--black_700) !important;
            }

            &.switch-tmce,
            &.switch-html {

                &[aria-pressed="true"],
                &:focus {
                    color: var(--bbpc_brand_color) !important;
                    border-bottom-color: var(--bbpc_brand_color) !important;
                    background: transparent !important;
                }
            }
        }

        /* ------ Toolbar container ------ */
        .wp-editor-container {
            border: none !important;
            box-shadow: none !important;
            clear: none !important;

            &:hover {
                border: none !important;
                box-shadow: none !important;
            }
        }

        /* ------ Quicktags (Code view toolbar) — hidden by default, only shown in HTML/Code mode ------ */
        .quicktags-toolbar {
            display: none !important;
            height: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
            overflow: hidden !important;
            border: none !important;
        }

        .wp-editor-wrap.html-active .quicktags-toolbar {
            display: flex !important;
            height: auto !important;
            flex-wrap: wrap !important;
            gap: 4px !important;
            background: var(--black_25) !important;
            border-top: none !important;
            border-bottom: 1px solid var(--black_75) !important;
            border-left: none !important;
            border-right: none !important;
            padding: 8px 14px !important;
            width: 100% !important;
            box-sizing: border-box !important;

            .ed_button {
                all: unset;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                background: transparent !important;
                border: none !important;
                color: var(--black_500) !important;
                height: 32px !important;
                min-width: 32px !important;
                font-family: 'Inter', sans-serif !important;
                font-size: 13px !important;
                font-weight: 600 !important;
                border-radius: 6px !important;
                cursor: pointer;
                text-align: center;
                transition: background 0.15s ease, color 0.15s ease;
                padding: 0 6px !important;
                box-shadow: none !important;

                &:hover {
                    background: var(--black_75) !important;
                    color: var(--black_800) !important;
                }
            }
        }

        /* ------ TinyMCE Visual editor toolbar ------ */
        .mce-tinymce {
            border: none !important;
            box-shadow: none !important;
        }

        .mce-tinymce .mce-toolbar-grp,
        .mce-toolbar-grp {
            background: var(--black_25) !important;
            background-color: var(--black_25) !important;
            border-bottom: 1px solid var(--black_75) !important;
            border-top: none !important;
            border-left: none !important;
            border-right: none !important;
            padding: 6px 10px !important;

            .mce-toolbar {
                .mce-btn-group {
                    padding: 0 2px;
                    border: none !important;
                    background: transparent !important;
                    box-shadow: none !important;
                    margin: 0 !important;

                    &::after {
                        content: '';
                        display: inline-block;
                        vertical-align: middle;
                        width: 1px;
                        height: 18px;
                        background: var(--black_150);
                        margin: 0 4px;
                    }

                    &:last-child::after {
                        display: none;
                    }
                }

                .mce-btn {
                    background: transparent !important;
                    border: none !important;
                    box-shadow: none !important;
                    border-radius: 5px !important;
                    transition: background 0.15s ease;
                    margin: 0 !important;

                    button {
                        padding: 5px 7px !important;
                        color: var(--black_500);
                    }

                    &:hover {
                        background: var(--black_75) !important;

                        button {
                            color: var(--black_800);
                        }
                    }

                    &.mce-active {
                        background: color-mix(in srgb, var(--bbpc_brand_color) 10%, transparent) !important;

                        button {
                            color: var(--bbpc_brand_color);
                        }
                    }
                }
            }
        }

        /* ------ Textarea / iframe area ------ */
        .mce-edit-area {
            border: none !important;

            iframe {
                min-height: 160px !important;
                background: var(--bs-white) !important;
            }
        }

        textarea {
            min-height: 160px !important;
            padding: 14px 18px !important;
            font-size: 14px;
            line-height: 1.6;
            resize: vertical;
            border: none !important;
            outline: none !important;
            background: var(--bs-white) !important;
            color: var(--black_800);

            &::placeholder {
                color: var(--black_400);
                font-weight: 400;
            }
        }
    }
}

.bbp-topic-form {
    background: var(--bs-white);
    padding: 55px;
    border-radius: 10px;
    box-shadow: 0 1rem 3rem rgb(0 0 0 / .175) !important;
    margin-top: 60px;

    input#anonymous_topic {
        margin-left: 17px !important;
        margin-top: 20px !important;
    }
}

.frmx-nice-select {
    background-color: var(--bs-white) !important;
    border-color: var(--black_75) !important;

    .list {
        background-color: var(--bs-white) !important;

        .option {
            color: var(--black_600) !important;

            &:hover,
            &.focus,
            &.selected.focus {
                background-color: var(--black_25) !important;
            }
        }
    }

    body.body_dark & {
        .list {
            border: 1px solid #3b3b3b !important;
        }
    }
}


/* Global quicktags — only for non-reply-form contexts (e.g. topic form) */
.quicktags-toolbar:not(.bbp-reply-form .quicktags-toolbar):not(.frmx-inline-edit-content .quicktags-toolbar) {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    border: 1px solid #dcdcdc;
    box-sizing: border-box;
    width: 100%;
    justify-content: flex-start;

    .ed_button {
        all: unset;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--bs-white, #ffffff);
        border: 1px solid #2271b1;
        color: #2271b1;
        height: auto;
        min-width: 28px;
        font-family: sans-serif;
        border-radius: 3px;
        cursor: pointer;
        box-sizing: border-box;
        text-align: center;
        transition: all 0.2s ease;

        &:hover {
            background-color: #f0f6fa;
            border-color: #135e96;
            color: #135e96;
            text-decoration: none;
        }
    }
}

body.bbpress.ast-separate-container article,
.ast-separate-container .ast-article-single:not(.ast-related-post) {
    padding: 0;
    background: transparent !important;
}

#bbpress-forums #bbp-your-profile fieldset label[for] {
    float: none;
    width: auto;
    padding: 0;
    text-align: left;
    cursor: default;
}

#bbpress-forums #bbp-your-profile fieldset.submit button {
    float: left;
}

#bbpress-forums #bbp-your-profile fieldset {
    padding: 0px;
}

#bbpress-forums #bbp-your-profile fieldset.submit button {
    font: 500 14px "Roboto", sans-serif;
    color: #fff !important;
    margin: 0;
    background: rgba(8, 102, 255, 0.8);
    padding: 15px 30px;
    border-radius: 4px;
    transition: all 0.3s linear;
    cursor: pointer;
    text-decoration: none !important;
    border: none;
    width: -moz-fit-content;
    width: fit-content;
}

#bbpress-forums #bbp-your-profile fieldset textarea {
    width: 100%;
}

/* Share Button */
.forumax-share-btn {
    color: var(--black_600, #6b707f);
    margin: 0 0 0px;
    align-items: base-line;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    cursor: pointer;
    font-size: 16px;
    width: max-content;
}

.forumax-share-btn:hover {
    color: var(--bbpc_brand_color, #0073aa);
}

/* Modal Styles */
div#forumax_share_modal {
    display: none;
    /* Hidden by default */
    background: rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;

    .forumax-modal-dialog {
        max-width: 500px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        margin: 0;

        .forumax-modal-content {
            padding: 30px 30px 35px;
            background-color: var(--bs-white);
            border-radius: 6px;
            position: relative;

            .close {
                position: absolute;
                right: 15px;
                top: 15px;
                font-size: 24px;
                line-height: 1;
                cursor: pointer;
                color: var(--black_600, #6b707f);
                text-decoration: none;

                &:hover {
                    color: #cd2653;
                }
            }

            .forumax-share-wrap {

                p {
                    margin: 0;
                }

                h2 {
                    font-size: 24px;
                    font-weight: 700;
                    margin: 0 0 20px 0;
                    padding: 0;
                }

                .social-links {
                    margin-bottom: 20px;

                    a {
                        width: 50px;
                        height: 50px;
                        background-color: var(--black_50, #f7f8f9);
                        display: inline-flex;
                        align-items: center;
                        justify-content: center;
                        border-radius: 50%;
                        color: var(--black_600, #6b707f);
                        margin-right: 10px;
                        text-decoration: none;
                        transition: all 0.3s;

                        &:hover {
                            background-color: #e2e6ea;
                        }

                        i {
                            font-size: 20px;
                        }

                        svg {
                            width: 20px;
                            height: 20px;
                        }

                        // Icon specific colors if needed, similar to EazyDocs
                        &:nth-child(2)>i {
                            color: rgb(66, 103, 178);
                        }

                        &:nth-child(3)>i {
                            color: rgb(0, 114, 177);
                        }

                        &:nth-child(4)>i,
                        &:nth-child(4)>svg {
                            color: #000;
                        }
                    }
                }

                .copy-url-wrap {
                    position: relative;

                    input {
                        width: 100%;
                        background: var(--black_25, #fcfcfc);
                        height: 40px;
                        padding: 0 40px 0 15px;
                        font-size: 14px;
                        border: 1px solid var(--black_50, #eaeeef);
                        border-radius: 4px;
                    }

                    .share-this-doc {
                        position: absolute;
                        right: 10px;
                        top: 50%;
                        transform: translateY(-50%);
                        cursor: pointer;
                        color: var(--black_600, #6b707f);

                        img {
                            border: none;
                        }

                        &:hover {
                            color: var(--bbpc_brand_color, #0073aa);
                        }
                    }


                }
            }
        }
    }
}

/* Link Copied Notification - Global */
.forumax-link-copied-wrap {
    position: fixed;
    right: 20px;
    top: 20px;
    background: var(--bbpc_brand_color);
    color: var(--bs-white);
    padding: 12px 20px;
    border-radius: 6px;
    display: none;
    font-size: 14px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--bbpc_brand_color);
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    z-index: 200000;
    font-weight: 500;

    .icon_check_alt2 {
        color: var(--bs-white);
        font-size: 18px;
    }

    .close-notice {
        font-size: 16px;
        color: var(--bs-white);
        cursor: pointer;
        margin-left: 5px;
        display: flex;

        &:hover {
            color: #ea0606;
        }
    }

    &:after {
        display: none;
    }
}

.bbp-eib-content {
    .bbp-eib-title {
        color: #000;
    }

    .tab-content {
        .bbp-eib-input {
            background: transparent;
            color: black;
        }
    }
}

#wp-media-modal {
    .media-frame-title {
        h1 {
            color: #000;
        }
    }

    input#image-details-link-to-custom {
        color: black;
    }
}

#bbpress-forums div.odd,
#bbpress-forums ul.odd {
    background-color: var(--bs-white);
}

#bbpress-forums #bbp-your-profile fieldset input,
#bbpress-forums #bbp-your-profile fieldset textarea {
    background-color: var(--bs-white);
    color: var(--black_900);
}

#bbpress-forums div.even,
#bbpress-forums ul.even {
    background-color: var(--black_25);
}

#bbpress-forums div.reply {
    padding: 28px;
}

.main-post .bbp-voting {
    left: 532px !important;
    top: 86px !important;
}

.forum-main-column {
    .main-post .bbp-voting {
        top: 190px !important;
    }
}

/* === TOPIC LEAD DESIGN IMPROVEMENTS === */

/* Hide Upvote/Downvote text labels globally - show icons only */
.single-topic .main-post .bbp-voting .bbp-voting-label,
.topic-content-wrapper .bbp-voting .bbp-voting-label,
.bbp-voting .bbp-voting-label.helpful,
.bbp-voting .bbp-voting-label.not-helpful {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
}

/* All reaction buttons in ONE horizontal row */
.single-topic .main-post .forum-post-content {
    padding-left: 0;

    /* Wrapper for all reaction elements */
    .bbpc-footer-actions,
    .bbpc-agree-disagree-buttons {
        display: inline-flex !important;
        // flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 10px !important;

        @media (max-width: 768px) {
            display: flow-root !important;
        }
    }

    /* Container that holds agree/disagree + same question + react */
    .bbpc-footer-actions {
        gap: 12px !important;
        margin-top: 25px !important;
    }

    /* Agree/Disagree buttons styling */
    .bbpc-agree-button,
    .bbpc-disagree-button {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 8px 16px !important;
        border-radius: 0.5rem;
        border: 1px solid var(--black_100) !important;
        background: var(--bs-white) !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: var(--black_700) !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;

        @media (max-width: 768px) {
            margin-right: 10px;
            margin-bottom: 5px;
        }

        &:hover {
            background: var(--black_25) !important;
            border-color: var(--black_150) !important;
        }

        &.active {
            background: #e3f2fd !important;
            border-color: #2196f3 !important;
            color: #1976d2 !important;
        }

        .bbpc-reactions-btn-counter {
            padding: 0.125rem 0.375rem !important;
            line-height: 1rem !important;
            border-radius: 0.25rem !important;
            width: inherit !important;
        }

    }

    /* Counter beside buttons */
    .bbpc-reactions-btn-counter {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: var(--black_600) !important;
        margin-left: -5px !important;
    }

    /* I have the same question button */
    .bbpc-same-topic-btn,
    [class*="same-topic"] button,
    [class*="same-question"] button {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 8px 16px !important;
        border-radius: 0.5rem !important;
        border: 1px solid var(--black_100) !important;
        background: var(--bs-white) !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: var(--black_700) !important;
        margin: 0;
        margin-top: 3px;

        @media (max-width: 375px) {
            padding: 8px 6px !important;
            font-size: 10px !important;
        }

        &:hover {
            background: var(--black_25) !important;
        }
    }

    /* React button */
    .forumax-emoji-reactions,
    [class*="react"] {
        display: inline-flex !important;
        align-items: center !important;

        @media (max-width: 768px) {
            align-items: start !important;
        }
    }

    .reaction-count-item {
        align-items: center !important;
        padding: 6px 12px;
        border: 1px solid;
    }
}

/* Force horizontal layout for all content after topic content */
.single-topic .main-post .content.editor-content+* {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 12px !important;

    @media (max-width: 768px) {
        align-items: start !important;
    }
}

/* Share button inline styling */
.single-topic .main-post .frmx-share-btn,
.single-topic .main-post [class*="share-topic"] {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    border-radius: 50px !important;
    background: transparent !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--black_600) !important;
    cursor: pointer !important;

    &:hover {
        background: var(--black_25) !important;
    }

    /* Hide the "Share this Topic" text, show only "Share" or icon */
    .share-text-full {
        display: none !important;
    }
}

.forum-post-content {

    .bbp-voting {
        position: static;
    }
}

.frmx-reaction-topic-wrap {
    margin-top: 0;
}

/* ============================
   Profile Avatar Upload
   ============================ */

/* Override bbPress default fieldset div styles for the avatar section */
#bbpress-forums #bbp-your-profile fieldset.frmx-avatar-fieldset div {
    float: none !important;
    clear: none !important;
    width: auto !important;
    margin-bottom: 0 !important;
}

#bbpress-forums #bbp-your-profile fieldset.frmx-avatar-fieldset {
    margin-bottom: 10px;
    padding: 0 0 20px 0;
    border-bottom: 1px solid var(--black_50, #eaeeef);

    legend {
        display: block !important;
        width: 100% !important;
        float: none !important;
        font-size: 18px;
        font-weight: 600;
        color: var(--black_800);
        margin-bottom: 18px;
        padding: 0;
    }
}

.frmx-avatar-upload-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 20px;
    flex-wrap: nowrap;
}

.frmx-avatar-preview {
    position: relative !important;
    width: 96px !important;
    min-width: 96px;
    height: 96px !important;
    border-radius: 50%;
    overflow: visible !important;
    flex-shrink: 0;

    img {
        width: 96px !important;
        height: 96px !important;
        border-radius: 50% !important;
        object-fit: cover;
        border: 2px solid var(--black_75, #e0e4e8);
        transition: opacity 0.3s ease;
        display: block;
    }

    &.frmx-avatar-uploading img {
        opacity: 0.4;
    }

    &.frmx-avatar-uploading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 28px;
        height: 28px;
        margin: -14px 0 0 -14px;
        border: 3px solid var(--black_100, #d0d5dc);
        border-top-color: var(--bbpc_brand_color);
        border-radius: 50%;
        animation: frmx-spin 0.7s linear infinite;
    }
}

.frmx-avatar-remove {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: #e74c3c !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0 !important;
    z-index: 2;
    line-height: 1 !important;

    &:hover {
        background: #c0392b !important;
        transform: scale(1.1);
    }

    svg {
        display: block;
    }
}

.frmx-avatar-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
}

.frmx-avatar-upload-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 9px 18px !important;
    background: var(--bbpc_brand_color, #4c4cf1);
    color: #fff !important;
    border: none !important;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    font-family: "Roboto", sans-serif;
    cursor: pointer;
    transition: background 0.25s ease, box-shadow 0.25s ease;
    width: fit-content !important;
    max-width: fit-content !important;
    line-height: 1.4;

    &:hover {
        background: rgba(8, 102, 255, 0.85);
        box-shadow: 0 4px 12px rgba(8, 102, 255, 0.3);
    }

    svg {
        flex-shrink: 0;
    }
}

.frmx-avatar-file-input {
    display: none !important;
}

.frmx-avatar-hint {
    font-size: 12px;
    color: var(--black_400, #8b919e);
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4;
}

.frmx-avatar-status {
    display: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    margin-top: 2px;
    width: fit-content;

    &.frmx-status-success {
        background: #d4edda;
        color: #155724;
    }

    &.frmx-status-error {
        background: #f8d7da;
        color: #721c24;
    }

    &.frmx-status-info {
        background: #d1ecf1;
        color: #0c5460;
    }
}

@keyframes frmx-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments for avatar upload */
@media screen and (max-width: 576px) {
    .frmx-avatar-upload-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .frmx-avatar-preview {
        width: 80px !important;
        min-width: 80px;
        height: 80px !important;

        img {
            width: 80px !important;
            height: 80px !important;
        }
    }
}

/* ============================
   Nested / Threaded Replies
   ============================ */

/* Main reply list reset */
.bbp-replies-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0;

    >li {
        list-style: none !important;
    }

    /* Ensure .forum-comment has position context for absolutely-positioned .bbp-voting */
    .forum-comment {
        position: relative;
    }

    /* --- Nested children (depth 1) --- */
    .children {
        list-style: none !important;
        padding-left: 0 !important;
        margin-left: 10px;
        /* Closer to the thread line */

        overflow: hidden;
        transition: max-height 0.35s ease;

        >li {
            list-style: none !important;
            padding-left: 12px;
            position: relative;

            /* Nested reply card restyling: gray background, no border/shadow, smaller avatar */
            >.forum-comment {
                .frmx-reply-avatar {
                    img {
                        width: 28px;
                        height: 28px;
                    }

                    /* Adjust thread line anchor point for smaller avatar */
                    &::after {
                        top: 38px;
                        left: 13px;
                    }
                }

                .frmx-reply-card {
                    background: var(--black_25, #f7f8fa);
                    border: none;
                    box-shadow: none;
                    padding: 16px 18px;
                }
            }
        }

        /* --- Depth 2+ --- */
        .children {
            margin-left: 10px;
        }
    }
}

/* "Replying to @username" label */
.frmx-replying-to {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--black_400, #9ca3af);
    margin-bottom: 6px;

    svg {
        flex-shrink: 0;
        opacity: 0.65;
    }

    a {
        color: var(--bbpc_brand_color, #4c4cf1);
        text-decoration: none !important;
        font-weight: 600;

        &:hover {
            text-decoration: underline !important;
        }
    }
}

/* Reply button inside each reply */
.frmx-nested-reply-action {
    margin-top: 8px;

    a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 500;
        color: var(--black_500, #7a808c);
        text-decoration: none !important;
        padding: 0;
        border-radius: 0;
        background: transparent;
        transition: color 0.2s ease, text-decoration-color 0.2s ease;

        svg {
            flex-shrink: 0;
        }
    }
}

/* Reply button + Reactions + Voting — same row inside forum replies.
 * .bbp-voting, .frmx-nested-reply-action, and .forumax-reactions-wrapper are
 * direct children of .comment-content (via bbp_theme_after_reply_content).
 * The text content takes full width; action elements share one row below.
 */
.forum-comment .comment-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0;
    margin-top: 12px;

    /* The reply body text occupies its own full row */
    >.bbp-reply-content,
    >.content,
    >p,
    >div.frmx-replying-to {
        flex: 0 0 100%;
    }

    /* Actions row: voting, reply button, reactions — all inline in one row */
    .bbp-voting {
        position: static !important;
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 6px;
        padding: 0;
        margin: 0;
        border: none;
        background: transparent;
        /* No order override — appears in DOM order (after content) */

        .bbp-voting-label {
            display: none !important;
        }

        a.vote {
            font-size: 0;
            line-height: 0;
            padding: 4px;

            &::before {
                font-size: 16px;
                line-height: 1;
            }
        }

        .score {
            font-size: 13px;
            font-weight: 600;
            min-width: 20px;
            text-align: center;
        }
    }

    .frmx-nested-reply-action {
        margin-top: 0;
    }

    .forumax-reactions-wrapper {
        margin-top: 0;
        margin-left: auto;
        /* Push reactions to the right */
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Separator line before the actions row */
    .bbp-voting,
    .frmx-nested-reply-action,
    .forumax-reactions-wrapper {
        padding-top: 10px;
    }

    /* Only first action element gets the border-top separator */
    >.bbp-voting:first-of-type {
        margin-top: 10px;
    }
}

/* Cancel reply-to link – fallback for contexts outside .bbp-reply-form */
#bbp-cancel-reply-to-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--black_500, #7a808c);
    text-decoration: none !important;
    padding: 10px 16px;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;

    &:hover {
        color: var(--black_800);
        background: var(--black_50, #f5f5f5);
    }
}

/* Collapse / Expand toggle button */
.bbp-replies-list {
    .frmx-thread-toggle {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 0;
        margin: 0 65px 20px;
        font-size: 12px;
        font-weight: 500;
        color: var(--bbpc_brand_color, #4c4cf1);
        background: transparent;
        border: none;
        border-radius: 0;
        cursor: pointer;
        transition: color 0.2s ease, text-decoration-color 0.2s ease;
        width: auto;
        box-shadow: none;

        &:hover {
            text-decoration: none;
        }

        .frmx-toggle-icon {
            transition: transform 0.3s ease;
        }

        /* Collapsed state — rotate chevron */
        &.is-collapsed .frmx-toggle-icon {
            transform: rotate(-90deg);
        }
    }
}

/* Responsive — reduce indent on small screens */
@media screen and (max-width: 576px) {
    .bbp-replies-list .children {
        margin-left: 14px;

        >li {
            padding-left: 10px;
        }

        .children {
            margin-left: 10px;

            .children {
                margin-left: 8px;
            }
        }
    }

    .frmx-thread-toggle {
        font-size: 11px;
        padding: 3px 10px;
    }
}


.frmx-reply-card {
    .forum-post-top {
        justify-content: space-between;
    }
}

/* Keep the reply admin menu visible inside user profile reply cards. */
.bbp-user-page .bbpress-wrapper .bbp-user-body #bbp-user-replies-created {

    .bbp-user-section,
    .forum-comment,
    .frmx-reply-card,
    .forum-post-top,
    .reply-admin-links,
    .reply-admin-menu-wrap,
    .bbp-admin-links-dropdown,
    .bbp-admin-links-dropdown .frmx-nice-select,
    .bbp-admin-links-dropdown .frmx-nice-select .list,
    .forumax-reactions-wrapper,
    .forumax-react-btn-group,
    .forumax-reaction-popup {
        overflow: visible !important;
    }

    .forum-comment,
    .frmx-reply-card,
    .reply-admin-links,
    .reply-admin-menu-wrap,
    .bbp-admin-links-dropdown,
    .bbp-admin-links-dropdown .frmx-nice-select,
    .forumax-reactions-wrapper,
    .forumax-react-btn-group {
        position: relative;
    }

    .reply-admin-links {
        z-index: 10;
    }

    .bbp-admin-links-dropdown .frmx-nice-select .list,
    .forumax-reaction-popup {
        z-index: 1000;
    }
}

/* ─── Modern Reply Button Hover Style ─── */
a.bbp-reply-to-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--black_700, #374151);
    background: transparent;
    border: 1px solid var(--black_100, #e5e7eb);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.5;

    &:hover,
    &:focus {
        background: var(--bbpc_brand_color_light, rgba(79, 70, 229, 0.06));
        border-color: var(--bbpc_brand_color_border, rgba(79, 70, 229, 0.15));
        color: var(--bbpc_brand_color, #4f46e5);

        svg,
        i,
        path {
            color: var(--bbpc_brand_color, #4f46e5);
        }
    }

    svg,
    i {
        transition: all 0.2s ease;
    }
}