/* =============================================
   AUTH-NAV.CSS — Avatar, Dropdown, Popup
   ============================================= */

.nav-avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* ── Avatar ── */
.nav-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #f37021;
    box-shadow: 0 2px 10px rgba(243, 112, 33, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 18px rgba(243, 112, 33, 0.45);
}

/* ── Dropdown ── */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 210px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 20px;
    border: 1.5px solid rgba(243, 112, 33, 0.15);
    box-shadow: 0 8px 32px rgba(180, 90, 10, 0.13), 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    z-index: 1001;
    animation: dropFadeIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nav-dropdown.open { display: block; }

@keyframes dropFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

.nav-dropdown-header {
    padding: 14px 18px 11px;
    font-size: 0.88em;
    font-weight: 700;
    color: #f37021;
    border-bottom: 1px solid rgba(243, 112, 33, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 18px;
    font-size: 0.88em;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-item i {
    color: #f37021;
    width: 16px;
    font-size: 0.92em;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.15s;
}
.nav-dropdown-item:hover {
    background: rgba(243, 112, 33, 0.07);
    color: #f37021;
}
.nav-dropdown-item:hover i { opacity: 1; }


/* ── Popup overlay ── */
.avatar-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.avatar-popup-overlay.open {
    display: flex;
    animation: overlayIn 0.22s ease;
}
@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Popup box ── */
.avatar-popup {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 26px 22px 22px;
    width: min(480px, 92vw);
    border: 1.5px solid rgba(243, 112, 33, 0.14);
    box-shadow: 0 24px 64px rgba(180, 90, 10, 0.14), 0 4px 16px rgba(0,0,0,0.07);
    animation: popupIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popupIn {
    from { opacity: 0; transform: scale(0.92) translateY(14px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);     }
}

.avatar-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(243, 112, 33, 0.1);
}
.avatar-popup-header h3 {
    font-size: 0.98em;
    font-weight: 700;
    color: #2a2a2a;
    letter-spacing: 0.2px;
}
.avatar-popup-close {
    background: none;
    border: none;
    font-size: 1em;
    color: #bbb;
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 10px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.avatar-popup-close:hover {
    background: rgba(243, 112, 33, 0.09);
    color: #f37021;
}

/* ── Avatar grid ── */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.avatar-grid-item {
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1;
    border: 2.5px solid transparent;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.avatar-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.avatar-grid-item:hover {
    border-color: #f37021;
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(243, 112, 33, 0.28);
}
.avatar-grid-item:hover img { transform: scale(1.05); }
.avatar-grid-item.selected {
    border-color: #f37021;
    box-shadow: 0 0 0 3px rgba(243, 112, 33, 0.22), 0 4px 14px rgba(243, 112, 33, 0.18);
}