/*
 * Account menu header block: login link, account pill, dropdown. Enqueued as `nnpbc-account-menu`.
 * Single-class selectors, no !important, so the theme can override by targeting the same classes.
 * Colors use the theme's --wp--preset--color--* custom properties with hex fallbacks.
 */

.nnpbc-account-mount { display: flex; align-items: center; }

.nnpbc-login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wp--preset--color--linen, #F9F9F3);
    font-size: var(--wp--preset--font-size--extra-small, 14px);
    line-height: 1.6;
    text-decoration: none;
    white-space: nowrap;
}
.nnpbc-login-link:hover { text-decoration: underline; }
/* Sized in CSS, not attributes — the theme's svg reset zeroes attribute-sized inline svgs. */
.nnpbc-login-link > svg { flex: 0 0 auto; width: 16px; height: 16px; }

.nn-account {
    position: relative;
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(249, 249, 243, 0.35);
    padding-left: 22px;
}

.nn-account-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(249, 249, 243, 0.12);
    color: var(--wp--preset--color--linen, #F9F9F3);
    border: 1px solid rgba(249, 249, 243, 0.3);
    border-radius: 9999px;
    padding: 4px 12px;
    font-family: inherit;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease;
}
.nn-account-trigger:hover,
.nn-account:focus-within .nn-account-trigger { background-color: rgba(249, 249, 243, 0.22); }

/* Size the icons in CSS, not just via their width/height attributes. The theme's global svg reset
   zeroes attribute-sized inline svgs once the name is hidden on mobile, which left an empty pill. */
.nn-account-trigger > svg:first-child { flex: 0 0 auto; width: 16px; height: 16px; }
.nn-account-trigger .nn-chevron { flex: 0 0 auto; width: 10px; height: 6px; }

.nn-account .nn-chevron { transition: transform .15s ease; }
.nn-account:hover .nn-chevron,
.nn-account:focus-within .nn-chevron { transform: rotate(180deg); }

.nn-account-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(18, 59, 54, 0.22);
    padding: 8px 0;
    min-width: 210px;
    z-index: 1200;
}
.nn-account:hover .nn-account-dropdown,
.nn-account:focus-within .nn-account-dropdown { display: flex; }

.nn-account-dropdown a {
    color: var(--wp--preset--color--dark-emerald, #123B36);
    font-size: 14.5px;
    line-height: 1.5;
    padding: 9px 18px;
    text-decoration: none;
    white-space: nowrap;
}
.nn-account-dropdown a:hover {
    background-color: var(--wp--preset--color--secondary, #EBFFF8);
    text-decoration: none;
}
.nn-account-dropdown .nn-account-signout { border-top: 1px solid #ECECE5; margin-top: 6px; }

@media (max-width: 782px) {
    .nn-account-name { display: none; }
    .nn-account { padding-left: 16px; }
    .nn-account-trigger { padding: 4px 10px; }
}
