/**
 * Sidebar Profile Panel
 * 
 * User profile card in desktop sidebar — avatar, name, role, status.
 * Glassmorphism style, premium feel.
 */

/* ── Profile Container ── */
.sidebar-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 20px 20px;
    border-bottom: 1px solid var(--t-glass-border);
    position: relative;
}

/* ── Avatar ── */
.sidebar-profile__avatar-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.sidebar-profile__avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.sidebar-profile:hover .sidebar-profile__avatar {
    border-color: var(--t-accent-solid);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(var(--t-accent-rgb, 239, 68, 68), 0.15);
}

/* ── Online Status Dot ── */
.sidebar-profile__status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #22c55e;
    border: 3px solid var(--t-sidebar-bg, #0a0e1a);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
    animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 14px rgba(34, 197, 94, 0.6);
    }
}

/* ── Profile Info ── */
.sidebar-profile__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    min-width: 0;
    width: 100%;
}

.sidebar-profile__name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--t-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sidebar-profile__role {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--t-text-muted);
}

.sidebar-profile__role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--t-accent-solid), color-mix(in oklch, var(--t-accent-solid), white 20%));
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(var(--t-accent-rgb, 239, 68, 68), 0.3);
}

/* ── Settings Button ── */
.sidebar-profile__settings-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--t-text-muted);
    transition: color 0.2s, background-color 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-profile__settings-btn:hover {
    color: var(--t-text);
    background: var(--t-accent-muted);
}

.sidebar-profile__settings-btn:active {
    transform: scale(0.9);
}

.sidebar-profile__settings-btn svg {
    transition: transform 0.4s ease;
}

.sidebar-profile__settings-btn:hover svg {
    transform: rotate(45deg);
}