/* Shared site header (public/site-header.js). Every rule is scoped to .lv-header,
 * .lv-back, or .lv-menu-catch, so pages with their own .btn or .logo rules
 * (job-finder.css, the guides) cannot change the header, and the header cannot
 * change them. Values match the landing header in public/index.html. */

.lv-header{font-family:var(--font,'Helvetica Neue','Segoe UI',Roboto,Helvetica,Arial,sans-serif);color:var(--text,#f4f5fb);line-height:1.5;-webkit-font-smoothing:antialiased}
.lv-header .lv-inner{max-width:1080px;margin:0 auto;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:10px}
/* Auth screen (log-in / create-account / practice entry): minimal header that
 * matches the baseline — logo + the single Find jobs link inside the 520px
 * auth column, so the logo sits at the left of that centered column. The
 * baseline auth link was a plain .btn-ghost <a> (underlined, body line-height),
 * and the row never wrapped on mobile, so reproduce both here. */
.lv-header.lv-header--auth .lv-inner{max-width:520px;flex-wrap:nowrap}
.lv-header.lv-header--auth .lv-nav{width:auto;flex-wrap:nowrap;justify-content:flex-end}
.lv-header.lv-header--auth .btn-ghost{line-height:1.5;text-decoration:underline}
.lv-header .logo{display:flex;gap:9px;align-items:center;font-family:inherit;font-weight:800;font-size:32px;font-style:italic;letter-spacing:-.01em;cursor:pointer;user-select:none;color:var(--text,#f4f5fb);text-decoration:none}
.lv-header .logo .c{color:var(--accent2,#00e0c6)}
.lv-header .logo .d{font-weight:800;background:linear-gradient(135deg,var(--accent2,#00e0c6),var(--accent,#6d5efc));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:var(--text,#f4f5fb)}
.lv-header .lv-nav{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
/* line-height and transform are pinned because pages such as Find Jobs set button { font: inherit } and .btn:hover lifts. */
.lv-header .btn{display:inline-flex;align-items:center;gap:8px;border:none;cursor:pointer;font-family:inherit;font-weight:600;line-height:normal;border-radius:10px;transition:all .18s ease;text-decoration:none;transform:none}
.lv-header .btn-primary{background:linear-gradient(135deg,var(--accent,#6d5efc),#8b7cff);color:#fff;padding:16px 32px;font-size:17px;box-shadow:0 8px 24px rgba(109,94,252,.4)}
.lv-header .btn-primary:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(109,94,252,.55)}
.lv-header .btn-ghost{background:transparent;color:var(--text,#f4f5fb);padding:13px 20px;font-size:15px;border:1px solid var(--border2,rgba(255,255,255,.14))}
.lv-header .btn-nav{padding:11px 20px;font-size:15px}
/* The landing's Find jobs link inherits the body line-height (1.5), so it is taller than Mock Interview.
 * Keep that height (45px at 1280, 39px at 390) so the landing stays unchanged. Only the Find jobs link is
 * matched: on static pages Mock Interview is also a link, and it must stay at the landing's button height. */
.lv-header a.btn-nav[href="/job-finder.html"]{line-height:1.5}

.lv-header .user-menu{position:relative;display:inline-flex;align-items:center;z-index:1000}
.lv-header .user-trigger{width:38px;height:38px;border-radius:50%;background:var(--surface2,#1c1f33);border:1px solid var(--border2,rgba(255,255,255,.14));color:var(--text,#f4f5fb);font-weight:700;font-size:15px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .18s ease;padding:0}
.lv-header .user-trigger:hover{border-color:var(--accent,#6d5efc)}
.lv-header .user-menu-panel{position:absolute;right:0;top:calc(100% + 8px);min-width:220px;background:var(--surface,#141627);border:1px solid var(--border2,rgba(255,255,255,.14));border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.5);z-index:1000;padding:6px}
.lv-header .user-menu-head{padding:10px 12px 8px;margin-bottom:4px;border-bottom:1px solid var(--border,rgba(255,255,255,.08))}
.lv-header .user-menu-head .um-email{font-size:13px;color:var(--text,#f4f5fb);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lv-header .user-menu-head .um-credits{font-size:12px;color:var(--text2,#a9adc4);margin-top:3px}
.lv-header .user-menu-item{display:block;width:100%;text-align:left;background:transparent;border:none;cursor:pointer;font-family:inherit;color:var(--text,#f4f5fb);font-size:14px;font-weight:600;padding:9px 12px;border-radius:8px;transition:background .18s ease}
.lv-header .user-menu-item:hover,.lv-header .user-menu-item:focus-visible{background:var(--surface2,#1c1f33)}
.lv-header .user-menu-item:focus-visible{outline:2px solid var(--accent2,#00e0c6);outline-offset:-2px}
.lv-menu-catch{position:fixed;inset:0;z-index:999;background:transparent}
/* Visible credit balance next to the account button. */
.lv-header .lv-credits{display:inline-flex;align-items:center;height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--border2,rgba(255,255,255,.14));background:var(--surface2,#1c1f33);color:var(--text,#f4f5fb);font-size:14px;font-weight:600;line-height:1;white-space:nowrap}
.lv-header .lv-credits[hidden]{display:none}
.lv-header .lv-credits--zero{border-color:rgba(255,138,128,.6);color:#ffb4ab}

@media (max-width:760px){
  .lv-header .lv-inner{flex-wrap:wrap}
  .lv-header .lv-nav{width:100%;justify-content:flex-end}
}
@media (max-width:480px){
  .lv-header .lv-inner{padding:22px 16px}
  .lv-header .logo{font-size:27px}
  .lv-header .lv-nav{justify-content:center;gap:8px}
  .lv-header .btn-nav{padding:9px 16px;font-size:14px}
  .lv-header .btn-ghost{padding:9px 14px;font-size:14px}
  .lv-header .user-menu-panel{min-width:min(220px,calc(100vw - 24px));max-width:calc(100vw - 24px)}
  /* Tighter spacing so Mock Interview, Find jobs, the credits badge and the account button share one row at 390px. */
  /* Scoped to headers showing the badge, so the signed-out header stays unchanged. */
  .lv-header .lv-nav:has(.lv-credits:not([hidden])){gap:6px}
  .lv-header .lv-nav:has(.lv-credits:not([hidden])) .btn-nav{padding:9px 12px}
  .lv-header .lv-nav:has(.lv-credits:not([hidden])) .user-trigger{width:34px;height:34px;font-size:14px}
  .lv-header .lv-credits{height:34px;padding:0 9px;font-size:13px}
}

/* Back control in the page body (not in the header). */
.lv-back{display:inline-flex;align-items:center;gap:6px;margin:0 0 12px;padding:0;background:none;border:0;color:var(--text2,#a9adc4);font:inherit;font-size:14px;font-weight:600;text-decoration:none;cursor:pointer}
.lv-back:hover{color:var(--text,#f4f5fb);text-decoration:underline}
.lv-back:focus-visible{outline:2px solid var(--accent2,#00e0c6);outline-offset:3px}
