﻿/* The main widget is now a positioning container for the dropdown */
.user-profile-widget {
    position: relative;
    z-index: 1000;
}

/* The part of the widget that is always visible and clickable */
.profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--surface-color);
    padding: 6px;
    border-radius: 50px; /* Pill shape */
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

    .profile-trigger:hover {
        background-color: var(--border-color);
    }

.profile-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--secondary-text);
    padding-right: 6px;
}

/* The dropdown menu that appears on click */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px); /* Position below the trigger with a small gap */
    right: 0;
    width: 200px;
    background-color: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    overflow: hidden; /* Ensures children conform to border-radius */
    padding: 8px;
}

.user-info {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.user-name {
    font-weight: 500;
    color: var(--primary-text);
    word-wrap: break-word;
}

.btn-logout {
    width: 100%;
    background-color: transparent;
    border: none;
    color: var(--primary-text);
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
}

    .btn-logout:hover {
        background-color: #b71c1c; /* A dark red color */
        color: white;
    }
