.profile-widget-container {
    position: relative;
    height: 40px;
    display: block;
    width: 40px;
    float: right;
}

.profile-widget-container .profile-icon {
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--fl-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    padding: 0;
    margin: 0;
    border: 0;
    background-color: transparent;
    font-family: inherit;
    line-height: 1;
    box-shadow: none;
    text-transform: none;
    appearance: none;
}

.profile-widget-container .profile-icon__photo {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.profile-card {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    width: 320px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.profile-header {
    margin-bottom: 20px;
    margin-top: 20px;
}

.profile-card .profile-header {
    padding-left: 20px;
    padding-right: 20px;
}

.profile-card .profile-header .fl-post-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-no-picture {
    width: 60px;
    height: 60px;
    border-radius: 50%;    
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    margin: 0 auto 10px auto;
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.profile-name {
    font-size: 1.2em;
    font-weight: bold;
}

.profile-sync {
    margin: 20px 0;
}

.widget_profile_widget {
    position: relative;
}

.profile-picture-other-profiles {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1em;
    margin-right: 5px;
    display: grid;
    place-items: center;
    line-height: 1;     
}

.profile-picture-other-profiles img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-widget-container .profile-org-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary-color);
    color: var(--primary-on);
    border: 2px solid var(--background-color, #fff);
    pointer-events: none;
}

.profile-widget-container .profile-org-badge svg {
    width: 10px;
    height: 10px;
}

.sync-button {
    padding: 10px 20px;
    border: 1px solid #fff;
    border-radius: 32px !important;
    cursor: pointer;
    text-decoration: none !important;
}

.profile-actions a {
    display: block;
    color: #4285f4;
    text-decoration: none;
    margin: 10px 0;
}

.other-profiles {
    margin-top: 20px;
}

.other-profiles p {
    font-weight: bold;
}

.profile-guest, .add-profile {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.add-profile i {
    width: 40px;
    text-align: center;
}

.profile-guest img, .add-profile img {
    width: 20px;
    margin-right: 10px;
}

.settings-section {
    text-align: left;
    margin-top: -20px;
    padding: 20px;
    max-height: 329px;
    overflow-y: auto;    
}

.settings-section a.button {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-top: 10px;
    border-radius: 45px !important;
    padding: 6px 6px 6px 10px !important;
    /*background-color: rgba(0, 0, 0, 0.12) !important;*/
}

/* The theme skin paints every child of a hovered a.button with the button hover text colour; the name follows its row. */
.profile-card .settings-section a.button .profile-name-other-profiles {
    color: inherit;
}

.settings-section a .setting-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.profile-separator {
    margin-top: 0px;
    margin-bottom: 0;
}

.add-profile {
    padding: 0 10px;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
}

.add-profile:hover {
    text-decoration: none;
}



.profile-close-container {
    text-align: right;
    font-size: 18px;
    cursor: pointer;
    margin-right: 5px;
    margin-top: 5px;

    i {
        padding: 8px 10px;
        transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1);
    }

    &:hover i.setting-icon {
        color: var(--text-color, #0a0a0a);
    }
}

/* WebKit Browsers */
.settings-section::-webkit-scrollbar {
    width: 8px;
}

.settings-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.settings-section::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.settings-section::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Firefox */
.settings-section {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* Internet Explorer and Edge */
.settings-section {
    -ms-overflow-style: -ms-autohiding-scrollbar;
}
  
/* .auth-buttons {
    gap: 0.5rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    align-content: stretch;
} */

.auth-buttons button {
    width: 170px;
}

.auth-buttons .button i.fas {
    margin-right: 8px;
}

.auth-buttons {
    display: flex !important;
    align-items: stretch;
    flex-direction: row;
    gap: 1rem;
    justify-content: flex-end;
    padding: 0.25rem;
}

.auth-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0.125rem;
    /* Independent login/register button text color (Customizer → VM Theme — Buttons);
       falls back to the accent/link color so the look is unchanged until set. */
    color: var(--login-btn-color, var(--link-color, var(--accent-color)));
}

.auth-buttons a:hover,
.auth-buttons a:focus {
    /* Login button hover color (Customizer → VM Theme — Buttons); falls back to the
       accent/link hover so the look is unchanged until set. */
    color: var(--login-btn-hover-color, var(--link-hover, var(--accent-hover)));
}

/* Redesigned look; the module wrapper prefix matches Beaver Builder's per-node CSS weight. */
.fl-module-profile-widget .profile-widget-container {
    float: none;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md, 8px);
}

.fl-module-profile-widget .profile-widget-container:hover {
    background-color: var(--surface-color, #f5f5f5);
}

.fl-module-profile-widget .profile-widget-container > .profile-picture,
.fl-module-profile-widget .profile-widget-container > .profile-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    object-fit: cover;
}

.fl-module-profile-widget .profile-card {
    top: calc(100% + 0.5rem);
    right: 0;
    width: 20rem;
    max-height: calc(100vh - 6.5rem - 2rem);
    overflow-y: auto;
    padding: 0 0 0.5rem;
    text-align: left;
    background-color: var(--background-color, #fff);
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: var(--radius-xl, 14px);
    box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,0.12));
    z-index: 70;
}

.fl-module-profile-widget .profile-close-container {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1;
}

.fl-module-profile-widget .profile-close-container i {
    display: block;
    padding: 0.375rem;
    border: 0;
    box-shadow: none;
    border-radius: 50%;
    color: var(--text-muted, #737373);
}

.fl-module-profile-widget .profile-header {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    column-gap: 0.75rem;
    align-items: center;
    margin: 0 0 0.5rem;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}

.fl-module-profile-widget .profile-header .profile-picture,
.fl-module-profile-widget .profile-header .profile-no-picture {
    grid-row: 1 / span 2;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    object-fit: cover;
}

.fl-module-profile-widget .profile-header .fl-post-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-color, #0a0a0a);
}

.fl-module-profile-widget .profile-header .profile-email {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.25;
    color: var(--text-muted, #737373);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fl-module-profile-widget .profile-header .sync-button {
    grid-column: 1 / -1;
    margin: 0.75rem 0 0;
    padding: 0 0.75rem;
    height: 2.25rem;
    border: 0;
    border-radius: var(--radius-md, 8px) !important;
    background-color: var(--brand, #006cfa);
    color: var(--brand-on, #fff);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.fl-module-profile-widget .profile-header .sync-button:hover,
.fl-module-profile-widget .profile-header .sync-button:focus-visible {
    background-color: var(--brand-hover, #454545);
    color: var(--brand-on, #fff);
}

.fl-module-profile-widget .profile-header .sync-button:active {
    background-color: var(--brand-active, #5c5c5c);
}

.fl-module-profile-widget .profile-card .settings-section {
    margin: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
}

.fl-module-profile-widget .profile-card .other-profiles {
    margin: 0.25rem 0 0;
}

.fl-module-profile-widget .profile-card .other-profiles h4,
.fl-module-profile-widget .profile-card .other-profiles p {
    margin: 0.25rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #737373);
}

.fl-module-profile-widget .profile-card .add-profile,
.fl-module-profile-widget .profile-card a.button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.25rem;
    margin: 0 0.5rem;
    padding: 0.25rem 0.5rem !important;
    border: 0;
    border-radius: var(--radius-md, 8px) !important;
    background: transparent !important;
    color: var(--text-color, #0a0a0a);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.25;
    text-decoration: none;
    box-shadow: none;
}

.fl-module-profile-widget .profile-card .add-profile:hover,
.fl-module-profile-widget .profile-card a.button:hover {
    background-color: var(--surface-color, #f5f5f5) !important;
    color: var(--text-color, #0a0a0a);
}

.fl-module-profile-widget .profile-card .add-profile .setting-icon,
.fl-module-profile-widget .profile-card a.button .setting-icon {
    width: 1.25rem;
    margin: 0;
    font-size: 1rem;
    text-align: center;
    color: var(--text-muted, #737373);
}

.fl-module-profile-widget .profile-card .profile-picture-other-profiles {
    width: 1.75rem;
    height: 1.75rem;
    margin: 0;
    border-radius: 50%;
    font-size: 0.75rem;
}

.fl-module-profile-widget .profile-card .profile-separator {
    display: none;
}

.fl-module-profile-widget .auth-buttons {
    gap: 0.25rem;
    padding: 0;
}

.fl-module-profile-widget .auth-buttons a {
    min-height: 2rem;
    padding: 0 0.75rem;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.875rem;
    font-weight: 500;
}

.fl-module-profile-widget .auth-buttons a:hover,
.fl-module-profile-widget .auth-buttons a:focus {
    background-color: var(--surface-color, #f5f5f5);
}
