/* Sign-in / sign-up: header account control, dialog, and the /login/ and /register/ forms. */
.nbfa-menu,
.nbfa-modal,
.nbfa-page {
    --nbfa-navy: #222f52;
    --nbfa-navy-2: #1a2442;
    --nbfa-gold: #a88757;
    --nbfa-gold-2: #c9a46a;
    --nbfa-ink: #1f2430;
    --nbfa-muted: #5f6675;
    --nbfa-line: #e6e3dd;
    --nbfa-soft: #f7f5f1;
    --nbfa-danger: #b3261e;
    --nbfa-ok: #1f7a46;
    font-family: inherit;
}

/* ---------- Header control ---------- */
.nbfa-menu { display: flex; align-items: center; justify-content: flex-end; gap: 10px; position: relative; white-space: nowrap; }
.nbfa-menu a, .nbfa-menu button { font-family: inherit; text-decoration: none !important; }
.nbfa-menu svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.nbfa-signin {
    display: inline-flex !important; align-items: center; gap: 6px;
    color: #fff !important; font-size: 14px; font-weight: 600; line-height: 1;
    padding: 9px 12px; border-radius: 999px; transition: background .15s;
}
.nbfa-signin:hover, .nbfa-signin:focus-visible { background: rgba(255,255,255,.12); }
.nbfa-join {
    display: inline-flex !important; align-items: center;
    background: var(--nbfa-gold) !important; color: #fff !important;
    font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: .01em;
    padding: 11px 18px; border-radius: 999px; transition: background .15s, transform .15s;
}
.nbfa-join:hover, .nbfa-join:focus-visible { background: var(--nbfa-gold-2) !important; transform: translateY(-1px); }

/* Mobile header sits on white: a navy pill */
.nbfa-menu--compact .nbfa-signin {
    color: var(--nbfa-navy) !important; border: 1.5px solid var(--nbfa-navy);
    padding: 7px 11px; font-size: 13px;
}
.nbfa-menu--compact .nbfa-signin:hover { background: var(--nbfa-soft); }
.nbfa-menu--compact .nbfa-signin svg { width: 15px; height: 15px; }
@media (max-width: 767px) {
    .nbfa-menu--compact .nbfa-signin { padding: 6px 10px; font-size: 12px; }
    .nbfa-menu--compact .nbfa-signin svg { display: none; }
}
@media (max-width: 374px) {
    .nbfa-menu--compact .nbfa-signin { padding: 5px 9px; font-size: 11.5px; }
}

.nbfa-user {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    background: transparent !important; border: 0 !important; color: #fff !important;
    padding: 4px 8px 4px 4px !important; border-radius: 999px; font-size: 14px; font-weight: 600;
    box-shadow: none !important;
}
.nbfa-user:hover, .nbfa-user[aria-expanded="true"] { background: rgba(255,255,255,.12) !important; }
.nbfa-avatar {
    width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--nbfa-gold); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.nbfa-caret { width: 16px !important; height: 16px !important; opacity: .8; }
