/* Community Experts RC5 — signed-off author-panel action row.
   Follow extends SMF's native profile/contact row; PM, Email and Website use
   the same monochrome 24px icon language and never get individual button chrome. */

.poster .user_info > li.ce_author_profile {
    display: flex;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: .55rem 0 .2rem;
    padding: .52rem 0 0;
    border-top: 1px solid rgba(73, 96, 119, .18);
    box-sizing: border-box;
}

.poster .ce_author_actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    width: auto;
    height: 1.55rem;
    min-height: 1.55rem;
    margin: 0;
    padding: 0;
    line-height: 1;
    list-style: none;
}

.poster .ce_author_actions > .ce_author_action_item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.18rem;
    width: 1.18rem;
    height: 1.55rem;
    margin: 0;
    padding: 0;
    line-height: 1;
    list-style: none;
}

.poster .ce_author_actions .ce_author_action,
.poster .ce_author_actions .ce_follow_button.ce_follow_button--author {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 1.18rem;
    width: 1.18rem !important;
    min-width: 1.18rem !important;
    height: 1.55rem !important;
    min-height: 1.55rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #29466d !important;
    line-height: 1 !important;
    text-decoration: none !important;
    vertical-align: middle;
    opacity: .94;
}

.poster .ce_author_actions .ce_author_action:hover,
.poster .ce_author_actions .ce_author_action:focus-visible,
.poster .ce_author_actions .ce_follow_button.ce_follow_button--author:hover,
.poster .ce_author_actions .ce_follow_button.ce_follow_button--author:focus-visible {
    background: transparent !important;
    color: #0f5f99 !important;
    text-decoration: none !important;
    opacity: 1;
}

.poster .ce_author_actions .ce_author_action:focus-visible,
.poster .ce_author_actions .ce_follow_button.ce_follow_button--author:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px !important;
}

.poster .ce_author_actions .ce_author_action__icon,
.poster .ce_author_actions .ce_follow_button__icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 1.08rem !important;
    width: 1.08rem !important;
    min-width: 1.08rem !important;
    height: 1.08rem !important;
    min-height: 1.08rem !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    color: currentColor !important;
}

.poster .ce_author_actions .ce_author_action__svg,
.poster .ce_author_actions .ce_follow_button__svg {
    display: block !important;
    width: 1.08rem !important;
    height: 1.08rem !important;
    min-width: 1.08rem !important;
    min-height: 1.08rem !important;
    fill: currentColor !important;
    stroke: none !important;
    pointer-events: none;
}

.poster .ce_author_actions .ce_follow_button__svg--following {
    display: none !important;
}

.poster .ce_author_actions .ce_follow_button--active .ce_follow_button__svg--add {
    display: none !important;
}

.poster .ce_author_actions .ce_follow_button--active .ce_follow_button__svg--following {
    display: block !important;
}

/* Screen-reader labels remain available while every visible control stays
   icon-only and occupies exactly the same optical footprint. */
.poster .ce_author_actions .ce_author_action__text,
.poster .ce_author_actions .ce_follow_button__text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* A self row can legitimately contain Website only. Follow/PM/Email are
   filtered by the source model, not hidden individually by the theme. */
.poster .ce_author_profile + .postcount {
    margin-top: .12rem;
}

@media (max-width: 720px) {
    .poster .user_info > li.ce_author_profile {
        margin-top: .45rem;
        padding-top: .45rem;
    }

    .poster .ce_author_actions {
        gap: .62rem;
    }
}

@media (forced-colors: active) {
    .poster .ce_author_actions .ce_author_action,
    .poster .ce_author_actions .ce_follow_button.ce_follow_button--author {
        color: LinkText !important;
        forced-color-adjust: auto;
    }
}


/* RC7: ordinary-member Follow uses the same custom tooltip language as the
   connected expert control, while keeping its own message text. */
.poster .ce_author_actions .ce_follow_button--author .ce_follow_popup,
.poster .ce_author_actions .ce_author_info .ce_follow_popup {
    position: absolute !important;
    left: 50% !important;
    bottom: calc(100% + .62rem) !important;
    min-width: max-content !important;
    max-width: min(18rem, calc(100vw - 2rem)) !important;
    padding: .46rem .68rem !important;
    border: 0 !important;
    border-radius: .42rem !important;
    background: #3d3d40 !important;
    color: #fff !important;
    box-shadow: 0 .24rem .75rem rgb(0 0 0 / .26) !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, .18rem) !important;
    transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
    z-index: 10000 !important;
}

.poster .ce_author_actions .ce_follow_button--author .ce_follow_popup::after,
.poster .ce_author_actions .ce_author_info .ce_follow_popup::after {
    content: '';
    position: absolute;
    top: calc(100% - .21rem);
    left: 50%;
    width: .46rem;
    height: .46rem;
    background: #3d3d40;
    transform: translateX(-50%) rotate(45deg);
}

.poster .ce_author_actions .ce_follow_button--author:hover .ce_follow_popup,
.poster .ce_author_actions .ce_follow_button--author:focus-visible .ce_follow_popup,
.poster .ce_author_actions .ce_author_info:hover .ce_follow_popup,
.poster .ce_author_actions .ce_author_info:focus-visible .ce_follow_popup {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) !important;
}

/* Gender is passive information, but deliberately shares the same monochrome
   size, weight, spacing and tooltip treatment as the author action icons. */
.poster .ce_author_actions .ce_author_info {
    cursor: default;
}

.poster .ce_author_actions .ce_author_action--gender {
    position: relative;
}

.poster .ce_author_actions .ce_author_action--gender .ce_author_action__svg {
    fill: currentColor !important;
}

@media (hover: none) {
    .poster .ce_author_actions .ce_follow_button--author .ce_follow_popup,
    .poster .ce_author_actions .ce_author_info .ce_follow_popup {
        display: none !important;
    }
}


/* RC8: PM / Email / Website use the same custom tooltip component as Follow.
   Native title tooltips are deliberately not emitted by the PHP renderer. */
.poster .ce_author_actions .ce_author_action:not(.ce_author_action--follow) .ce_follow_popup {
    position: absolute !important;
    left: 50% !important;
    bottom: calc(100% + .62rem) !important;
    min-width: max-content !important;
    max-width: min(18rem, calc(100vw - 2rem)) !important;
    padding: .46rem .68rem !important;
    border: 0 !important;
    border-radius: .42rem !important;
    background: #3d3d40 !important;
    color: #fff !important;
    box-shadow: 0 .24rem .75rem rgb(0 0 0 / .26) !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, .18rem) !important;
    transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
    z-index: 10000 !important;
}

.poster .ce_author_actions .ce_author_action:not(.ce_author_action--follow) .ce_follow_popup::after {
    content: '';
    position: absolute;
    top: calc(100% - .21rem);
    left: 50%;
    width: .46rem;
    height: .46rem;
    background: #3d3d40;
    transform: translateX(-50%) rotate(45deg);
}

.poster .ce_author_actions .ce_author_action:not(.ce_author_action--follow):hover .ce_follow_popup,
.poster .ce_author_actions .ce_author_action:not(.ce_author_action--follow):focus-visible .ce_follow_popup {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) !important;
}

@media (hover: none) {
    .poster .ce_author_actions .ce_author_action:not(.ce_author_action--follow) .ce_follow_popup {
        display: none !important;
    }
}
