﻿/* ── Invisible overlay — closes menu on outside click ───────────── */
.profile-menu-overlay
{
    position: fixed;
    inset: 0;
    z-index: 999;
}

/* nav must be relative so the panel positions from it */
nav.app-header-nav
{
    position: relative;
}

/* ── Dropdown panel ─────────────────────────────────────────────── */
.profile-dropdown
{
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    min-width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.10);
    overflow: hidden;
    animation: profileDropIn .15s ease;
}

@keyframes profileDropIn
{
    from
    {
        opacity: 0;
        transform: translateY(-6px);
    }

    to
    {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Header row: icon + name + email ────────────────────────────── */
.profile-dropdown-header
{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--ct-brand-dark, #1a1a2e);
    color: rgba(255,255,255,.9);
}

    .profile-dropdown-header .icon-user
    {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        opacity: .8;
    }

.profile-dropdown-name
{
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-name-full
{
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.profile-name-email
{
    font-size: .75rem;
    opacity: .65;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Divider ────────────────────────────────────────────────────── */
.profile-dropdown-divider
{
    height: 1px;
    background: rgba(0,0,0,.08);
}

/* ── Menu items ─────────────────────────────────────────────────── */
.profile-dropdown-item
{
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    color: #333;
    transition: background .15s ease, color .15s ease;
    text-decoration: none;
}

    .profile-dropdown-item:hover
    {
        background: rgba(0,0,0,.05);
        color: #2563eb;
    }

/* Logout gets a red hover */
.profile-dropdown-logout:hover
{
    background: #fff5f5;
    color: #dc2626;
}

/* SVG icon inside each item */
.profile-item-icon
{
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
}

/* ── Chevron rotates when open ──────────────────────────────────── */
.app-header-chevron
{
    transition: transform .2s ease;
    display: inline-block;
}

    .app-header-chevron.chevron-up
    {
        transform: rotate(180deg);
    }