.nbfa-menu--compact .nbfa-user { color: var(--nbfa-navy) !important; padding: 2px !important; }
.nbfa-menu--compact .nbfa-user:hover, .nbfa-menu--compact .nbfa-user[aria-expanded="true"] { background: var(--nbfa-soft) !important; }
.nbfa-menu--compact .nbfa-caret { display: none; }
.nbfa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.nbfa-dropdown {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 99999; min-width: 240px;
    background: #fff; border-radius: 14px; padding: 8px; text-align: left;
    box-shadow: 0 18px 40px rgba(20, 24, 40, .18), 0 2px 6px rgba(20, 24, 40, .08);
}
.nbfa-dropdown[hidden] { display: none; }
.nbfa-dd-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--nbfa-line); margin-bottom: 6px; white-space: normal; }
.nbfa-dd-head strong { display: block; color: var(--nbfa-ink); font-size: 15px; }
.nbfa-dd-head span { display: block; color: var(--nbfa-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.nbfa-dropdown a {
    display: flex !important; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
    color: var(--nbfa-ink) !important; font-size: 14px; font-weight: 500;
}
.nbfa-dropdown a svg { fill: var(--nbfa-gold); }
.nbfa-dropdown a:hover, .nbfa-dropdown a:focus-visible { background: var(--nbfa-soft); }
.nbfa-dropdown .nbfa-signout { border-top: 1px solid var(--nbfa-line); margin-top: 6px; border-radius: 0 0 9px 9px; color: var(--nbfa-muted) !important; }
.nbfa-dropdown .nbfa-signout svg { fill: var(--nbfa-muted); }

/* ---------- Dialog ---------- */
.nbfa-modal { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.nbfa-modal[hidden] { display: none; }
.nbfa-backdrop { position: absolute; inset: 0; background: rgba(18, 22, 40, .55); backdrop-filter: blur(3px); animation: nbfa-fade .2s ease; }
.nbfa-dialog {
    position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto;
    background: #fff; border-radius: 20px; padding: 32px 28px 24px; color: var(--nbfa-ink);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .3); animation: nbfa-rise .25s cubic-bezier(.2, .8, .2, 1);
}
@keyframes nbfa-fade { from { opacity: 0; } }
@keyframes nbfa-rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .nbfa-backdrop, .nbfa-dialog { animation: none; } }
.nbfa-close {
    position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
    border: 0 !important; background: var(--nbfa-soft) !important; color: var(--nbfa-muted) !important;
    font-size: 22px; line-height: 1; cursor: pointer; padding: 0 !important;
}
.nbfa-close:hover { background: var(--nbfa-line) !important; color: var(--nbfa-ink) !important; }
.nbfa-brand { color: var(--nbfa-gold); width: 44px; margin: 0 auto 6px; }
.nbfa-brand svg { width: 44px; height: 31px; display: block; }
.nbfa-title { margin: 0 0 4px !important; text-align: center; text-transform: none !important; letter-spacing: 0 !important; font-size: 24px !important; line-height: 1.25 !important; color: var(--nbfa-navy) !important; font-weight: 700 !important; }
.nbfa-sub { margin: 0 0 18px !important; text-align: center; color: var(--nbfa-muted); font-size: 14px; line-height: 1.5; }
.nbfa-sub:empty { display: none; }
.nbfa-tabs { display: flex; background: var(--nbfa-soft); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.nbfa-tabs button {
    flex: 1; border: 0 !important; background: transparent !important; color: var(--nbfa-muted) !important;
    font: inherit; font-size: 14px; font-weight: 600; padding: 9px 10px !important; border-radius: 999px; cursor: pointer;
    box-shadow: none !important;
}
.nbfa-tabs button[aria-selected="true"] { background: #fff !important; color: var(--nbfa-navy) !important; box-shadow: 0 2px 8px rgba(20, 24, 40, .1) !important; }
.nbfa-modal[data-view="lost"] .nbfa-tabs { display: none; }
body.nbfa-open { overflow: hidden; }

/* ---------- Forms (dialog and pages) ---------- */
.nbfa-page { max-width: 440px; margin: 0 auto 24px; background: #fff; border: 1px solid var(--nbfa-line); border-radius: 18px; padding: 26px 24px 20px; box-shadow: 0 10px 30px rgba(20, 24, 40, .06); }
.nbfa-page--done { text-align: center; }
.nbfa-form { margin: 0; }
.nbfa-field { display: block; margin: 0 0 14px; }
.nbfa-field > span:first-child { display: block; font-size: 13px; font-weight: 600; color: var(--nbfa-ink); margin-bottom: 6px; }
.nbfa-field em { font-style: normal; font-weight: 400; color: var(--nbfa-muted); }
.nbfa-field small { display: block; font-size: 12px; color: var(--nbfa-muted); margin-top: 5px; }
.nbfa-form input[type="text"],
.nbfa-form input[type="email"],
.nbfa-form input[type="tel"],
.nbfa-form input[type="password"] {
    width: 100% !important; box-sizing: border-box; height: 48px !important; padding: 0 14px !important;
    border: 1.5px solid var(--nbfa-line) !important; border-radius: 12px !important; background: #fff !important;
    font: inherit; font-size: 15px !important; color: var(--nbfa-ink) !important; box-shadow: none !important; margin: 0 !important;
    transition: border-color .15s, box-shadow .15s;
}
.nbfa-form input:focus { outline: none; border-color: var(--nbfa-navy) !important; box-shadow: 0 0 0 3px rgba(34, 47, 82, .12) !important; }
.nbfa-form input[aria-invalid="true"] { border-color: var(--nbfa-danger) !important; }
.nbfa-pw { position: relative; display: block; }
.nbfa-pw input { padding-right: 64px !important; }
.nbfa-show {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0 !important; background: transparent !important; color: var(--nbfa-navy) !important;
    font: inherit; font-size: 13px; font-weight: 600; padding: 8px 10px !important; cursor: pointer; box-shadow: none !important;
}
.nbfa-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 18px; font-size: 13px; }
.nbfa-row a, .nbfa-switch a, .nbfa-legal a, .nbfa-page--done a:not(.nbfa-submit) { color: var(--nbfa-navy) !important; font-weight: 600; text-decoration: none; }
.nbfa-row a:hover, .nbfa-switch a:hover { text-decoration: underline; }
.nbfa-check { display: inline-flex; align-items: center; gap: 7px; color: var(--nbfa-muted); cursor: pointer; }
.nbfa-check input { width: 16px; height: 16px; accent-color: var(--nbfa-navy); margin: 0; }
.nbfa-submit {
    display: flex !important; align-items: center; justify-content: center; width: 100% !important; height: 50px !important;
    border: 0 !important; border-radius: 999px !important; background: var(--nbfa-navy) !important; color: #fff !important;
    font: inherit; font-size: 16px !important; font-weight: 700 !important; cursor: pointer; text-decoration: none !important;
    transition: background .15s, transform .1s; box-shadow: none !important; padding: 0 20px !important;
}
.nbfa-submit:hover { background: var(--nbfa-navy-2) !important; }
.nbfa-submit:active { transform: scale(.99); }
.nbfa-submit[disabled] { opacity: .65; cursor: progress; }
.nbfa-switch { text-align: center; font-size: 14px; color: var(--nbfa-muted); margin: 16px 0 0 !important; }
.nbfa-legal { text-align: center; font-size: 12px; color: var(--nbfa-muted); margin: 12px 0 0 !important; line-height: 1.5; }
.nbfa-intro { font-size: 14px; color: var(--nbfa-muted); margin: 0 0 16px !important; line-height: 1.5; }
.nbfa-alert { border-radius: 12px; padding: 11px 14px; margin: 0 0 14px; font-size: 14px; line-height: 1.45; background: #fdecea; color: var(--nbfa-danger); }
.nbfa-alert.is-ok { background: #e3f4ea; color: var(--nbfa-ok); }
.nbfa-alert[hidden] { display: none; }
.nbfa-alert p { margin: 0 !important; }
.nbfa-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.nbfa-types { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nbfa-types legend { font-size: 13px; font-weight: 600; color: var(--nbfa-ink); margin-bottom: 6px; padding: 0; }
.nbfa-types label { position: relative; cursor: pointer; display: block; margin: 0; }
.nbfa-types input { position: absolute; opacity: 0; pointer-events: none; }
.nbfa-types label > span {
    display: block; height: 100%; box-sizing: border-box; border: 1.5px solid var(--nbfa-line); border-radius: 12px; padding: 11px 12px;
    transition: border-color .15s, background .15s;
}
.nbfa-types strong { display: block; font-size: 14px; color: var(--nbfa-ink); line-height: 1.3; }
.nbfa-types small { display: block; font-size: 12px; color: var(--nbfa-muted); line-height: 1.35; margin-top: 3px; }
.nbfa-types input:checked + span { border-color: var(--nbfa-navy); background: #f2f4f9; box-shadow: inset 0 0 0 1px var(--nbfa-navy); }
.nbfa-types input:focus-visible + span { box-shadow: 0 0 0 3px rgba(34, 47, 82, .2); }

@media (max-width: 480px) {
    .nbfa-modal { align-items: flex-end; padding: 0; }
    .nbfa-dialog { border-radius: 22px 22px 0 0; max-height: 94vh; padding: 28px 20px calc(20px + env(safe-area-inset-bottom)); animation-name: nbfa-up; }
    @keyframes nbfa-up { from { transform: translateY(100%); } }
    .nbfa-types { grid-template-columns: 1fr; }
    .nbfa-page { border: 0; box-shadow: none; padding: 8px 4px; }
}

/* ---------- Page headings (/login/, /register/) ---------- */
.nbfa-page-head { text-align: center; margin: 0 0 18px; }
.nbfa-page-head .nbfa-brand { color: #a88757; }
.nbfa-page-head .nbfa-title { font-size: 26px !important; }

/* ---------- Save hearts ---------- */
.nbf-save {
    --nbf-rose: #e0517a;
    display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
    font-family: inherit; line-height: 1; text-decoration: none !important; box-shadow: none;
    transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.nbf-save-icon { width: 19px; height: 19px; flex: none; fill: transparent; stroke: currentColor; stroke-width: 2; transition: fill .15s, stroke .15s; }
.nbf-save.is-saved .nbf-save-icon { fill: var(--nbf-rose); stroke: var(--nbf-rose); }
.nbf-save.is-popping .nbf-save-icon { animation: nbf-pop .35s ease; }
@keyframes nbf-pop { 40% { transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) { .nbf-save.is-popping .nbf-save-icon { animation: none; } }

/* On a directory card: round button on the photo */
.nbfv-tile { position: relative; }
.nbf-save--tile {
    position: absolute; top: 10px; right: 10px; z-index: 3; padding: 0 !important; margin: 0 !important;
    /* Fixed square so theme button sizes can't stretch it into an oval */
    width: 38px !important; height: 38px !important; min-width: 38px !important; min-height: 38px !important; max-width: 38px; max-height: 38px;
    aspect-ratio: 1; flex: none; box-sizing: border-box !important;
    border-radius: 50% !important; border: 0 !important; background: rgba(255, 255, 255, .95) !important; color: #1f2430 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .16) !important;
}
.nbf-save--tile:hover { transform: scale(1.08); }
.nbf-save--tile:focus-visible { outline: 3px solid rgba(34, 47, 82, .35); outline-offset: 2px; }

/* On a vendor profile: labelled button next to the other actions */
.nbf-save--profile {
    height: 44px; padding: 0 18px !important; border-radius: 999px !important; font-size: 15px !important; font-weight: 600 !important;
    border: 1.5px solid #e6e3dd !important; background: #fff !important; color: #1f2430 !important;
}
.nbf-save--profile:hover { border-color: #222f52 !important; }
.nbf-save--profile.is-saved { border-color: rgba(224, 81, 122, .45) !important; background: #fdf0f4 !important; color: #b8325a !important; }

/* "Saved to your shortlist · View" */
.nbf-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 2147482000; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 999px;
    background: #1f2430; color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
    transition: opacity .2s, transform .2s;
}
.nbf-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.nbf-toast span, .nbf-toast a { white-space: nowrap; }
.nbf-toast a { color: #c9a46a !important; font-weight: 700; text-decoration: none !important; }
@media (max-width: 767px) { .nbf-toast { bottom: 84px; } }

/* ---------- Sign-in card on vendor-only pages (/add/, /advertise/) ---------- */
.nbfa-prompt {
    position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: center;
    margin: 8px 0 24px; padding: 32px; border-radius: 22px; color: #fff;
    background: radial-gradient(120% 140% at 100% 0%, rgba(201, 164, 106, .28) 0%, rgba(201, 164, 106, 0) 45%), linear-gradient(135deg, #222f52 0%, #1a2442 100%);
    box-shadow: 0 18px 40px rgba(26, 36, 66, .22); font-family: inherit;
}
.nbfa-prompt-eyebrow { margin: 0 0 6px !important; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c9a46a; }
.nbfa-prompt-title { margin: 0 !important; color: #fff !important; font-size: clamp(24px, 3vw, 30px) !important; line-height: 1.2 !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important; }
.nbfa-prompt-text { margin: 10px 0 0 !important; color: #d5d9ea; font-size: 15px; line-height: 1.55; }
.nbfa-prompt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.nbfa-prompt-btn {
    display: inline-flex !important; align-items: center; justify-content: center; height: 46px; padding: 0 22px !important; border-radius: 999px !important;
    font-size: 15px !important; font-weight: 700 !important; text-decoration: none !important; line-height: 1 !important; transition: background .15s, border-color .15s;
}
.nbfa-prompt-btn--gold { background: #a88757 !important; color: #fff !important; }
.nbfa-prompt-btn--gold:hover { background: #c9a46a !important; }
.nbfa-prompt-btn--ghost { color: #fff !important; border: 1.5px solid rgba(255, 255, 255, .45); }
.nbfa-prompt-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.nbfa-prompt-steps { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; gap: 10px; }
.nbfa-prompt-steps li {
    display: flex; align-items: center; gap: 12px; margin: 0 !important; padding: 12px 14px; border-radius: 14px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: #e4e7f2; font-size: 14px; font-weight: 500;
}
.nbfa-prompt-steps span {
    width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(201, 164, 106, .2); color: #c9a46a; font-size: 13px; font-weight: 700;
}
@media (max-width: 800px) {
    .nbfa-prompt { grid-template-columns: 1fr; padding: 26px 20px 22px; gap: 20px; }
    .nbfa-prompt-actions .nbfa-prompt-btn { flex: 1 1 100%; }
}
