/* =====================================================
   NAVBAR DROPDOWN v5
   ===================================================== */

.jc-nav-account-btn {
    display: flex; align-items: center; gap: 6px;
    background: none; border: 1.5px solid transparent; border-radius: 999px;
    padding: 4px 10px 4px 4px; cursor: pointer; color: inherit;
    font-size: 13px; font-weight: 600; font-family: inherit;
    transition: background .2s, border-color .2s; white-space: nowrap; line-height: 1;
}
.jc-nav-account-btn:hover,
.jc-nav-account-btn[aria-expanded="true"] {
    background: rgba(212,99,122,.08);
    border-color: rgba(212,99,122,.25);
}
.jc-nav-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg,#d4637a,#e8a0b0); color: #fff;
    font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.jc-avatar-sm { width: 24px !important; height: 24px !important; font-size: 10px !important; }
.jc-nav-name { max-width: 80px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.jc-nav-caret { transition: transform .2s; flex-shrink: 0; opacity: .6; }
.jc-nav-account-btn[aria-expanded="true"] .jc-nav-caret { transform: rotate(180deg); }

/* Dropdown */
.jc-account-dropdown {
    display: none;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important; left: auto !important; bottom: auto !important;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
    min-width: 200px; max-width: 240px;
    padding: 6px;
    list-style: none !important; margin: 0 !important;
    z-index: 999999 !important;
}
.jc-account-dropdown.jc-open { display: block !important; }

/* Header — spazio ridotto, niente gap eccessivo */
.jc-dropdown-header {
    padding: 8px 10px;           /* era 8px 10px 12px — tolgo il padding-bottom extra */
    margin-bottom: 2px;
    border-bottom: 1px solid #f0f0f0;
}
.jc-dropdown-name {
    display: block;
    font-weight: 600; font-size: 13px;
    color: #222;                  /* colore fisso, non eredita dal tema */
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    line-height: 1.3;
    margin-bottom: 2px;           /* piccolo gap controllato tra nome ed email */
}
.jc-dropdown-email {
    display: block; font-size: 11px;
    color: #999;                  /* colore fisso */
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    line-height: 1.3;
}

/* Voci — colori fissi per evitare ereditarietà dal tema */
.jc-account-dropdown li { padding: 0 !important; margin: 0 !important; }
.jc-account-dropdown li a {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 10px !important;
    border-radius: 7px !important;
    color: #333 !important;        /* fisso, non bianco */
    background: transparent !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500;
    transition: background .12s, color .12s;
    line-height: 1.3;
}
.jc-account-dropdown li a:hover {
    background: #fdf2f5 !important;
    color: #d4637a !important;
}
.jc-dropdown-divider {
    border: none !important;
    border-top: 1px solid #f0f0f0 !important;
    margin: 4px 6px !important;
    padding: 0 !important; height: 1px !important;
    display: block !important;
    background: none !important;
}

/* Guest */
.jc-nav-guest { align-items: center; gap: 6px; }
.jc-nav-login-btn {
    display: flex; align-items: center; gap: 5px; background: none; border: none;
    cursor: pointer; color: inherit; font-size: 13px; font-weight: 500; font-family: inherit;
    padding: 5px 8px; border-radius: 7px; transition: background .2s; white-space: nowrap;
}
.jc-nav-login-btn:hover { background: rgba(0,0,0,.05); }
.jc-nav-register-btn { white-space: nowrap; font-size: 13px !important; padding: 6px 14px !important; }

/* Visibilità */
.jc-desktop-only { display: flex !important; }
.jc-mobile-only  { display: none !important; }
@media (max-width: 921px) {
    .jc-desktop-only { display: none !important; }
    .jc-mobile-only  { display: list-item !important; }
}

/* Mobile — invariato, già ottimo */
.jc-mobile-account-header {
    padding: 12px 20px 8px !important; border-top: 1px solid #f0f0f0 !important;
    margin-top: 4px !important; list-style: none !important;
}
.jc-mobile-user-info {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 14px; color: #333;
}
.jc-mobile-divider {
    height: 1px !important; background: #f0f0f0 !important;
    margin: 6px 20px !important; list-style: none !important;
    display: block !important; padding: 0 !important; border: none !important;
}
.jc-mobile-only a {
    display: block !important; padding: 12px 20px !important;
    font-size: 14px; color: #3a3a3a !important; text-decoration: none !important;
    border-bottom: 1px solid #f5f5f5 !important; font-weight: 400;
    transition: color .15s, background .15s;
}
.jc-mobile-only a:hover { color: #d4637a !important; background: #fdf2f5 !important; }
.jc-mobile-register { color: #d4637a !important; font-weight: 600 !important; }
