/* ── User Menu Dropdown — shared component ──────────────── */

.nav-user { position: relative; flex-shrink: 0; }

.nav-avatar-pill {
    display: flex; align-items: center; gap: 10px;
    height: 54px;
    padding: 5px 18px 5px 5px;
    border: none;
    background: #F9CD2D;
    color: #003E54;
    border-radius: 12px; /* forma unica della pagina (ratifica 2 ago: card v2, non pill) */
    cursor: pointer;
    transition: filter 0.15s ease;
    font-family: var(--font);
    font-size: 15px; font-weight: 500;
    white-space: nowrap;
}
.nav-avatar-pill:hover { filter: brightness(0.92); }
.nav-avatar-pill:focus-visible { outline: 2px solid #003E54; outline-offset: 2px; }

.nav-avatar-circle {
    width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
    background: rgba(0,62,84,0.1); color: #003E54;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.nav-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.nav-user-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff; border: 1px solid rgba(0,62,84,0.15);
    border-radius: 0.75rem; box-shadow: 0 4px 20px rgba(0,62,84,0.08);
    min-width: 200px; padding: 0.5rem 0; z-index: 200;
}
.nav-user-dropdown.open { display: block; }

.nav-user-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; color: #003E54;
    font-family: var(--font);
    font-size: 14px; font-weight: 500;
    text-decoration: none; cursor: pointer;
    border: none; background: none; width: 100%; text-align: left;
    transition: background 0.15s;
}
.nav-user-dropdown-item:hover { background: rgba(0,62,84,0.05); }
.nav-user-dropdown-item svg {
    width: 16px; height: 16px; flex-shrink: 0;
    stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nav-user-dropdown-item[aria-disabled="true"] {
    opacity: 0.45; cursor: not-allowed; pointer-events: none; color: #666;
}
.nav-user-dropdown-item[aria-disabled="true"]:hover { background: none; }
.nav-user-dropdown-item--logout { color: #C0392B; }
.nav-user-dropdown-item--logout svg { stroke: #C0392B; }
.nav-user-dropdown-divider {
    height: 1px; background: rgba(0,62,84,0.1); margin: 0.5rem 0;
}

/* ── language switch (mirrors travel-planner-detail popup) ── */
.nav-user-lang {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 8px 16px;
}
.nav-user-lang-label {
    display: flex; align-items: center; gap: 10px;
    color: #003E54; font-family: var(--font);
    font-size: 14px; font-weight: 500;
}
.nav-user-lang-label svg {
    width: 16px; height: 16px; flex-shrink: 0;
    stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nav-user-lang-options { display: inline-flex; align-items: center; gap: 4px; }
.nav-user-lang-btn {
    border: 1px solid rgba(0,62,84,0.15); background: none;
    color: #003E54; font-family: var(--font);
    font-size: 13px; font-weight: 700;
    padding: 4px 9px; border-radius: 8px; cursor: pointer;
    opacity: 0.65;
    transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}
.nav-user-lang-btn:hover { opacity: 1; background: rgba(0,62,84,0.05); }
.nav-user-lang-btn.active {
    opacity: 1; background: #F9CD2D; border-color: #F9CD2D; color: #003E54;
}
.nav-user-lang-btn:focus-visible { outline: 2px solid #003E54; outline-offset: 2px; }

/* ── mobile: collapse the yellow pill to a round avatar (the "tondino"),
      matching how travel-planner-detail shows a compact avatar on mobile.
      #navGreeting is already hidden by app-header.css at this breakpoint;
      re-hiding here keeps the component self-contained. ── */
@media (max-width: 880px) {
    .nav-avatar-pill { padding: 5px; gap: 0; }
    #navGreeting { display: none; }
}
