/* One compact action-button size for member pages, including modal/table controls.
   Size overrides intentionally beat legacy page rules and Bootstrap utilities.
   Link buttons, close controls, rating stars, and media controls keep their roles. */
body.rv-member-page {
    --member-button-size: 2rem;
    --member-button-font-size: .8125rem;
    --member-button-radius: .375rem;
}

body.rv-member-page :is(.btn:not(.btn-link), .rv-member-action) {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: .375rem !important;
    min-height: var(--member-button-size) !important;
    height: auto !important;
    /* Optical centering: raise the label 1px without changing total padding/height. */
    padding: .1875rem .6875rem .3125rem !important;
    border-width: 1px !important;
    border-style: solid;
    border-radius: var(--member-button-radius) !important;
    font-family: inherit;
    font-size: var(--member-button-font-size) !important;
    font-weight: 500 !important;
    line-height: 1.25rem !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: center;
    white-space: normal;
    vertical-align: middle;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

body.rv-member-page .btn-primary { border-color: transparent; }

/* Older templates wrap labels in .small/small, which otherwise shrinks them twice. */
body.rv-member-page :is(.btn:not(.btn-link), .rv-member-action) :is(small, .small) {
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit;
}

body.rv-member-page :is(.btn:not(.btn-link), .rv-member-action) > :is(.bx, svg) {
    flex-shrink: 0;
    font-size: 1rem !important;
    line-height: 1;
    margin-inline: 0 !important;
}

body.rv-member-page :is(.btn.btn-icon, .rv-member-action.rv-member-action--icon) {
    flex: 0 0 var(--member-button-size);
    width: var(--member-button-size) !important;
    height: var(--member-button-size) !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* Keep connected controls flush; attached buttons follow the field's height. */
body.rv-member-page .input-group > .btn { align-self: stretch; }
body.rv-member-page :is(.btn-group, .input-group) > .btn:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
body.rv-member-page :is(.btn-group, .input-group) > .btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
body.rv-member-page .btn-group-vertical > .btn:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}
body.rv-member-page .btn-group-vertical > .btn:not(:last-child) {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
