/* Forum top bar: navigation + login dropdown.
   New class names on purpose: the legacy #top-bar/.loginBox/.bt-login rules and the
   toggle handlers in global.js do not touch these. */
.forum-nav {
  position: sticky;
  top: 0;
  /* the legacy forum body is wider than a phone screen: keep the bar the width of the
     screen (and pinned left) so the login button never ends up off-screen */
  left: 0;
  width: 100vw;
  max-width: 100%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 0 16px;
  box-sizing: border-box;
  background: linear-gradient(to bottom, #2b3437, #171d1f);
  border-bottom: 1px solid #5d6664;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  font-family: Arial, Helvetica, sans-serif;
}

.forum-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.forum-nav__links a {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 12px;
  box-sizing: border-box;
  color: #e8ecec;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.forum-nav__links a i {
  width: 14px;
  text-align: center;
  color: #c9a227;
  font-size: 13px;
}

.forum-nav__links a:hover,
.forum-nav__links a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-bottom-color: #c9a227;
  outline: none;
}

.forum-nav__side {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.forum-nav__welcome {
  color: #e8ecec;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
}

.forum-nav__logout {
  margin: 0;
}

/* login dropdown */
.forum-login {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  padding: 16px;
  box-sizing: border-box;
  border: 1px solid #5d6664;
  border-radius: 8px;
  background: #f4f4f1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  color: #222;
}

.forum-login[hidden] {
  display: none;
}

.forum-login__title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: bold;
  color: #222c2e;
}

.forum-login__field {
  margin: 0 0 12px;
}

.forum-login__field label {
  display: block;
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #555;
}

.forum-login__field input {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid #b4b9bd;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.forum-login__field input:focus {
  outline: none;
  border-color: #1f6f6a;
  box-shadow: 0 0 0 3px rgba(31, 111, 106, 0.28);
}

.forum-login__links {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 0;
  font-size: 12px;
}

.forum-login__links a {
  color: #185fa5;
  text-decoration: none;
}

.forum-login__links a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .forum-nav {
    flex-wrap: wrap;
    padding: 0 8px;
  }

  .forum-nav__links {
    flex-wrap: wrap;
  }

  .forum-nav__links a {
    height: 40px;
    padding: 0 8px;
  }

  .forum-nav__links a span {
    display: none;
  }
}
