/* holypuzzle.com navbar (templates/holypuzzle/fragments.html :: navbar), loaded by fragments.html :: head.
   Uses the --panel/--line/--text/--muted/--accent tokens each page's own stylesheet defines. */

/* google-auth.js toggles these; jigsawfun pages don't load Bootstrap */
.d-none { display: none !important; }
.d-flex { display: flex !important; }

.jf-nav {
  position: sticky; top: 0; z-index: 100;
  align-self: stretch;
  margin: 0 -16px 24px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.jf-nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, #f59e0b, #ea580c 40%, #db2777 70%, #0d9488);
  opacity: .85;
}
.jf-nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  padding: 10px 16px; min-height: 64px;
}
.jf-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 20px; letter-spacing: -0.02em;
}
.jf-brand svg { width: 34px; height: 34px; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.jf-brand:hover svg { transform: rotate(-12deg) scale(1.08); }
.jf-brand span b {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.jf-links { display: flex; gap: 4px; }
.jf-links a {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
  transition: background .15s, color .15s;
}
.jf-links a svg { width: 16px; height: 16px; }
.jf-links a:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.jf-links a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.jf-auth { margin-left: auto; display: flex; align-items: center; gap: 10px; min-height: 40px; }
#signed-in-info { align-items: center; gap: 10px; }
#profile-picture {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent);
}
#profile-name { font-weight: 600; font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sign-out {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
}
#sign-out:hover { color: var(--accent); border-color: var(--accent); }
#jf-share {
  display: flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
}
#jf-share svg { width: 15px; height: 15px; }
#jf-share:hover, #jf-share.copied { color: var(--accent); border-color: var(--accent); }
/* The language switcher: a link to this page in the other language */
.jf-lang {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
.jf-lang svg { width: 15px; height: 15px; }
.jf-lang:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 640px) {
  .jf-nav-inner { padding: 8px 16px; }
  .jf-links { order: 3; width: 100%; justify-content: center; }
  .jf-links a { flex: 1; justify-content: center; padding: 7px 6px; font-size: 13px; white-space: nowrap; }
  #profile-name { display: none; }
}
/* The narrowest phones can't fit four links (with a SUPER_ADMIN's Admin) with their icons */
@media (max-width: 380px) {
  .jf-links a svg { display: none; }
  #jf-share, .jf-lang { padding: 6px 10px; }
  .jf-lang svg { display: none; }
  #jf-share:not(.copied) span { display: none; } /* icon only, beside the sign-in button */
}
