/* VFCM v1.0.54 — user menu geometry and balanced membership-crown inset. */
:root {
    --vfcm-header-action-radius: 8px;
}

/* Search, membership crown and user avatar share one exact corner curve. */
.right-sub-item-area .search-item-block .vfcm-search-open,
.right-sub-item-area > .subscribe-btn-item,
.right-sub-item-area > .subscribe-btn-item > a,
.right-sub-item-area > .subscribe-btn-item > a > img {
    border-radius: var(--vfcm-header-action-radius) !important;
}

.right-sub-item-area > .subscribe-btn-item,
.right-sub-item-area > .subscribe-btn-item > a {
    overflow: hidden !important;
}

/*
 * Keep the membership crown on the exact same baseline as the neighbouring
 * search and user controls. Theme styles historically treat this anchor as
 * inline text and its image as text-top, which lifts the whole crown.
 */
.right-sub-item-area > .subscribe-btn-item {
    position: static !important;
    inset: auto !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    vertical-align: middle !important;
    transform: none !important;
}

.right-sub-item-area > .subscribe-btn-item > a {
    box-sizing: border-box !important;
    position: static !important;
    inset: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    vertical-align: middle !important;
    transform: none !important;
}

.right-sub-item-area > .subscribe-btn-item > a > img {
    box-sizing: border-box !important;
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    vertical-align: middle !important;
    transform: none !important;
}

.right-sub-item-area > .user-menu {
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: min(340px, 42vw) !important;
    margin: 0 !important;
}

.right-sub-item-area > .user-menu .user-name {
    box-sizing: border-box !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: 340px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 2px 10px 2px 4px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: left !important;
    text-transform: uppercase;
    white-space: nowrap;
}

.right-sub-item-area > .user-menu .user-name > span:first-child:not(.vfcm-user-label) {
    box-sizing: border-box !important;
    position: relative !important;
    inset: auto !important;
    display: block !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    overflow: visible !important;
    border-radius: var(--vfcm-header-action-radius) !important;
    background: transparent !important;
}

.right-sub-item-area > .user-menu .user-name > span:first-child:not(.vfcm-user-label) img {
    box-sizing: border-box !important;
    display: block !important;
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    margin: 0 !important;
    border-radius: var(--vfcm-header-action-radius) !important;
    object-fit: contain !important;
}

.right-sub-item-area > .user-menu .user-name > span:first-child:not(.vfcm-user-label)::after {
    box-sizing: border-box !important;
    position: absolute !important;
    content: "" !important;
    display: block !important;
    top: -1px !important;
    right: -3px !important;
    width: 10px !important;
    height: 10px !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    background: #38b653 !important;
    box-shadow: 0 2px 3px rgba(0, 0, 0, .2) !important;
}

.right-sub-item-area > .user-menu .user-name > .vfcm-user-label {
    box-sizing: border-box !important;
    position: static !important;
    inset: auto !important;
    display: block !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 270px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font: inherit !important;
    line-height: 1.2 !important;
    direction: ltr;
    text-align: left !important;
    text-overflow: ellipsis;
    white-space: nowrap !important;
}

.right-sub-item-area > .user-menu .user-name > .vfcm-user-label::before,
.right-sub-item-area > .user-menu .user-name > .vfcm-user-label::after {
    content: none !important;
    display: none !important;
}

.right-sub-item-area > .user-menu .user-name > .vfcm-user-chevron {
    position: static !important;
    display: block !important;
    flex: 0 0 14px !important;
    width: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    text-align: center !important;
}

/* The trigger carries no independent pointer: the pointer belongs to the panel. */
.right-sub-item-area > .user-menu .user-name::after {
    content: none !important;
    display: none !important;
}

.right-sub-item-area > .user-menu > .content-user {
    top: 40px !important;
    right: 0 !important;
    left: auto !important;
    width: 220px !important;
    min-width: 220px !important;
    margin: 0 !important;
    transform: none !important;
}

/* Pointer and panel now share the same positioning context and always move together. */
.right-sub-item-area > .user-menu > .content-user::before {
    box-sizing: border-box !important;
    position: absolute !important;
    z-index: 1 !important;
    content: "" !important;
    display: block !important;
    top: -10px !important;
    right: 12px !important;
    bottom: auto !important;
    left: auto !important;
    width: 0 !important;
    height: 0 !important;
    border-top: 0 !important;
    border-right: 10px solid transparent !important;
    border-bottom: 10px solid #fff !important;
    border-left: 10px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: none !important;
}

@media (max-width: 1200px) {
    .right-sub-item-area > .user-menu { min-width: 0 !important; max-width: min(310px, 44vw) !important; }
    .right-sub-item-area > .user-menu .user-name { min-width: 0 !important; max-width: 310px !important; }
    .right-sub-item-area > .user-menu .user-name > .vfcm-user-label { max-width: 240px !important; }
}

@media (max-width: 767px) {
    .right-sub-item-area > .user-menu { flex: 0 1 auto !important; min-width: 0 !important; max-width: min(250px, 52vw) !important; }
    .right-sub-item-area > .user-menu .user-name {
        gap: 7px !important;
        min-width: 0 !important;
        max-width: 250px !important;
        height: 36px !important;
        padding: 1px 6px 1px 3px !important;
    }
    .right-sub-item-area > .user-menu .user-name > span:first-child:not(.vfcm-user-label),
    .right-sub-item-area > .user-menu .user-name > span:first-child:not(.vfcm-user-label) img {
        flex-basis: 32px !important;
        width: 32px !important;
        height: 32px !important;
        max-width: 32px !important;
    }
    .right-sub-item-area > .user-menu .user-name > .vfcm-user-label { max-width: 190px !important; }
    .right-sub-item-area > .user-menu > .content-user {
        top: 36px !important;
        width: min(220px, calc(100vw - 24px)) !important;
        min-width: min(220px, calc(100vw - 24px)) !important;
        max-width: calc(100vw - 24px) !important;
    }
    .right-sub-item-area > .user-menu > .content-user::before {
        top: -9px !important;
        right: 10px !important;
        border-right-width: 9px !important;
        border-bottom-width: 9px !important;
        border-left-width: 9px !important;
    }
}
