/* Velxen — shared site header (rendered by header.js on every page) */
.vx-header {
  --vx-bg: rgba(10, 11, 14, 0.92);
  --vx-border: #232835;
  --vx-text: #f2f4f8;
  --vx-muted: #9aa3b2;
  --vx-primary: #f7a600;
  --vx-hover: rgba(255, 255, 255, 0.06);

  position: sticky;
  top: 0;
  z-index: 1000;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  background: var(--vx-bg);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--vx-border);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-sizing: border-box;
}
.vx-header *, .vx-header *::before, .vx-header *::after { box-sizing: border-box; }

.vx-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.vx-brand-mark {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
}
.vx-brand-name {
  color: #F7A600;
  font: 700 21px/1 'Instrument Sans', 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

.vx-nav { display: flex; align-items: stretch; gap: 4px; height: 100%; }
.vx-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--vx-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.vx-link:hover { color: var(--vx-text); }
.vx-link.active { color: var(--vx-text); }
.vx-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--vx-primary);
}
.vx-link .vx-tag {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--vx-primary);
  background: rgba(247, 166, 0, 0.12);
}

.vx-right { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }

.vx-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 200px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--vx-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--vx-muted);
  transition: border-color 0.15s, width 0.2s;
}
.vx-search:focus-within { border-color: var(--vx-primary); width: 240px; }
.vx-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--vx-text);
  font: 500 13px 'Inter', sans-serif;
}
.vx-search input::placeholder { color: #6b7383; }

.vx-auth-slot { display: flex; align-items: center; }
.vx-auth-slot .auth-nav-group { margin: 0; }

.vx-burger {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--vx-border);
  border-radius: 8px;
  background: transparent;
  color: var(--vx-text);
  cursor: pointer;
  place-items: center;
  flex-shrink: 0;
}
.vx-burger:hover { background: var(--vx-hover); }

.vx-drawer {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 8px 16px 16px;
  background: #0a0b0e;
  border-bottom: 1px solid var(--vx-border);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  font-family: 'Inter', sans-serif;
}
.vx-drawer.open { display: block; }
.vx-drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 4px;
  border-bottom: 1px solid var(--vx-border);
  color: #f2f4f8;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.vx-drawer a:last-child { border-bottom: 0; }
.vx-drawer a.active { color: #f7a600; }

@media (max-width: 1100px) {
  .vx-search { display: none; }
}
@media (max-width: 900px) {
  .vx-header { padding: 0 16px; gap: 12px; }
  .vx-nav { display: none; }
  .vx-burger { display: grid; }
}
@media (max-width: 360px) {
  .vx-brand-name { display: none; }
}

/* [hidden] must win over the display rules above (staff-only links) */
.vx-header [hidden], .vx-drawer [hidden] { display: none !important; }

/* Notification bell */
.vx-bell-wrap { position: relative; }
.vx-bell {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--vx-muted); cursor: pointer;
}
.vx-bell:hover, .vx-bell[aria-expanded="true"] { background: var(--vx-hover); color: var(--vx-text); }
.vx-bell-badge {
  position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #f0546a; color: #fff; font: 700 10px/16px 'Inter', sans-serif; text-align: center;
}
.vx-notif-panel {
  position: absolute; right: 0; top: 44px; width: 360px; max-width: calc(100vw - 32px); max-height: 460px;
  display: flex; flex-direction: column; background: #111318; border: 1px solid var(--vx-border);
  border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); overflow: hidden; z-index: 1100;
}
.vx-notif-head {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  border-bottom: 1px solid var(--vx-border); color: var(--vx-text); font-size: 14px; font-weight: 700;
}
.vx-notif-head button { border: 0; background: none; color: var(--vx-primary); font-size: 12px; font-weight: 600; cursor: pointer; }
.vx-notif-list { overflow-y: auto; }
.vx-notif-item {
  display: block; width: 100%; padding: 11px 14px 11px 26px; position: relative; text-align: left;
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); background: none; cursor: pointer; font-family: inherit;
}
.vx-notif-item:hover { background: var(--vx-hover); }
.vx-notif-item.unread::before {
  content: ""; position: absolute; left: 11px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--vx-primary);
}
.vx-notif-title { color: var(--vx-text); font-size: 13px; font-weight: 600; }
.vx-notif-body { color: var(--vx-muted); font-size: 12px; line-height: 1.45; margin-top: 3px; }
.vx-notif-time { color: #6b7383; font-size: 11px; margin-top: 4px; }
.vx-notif-empty { padding: 36px 14px; text-align: center; color: var(--vx-muted); font-size: 13px; }


/* Phone bottom navigation */
.vx-tabbar { display: none; }
@media (max-width: 900px) {
  .vx-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    background: rgba(10, 11, 14, 0.97); border-top: 1px solid #232835; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-family: 'Inter', -apple-system, sans-serif; }
  .vx-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; color: #6b7383; text-decoration: none; font-size: 11px; font-weight: 600; }
  .vx-tabbar a.on { color: #f7a600; }
  .vx-tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  html.has-tabbar body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}


/* hidden means hidden, even when a component sets its own display (profile sign-in card, etc.) */
[hidden] { display: none !important; }

@media (max-width: 900px) {
  /* notifications: a full-width sheet under the header instead of a box that runs off the screen */
  .vx-notif-panel { position: fixed; left: 8px; right: 8px; top: calc(env(safe-area-inset-top, 0px) + 64px); width: auto;
                    max-width: none; max-height: calc(100vh - 150px); }
}
