/* ================================
   REPLY LAYOUT FIX
   ================================ */

/* Anchor point for absolute positioning */
#bbpress-forums .bbp-replies li {
    position: relative !important;
}
.bbp-replies{
  border: none !important;
}

/* Pull the header (date + admin links) to top-right, overlapping author row */
#bbpress-forums .bbp-reply-header {
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
}

.bbp-reply-revision-log{
  display: none;
}

#bbpress-forums .bbp-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
    font-size: 12px !important;
    color: #999 !important;
}

/* Admin links smaller and right-aligned */
#bbpress-forums .bbp-admin-links {
    font-size: 11px !important;
    opacity: 0.7 !important;
}

/* Reply wrapper: column layout */
#bbpress-forums .bbp-replies li > div.reply {
    display: flex !important;
    flex-direction: column !important;
    float: none !important;
    width: 100% !important;
    border: 1px solid #d3ecff8c;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #8080800a;
} 
/*
#bbpress-forums .bbp-replies li > div.reply {
    display: flex !important;
    flex-direction: column !important;
    float: none !important;
    width: 100% !important;
    border: 1px solid #ffebc575;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fffcf72e !important;
}
*/

/* Author row: horizontal, with right padding to avoid overlapping date */
#bbpress-forums .bbp-reply-author {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    float: none !important;
    width: 100% !important;
    padding-right: 180px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #eee !important;
    margin-bottom: 12px !important;
    padding: 10px;
    background: #e6ecd485;
    border-radius: 10px;
}

/* Avatar */
#bbpress-forums .bbp-reply-author .bbp-author-avatar img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: block !important;
}

/* Name inline */
#bbpress-forums .bbp-author-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    color: #333 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* Role */
#bbpress-forums .bbp-author-role {
    font-size: 12px !important;
    color: #888 !important;
    font-weight: normal !important;
}

/* Hide clutter */
#bbpress-forums .bbp-reply-ip,
#bbpress-forums .tc_display {
    display: none !important;
}

/* Content full width */
#bbpress-forums .bbp-reply-content {
    width: 100% !important;
    margin-left: 0px !important;
    float: none !important;
    clear: both !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #444 !important;
    border: none !important;
    background: none !important;
    padding: 15px !important;
}

/* Reactions */
.reply-reactions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin-top: 10px !important;
}
/* Admin links now live inside .bbp-reply-content, show at bottom */
#bbpress-forums .bbp-reply-content .bbp-admin-links {
    display: block !important;
    margin-top: 12px !important;
    padding-top: 10px !important;
    border-top: 1px solid #eee !important;
    font-size: 11px !important;
    opacity: 0.7 !important;
}

/* Hide the now-empty original location */
#bbpress-forums .bbp-meta .bbp-admin-links {
    display: none !important;
}

/* Hide Headers */
.bbp-replies > .bbp-header, .bbp-replies > .bbp-footer{
  display: none !important;
}

/* Role under the name */
/* Name + role wrapper: vertical stack */
#bbpress-forums .bbp-name-role-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

#bbpress-forums .bbp-author-name {
    display: block !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    color: #333 !important;
    margin: 0 !important;
    text-align: left;
}

#bbpress-forums .bbp-author-role {
    display: block !important;
    font-size: 12px !important;
    color: #888 !important;
    font-weight: normal !important;
}

.bbp-template-notice, .bbp-pagination-count{
  display: none !important;
}

.bbp-replies-list li .hentry{
  padding: 0px !important;
}

#bbp_reply_submit{
  background: #405132;
  border: none;
  border-radius: 10px;
}

.bbp-reply-header .bbp-reply-permalink{
    display: none !important;
}

.bbp-author-avatar img{
    margin-top: 0px !important;
}

/* Form buttons */
#qt_bbp_reply_content_toolbar #qt_bbp_reply_content_block, #qt_bbp_reply_content_del, #qt_bbp_reply_content_img, #qt_bbp_reply_content_ul, #qt_bbp_reply_content_ol, #qt_bbp_reply_content_li, #qt_bbp_reply_content_code, #qt_bbp_reply_content_close{
    display: none !important;
}

/* From checkbox about notification */
#bbp_topic_subscription, [for="bbp_topic_subscription"]{
    display: none !important;
}

/* reply date */
.bbp-reply-post-date{
    text-align: right;
}

/* hide topic main reply content (description content) */
ul.bbp-replies-list > li .bbp-reply-position-1 {
    display: none;
}


.bbp-topic-split-link{
    display: none !important;
}

/* Thread hirarchy */
ul.bbp-replies-list > li > div > .bbp-reply-author {
    background:  #e6ecd4eb !important;
}
ul.bbp-replies-list > li > .loop-item--1 {
    background: #faefdb3d !important;
    border: 1px solid #ffedcc !important;
}
.bbp-replies-list > li{
    margin-top: 20px;
}

/* Subscribe button */
a.subscription-toggle{
    background: var(--e-global-color-3d611bf) !important;
    border-radius: 5px !important;
    padding: 5px 10px !important;
    display: block !important;
    color: #fff !important; 
    text-decoration: none !important;
    font-size: 14px !important;
}
#subscription-toggle{
    font-size: 0px !important;
}
.subscription-toggle:hover{
    background: #4c6090 !important;
}

/* form legend reply to */
.bbp-reply-form .bbp-form > legend{
    display: none !important;
}


#bbp-cancel-reply-to-link{
    display: none !important;
}

@media only screen and (max-width: 720px) {
    .bbp-replies-list .bbp-reply-author{
        padding: 10px !important;
    }
    .bbp-replies-list .bbp-reply-autho .bbp-author-avatar img, 
    #bbpress-forums div.bbp-reply-author img.avatar, #bbpress-forums div.bbp-topic-author img.avatar {
        position: relative !important;
    }
}
@media only screen and (max-width: 480px) {
    .bbp-replies-list .bbp-reply-autho .bbp-author-avatar img, 
    #bbpress-forums div.bbp-reply-author img.avatar, #bbpress-forums div.bbp-topic-author img.avatar {
        position: relative !important;
    }
}