.csl-userbox-wrapper {
    position: relative;
    display: inline-block;
    font-family: inherit;
}

/* Trigger Area (Always Visible) */
.csl-userbox-trigger {
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    gap: 10px;
}

.csl-userbox-avatar-img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease;
}

.csl-userbox-avatar-img.csl-has-initials {
    background-color: var(--csl-t-primary, #2271b1) !important;
    color: var(--csl-t-primary-text, #ffffff) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.csl-userbox-avatar-img.csl-is-guest {
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    aspect-ratio: auto !important;
}

.csl-userbox-avatar-img i {
    transition: all 0.3s ease;
}

.csl-userbox-trigger:hover .csl-userbox-avatar-img i {
    opacity: 1; /* Apenas garantindo que esteja visível */
}

.csl-userbox-trigger:hover .csl-userbox-avatar-img {
    border-color: transparent;
    box-shadow: none;
}

.csl-userbox-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.csl-welcome-text {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.8;
}

.csl-action-text {
    font-size: 14px;
    font-weight: 700;
}

/* Dropdown Menu */
.csl-userbox-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 15px;
    width: 250px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 9999;
    overflow: hidden;
}

.csl-userbox-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: inherit;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
}

.csl-userbox-wrapper.active .csl-userbox-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header */
.csl-dropdown-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.csl-dropdown-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--csl-t-bg-muted, #f1f5f9) !important;
    border: 2px solid var(--csl-t-border, #e2e8f0) !important;
}

.csl-dropdown-avatar-inner {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background-size: cover !important;
    background-position: center center !important;
}

.csl-dropdown-avatar-inner.csl-has-initials {
    background-color: var(--csl-t-primary, #2271b1) !important;
    color: var(--csl-t-primary-text, #ffffff) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.csl-dropdown-user-info {
    display: flex;
    flex-direction: column;
}

.csl-dropdown-welcome {
    font-size: 14px;
    opacity: 0.7;
}

.csl-dropdown-name {
    font-size: 16px;
    font-weight: 700;
}

/* Dropdown Links */
.csl-dropdown-menu {
    padding: 10px 0;
    list-style: none;
    margin: 0;
}

.csl-dropdown-menu li {
    margin: 0;
}

.csl-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    gap: 10px;
    transition: background 0.2s;
    font-size: 15px;
}

.csl-dropdown-menu a:hover {
    background: rgba(0, 0, 0, 0.03);
}

.csl-dropdown-menu i {
    width: 20px;
    text-align: center;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .csl-userbox-info {
        display: none !important;
    }

    /* Force wrapper relative positioning on mobile headers */
    .csl-userbox-wrapper {
        position: relative !important;
        display: inline-block !important;
    }

    /* Dropdown alignment & look on mobile */
    .csl-userbox-wrapper .csl-userbox-dropdown {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        width: 240px !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
        z-index: 99999 !important;
        margin-top: 10px !important;
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(10px) !important;
        transition: all 0.2s ease !important;
    }

    /* Show dropdown properly on mobile when active */
    .csl-userbox-wrapper.active .csl-userbox-dropdown {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    /* Hide arrow indicator on mobile headers to avoid overlap */
    .csl-userbox-dropdown::before {
        display: none !important;
    }

    /* Hide visitor/user avatar inside dropdown on mobile to prevent duplicates */
    .csl-userbox-dropdown .csl-dropdown-avatar {
        display: none !important;
    }

    /* Standardize dropdown header for visitor/name on mobile */
    .csl-userbox-dropdown .csl-dropdown-header {
        padding: 12px 16px !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        text-align: center !important;
        justify-content: center !important;
    }
    .csl-userbox-dropdown .csl-dropdown-user-info {
        align-items: center !important;
    }

    /* Strict list bullets reset to bypass theme header rules */
    .csl-userbox-dropdown ul.csl-dropdown-menu,
    .csl-userbox-dropdown ul.csl-dropdown-menu li {
        list-style: none !important;
        list-style-type: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .csl-userbox-dropdown ul.csl-dropdown-menu li::before {
        display: none !important;
        content: none !important;
    }

    /* Smooth spacing on dropdown menu links */
    .csl-userbox-dropdown .csl-dropdown-menu a {
        padding: 10px 16px !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .csl-userbox-dropdown .csl-dropdown-menu a i {
        font-size: 15px !important;
        color: #64748b !important;
    }
}