/* Member nav — PlayVault dark topbar (game_tgn_0042) */

.g42-nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 30;
}

/* display:flex above overrides the HTML hidden attribute — keep JS hook node invisible */
.g42-nav-user[hidden],
.nav-user[hidden] {
  display: none !important;
}

.g42-nav-user--masthead {
  display: flex;
}

.g42-nav-link--signin,
.g42-nav-user-row {
  display: none;
}

@media (min-width: 900px) {
  .g42-nav-user--masthead {
    display: none;
  }

  .g42-nav-link--signin {
    display: inline-block;
    margin-left: auto;
  }

  .g42-nav-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
}

.g42-nav-user-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--g42-electric, #6366f1);
  background: var(--g42-electric, #6366f1);
  border-radius: var(--g42-radius, 10px);
  transition: filter 0.18s ease;
}

.g42-nav-user-link:hover {
  color: #fff;
  filter: brightness(1.08);
}

.g42-nav-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.g42-nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--g42-electric, #6366f1) center / cover no-repeat;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  line-height: 1;
  text-decoration: none;
  border: 1px solid var(--g42-line, rgba(148, 163, 184, 0.22));
}

.g42-nav-user-avatar:hover {
  border-color: var(--g42-signal, #7dd3fc);
}

.g42-nav-user-avatar.has-img,
.g42-nav-user-avatar img {
  background: transparent;
}

.g42-nav-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.g42-nav-user-name {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
  color: #f1f5f9;
  text-decoration: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.g42-nav-user-name:hover {
  color: #fff;
}

.g42-nav-user-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: auto;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 650;
  color: #cbd5e1;
  text-decoration: none;
  border: 1px solid var(--g42-border-mid, rgba(148, 163, 184, 0.38));
  background: transparent;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.g42-nav-user-logout:hover {
  color: #fff;
  border-color: var(--g42-electric, #6366f1);
  background: var(--g42-accent-soft, rgba(99, 102, 241, 0.22));
}

.g42-mobile-bar .g42-mob-account {
  flex: 0 0 auto;
  min-width: 56px;
  flex-direction: column;
  gap: 2px;
  padding: 4px 6px;
}

.g42-mob-account-label {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

@media (max-width: 899px) {
  .g42-nav-user-row .g42-nav-user-name {
    display: none;
  }

  .g42-nav-user-link span.g42-nav-user-label {
    display: none;
  }

  .g42-nav-user-link {
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
    padding: 0 8px;
  }

  .g42-nav-user-info {
    gap: 4px;
  }

  .g42-nav-user-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
}

@media (min-width: 900px) {
  .g42-mobile-bar .g42-mob-account {
    display: none !important;
  }
}

/* Mobile header: avatar dropdown (profile + sign out) */
@media (max-width: 899px) {
  .g42-nav-user-info { position: relative; }
  .g42-nav-user-dropdown { position: relative; }
  .g42-nav-user-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    border-radius: 50%;
  }
  .g42-nav-user-toggle:focus-visible {
    outline: 2px solid var(--g42-electric, #6366f1);
    outline-offset: 2px;
  }
  .g42-nav-user--masthead .g42-nav-user-toggle .g42-nav-user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.8125rem;
  }
  .g42-nav-user-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 300;
    min-width: 152px;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--g42-line, rgba(148, 163, 184, 0.22));
    background: var(--g42-panel, #121826);
    color: #f1f5f9;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
  .g42-nav-user-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    color: #f1f5f9;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    box-sizing: border-box;
  }
  .g42-nav-user-menu-item:hover {
    color: #fff;
    background: var(--g42-accent-soft, rgba(99, 102, 241, 0.22));
  }
  .g42-nav-user-menu-item--logout {
    color: #cbd5e1;
  }
}
