/* ------------------------ */
/* -------- Header -------- */
/* ------------------------ */
#headerWrapper {
  z-index: 600;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 0 5px darkblue);
}

.headerBG {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3rem;
  background: linear-gradient(#000, #111, #000);
  box-shadow: 0 0 10px #000 inset;
  z-index: -1;
}

#header {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr; /* settings | title | avatar */
  padding: 0 1rem;
  width: 100%;
  justify-content: space-between;
}

/* #header div {
  border: orangered 2px solid;
}
*/

#settings {
  justify-self: start;
}

.title {
  justify-self: center;
  text-align: center;
}

.dropdown {
  display: flex;
  justify-self: start;
  height: 3rem;
  justify-content: center;
  align-items: center;
}

.dropdown-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  left: 1rem;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  min-width: 160px;
  border-radius: 6px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.15);
  z-index: 10;
}

.dropdown-content label {
  display: block;
  margin-bottom: 5px;
}

.dropdown-content select {
  width: 100%;
}

/* Hover to open */
.dropdown:hover .dropdown-content {
  display: block;
}

#avatarDropdown {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 3rem;
  cursor: pointer;
}

#avatarDropdown img {
  background: none;
  border: none;
  height: 2rem;
  border-radius: 50%;
  aspect-ratio: 1/1;
}

#avatarDropdown.logged-out img {
  opacity: 0.6;
}

#avatarDropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  min-width: 160px;
  border-radius: 6px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.15);
  z-index: 10;
}

#avatarDropdown-content label {
  display: block;
  margin-bottom: 5px;
}

#avatarDropdown-content select {
  width: 100%;
}

/* Hover to open */
#avatarDropdown:hover #avatarDropdown-content {
  display: block;
}


#topNavbar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  z-index: 900;
  filter: drop-shadow(0 0 5px darkblue);
}

#navButtonsLeft,
#navButtonsRight {
  display: flex;
  gap: .5rem;
  padding: .5rem 1rem;
  background: linear-gradient(#111, #222, #111);
  border: #111 0 2px 0 2px solid;
}

#navButtonsLeft {
  border-left: #111 2px solid;
  justify-self: end;
}

#navButtonsRight {
  border-right: #111 2px solid;
  justify-self: start;
}

.nav-btn {
  background: linear-gradient(#111, #333, #111);
  color: white;
  border: 1px solid #222;
  padding: 8px 25px;
  border-radius: 2px;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 12px;
  box-shadow: 0 0 1px darkblue;
}

.nav-btn:hover {
  background: linear-gradient(#222, #444, #222);
  border-bottom: 1px solid darkblue;
}

.nav-btn:active {
  background: #555;
}

.title {
  text-align: center;
  color: #fff;
  background: linear-gradient(#111, #222, #111);
  border-radius: 8px;
  border: #111 2px solid;
  padding: 15px 15px;
  text-transform: uppercase;
  text-shadow: 1px 1px 1px black, 0 0 5px blue, 0 0 2px darkblue;
  align-self: center;
  justify-self: center;
  pointer-events: none; /* prevents layout shift from hover */
}

.title h2 {
  margin: 0;
  font-size: 1.2rem;
  background: #00000088;
  padding: .5rem 1rem;
  border-radius: 4px;
  border: #222 1px solid;
  box-shadow: 0 0 5px darkblue;
}

.subTitle h3 {
  margin: 0;
  font-size: .8rem;
  font-weight: normal;
  padding: .4rem;
  border: #111 2px 0px 2px 2px solid;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(#222, #333, #222);
  text-transform: uppercase;
} 

.navContainer {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left | center | right */
  align-items: center;
  width: 100%;
}

#logo {
  background: linear-gradient(#141414, #202020, #141414);
  filter: drop-shadow(0 0 15px darkblue);
  padding: 3px 25px;
  clip-path: polygon(
    0% 0%,     /* top left */
    100% 0%,   /* top right */
    85% 100%,  /* bottom right */
    15% 100%   /* bottom left (flipped) */
  );
}

#logo img{
  height: 80px;
  filter: drop-shadow(0 0 15px darkblue);
}

.logoWrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 40px;
  clip-path: polygon(
    0% 0%,     /* top left */
    100% 0%,   /* top right */
    80% 100%,  /* bottom right */
    20% 100%   /* bottom left (flipped) */
  );
  background: linear-gradient(#101010, #121212, #101010);
  border-radius: 2px;
  filter: drop-shadow(0 0 5px darkblue);
}

.logoWrapperWrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 50px;
  clip-path: polygon(
    0% 0%,     /* top left */
    100% 0%,   /* top right */
    70% 100%,  /* bottom right */
    30% 100%   /* bottom left (flipped) */
  );
  background: linear-gradient(#000, #111, #000);
  filter: drop-shadow(0 0 5px darkblue);
}

.logoContainer {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* ===============================
   User Modal Overlay
================================ */
#userModal {
  display: none;          /* hidden by default */
  position: fixed;        /* stay on top */
  top: 3rem;              /* just below the fixed header */
  right: 1rem;            /* align with avatar */
  z-index: 9999;
}

/* ===============================
   Modal Content Box
================================ */
#userModalContent {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #111;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* ===============================
   User Avatar
================================ */
#userAvatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 10px;
  object-fit: cover;
}

/* ===============================
   User Name
================================ */
#userName {
  color: #fff;
  margin: 0;
}

/* ===============================
   Logout Button
================================ */
#logoutBtn,
#editProfileBtn,
#themeSelectionBtn,
#staffDashboardBtn,
#botDashboardBtn,
#inviteBot {
  padding: 6px 12px;
  cursor: pointer;
  background: #222;
  border: 1px solid #333;
  color: #fff;
  border-radius: 4px;
}

#logoutBtn:hover,
#editProfileBtn:hover,
#themeSelectionBtn:hover,
#staffDashboardBtn:hover,
#botDashboardBtn:hover,
#inviteBot:hover {
  background: #333;
}