/* Final Optimized Theme CSS — Fully Fixed */

/* Base Body */
body {
  margin: 0;
  padding: 0;
  font-family: 'Press Start 2P', sans-serif;
  background-color: #1b1b1b;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.6;
  padding-bottom: 4rem;
  overflow-x: hidden;
}

/* Navbar Container */
.navbar-custom {
  background-color: #343a40 !important;
  border-bottom: 2px solid #FFD700;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: nowrap;
}

/* Logo */
.navbar-custom .navbar-brand {
  flex-shrink: 0;
  margin-right: 1rem;
}
.navbar-custom .navbar-brand img {
  max-width: 100px;
  height: auto;
}

/* Custom Navbar Layout */
#custom-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
  width: 100%;
  gap: 0.4rem;
}

/* Nav Groups */
#custom-navbar .nav-left,
#custom-navbar .nav-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 1;
}
#custom-navbar .nav-right {
  margin-left: auto;
  justify-content: flex-end;
}

/* Buttons */
#custom-navbar .btn,
#custom-navbar .dropdown .btn,
.navbar-custom .btn-outline-light {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid #fff;
  color: #fff !important;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 6px;
  line-height: 1;
  height: 2.2rem;
  white-space: nowrap;
  flex-shrink: 1;
  transition: all 0.2s ease-in-out;
}
#custom-navbar .btn:hover {
  background-color: #fff;
  color: #343a40 !important;
}

/* Welcome Text — Expanded max-width for full role display */
.navbar-custom .navbar-text {
  font-size: 0.7rem;
  color: #fff;
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  flex-shrink: 1;
}
.navbar-custom .navbar-text strong {
  color: #fff !important;
}

/* Notification Bell */
.notification-bell {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  margin-right: 0.3rem;
  position: relative;
  z-index: 1060;
}

/* Fixed Notification Dropdown Alignment + Width */
#custom-navbar .dropdown-menu-end {
  left: auto !important;
  right: 0 !important;
  transform: translateX(-5%);
  min-width: 380px;
  max-width: 480px;
  padding: 0.6rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  background-color: #1f1f1f;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  z-index: 1055;
}

/* Notification Item Styling */
#custom-navbar .dropdown-menu-end .dropdown-item {
  display: block;
  width: 100%;
  background-color: #2a2a2a;
  color: #fff;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  border: 1px solid #333;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

/* Small Timestamp */
#custom-navbar .dropdown-menu-end .dropdown-item small {
  display: block;
  font-size: 0.7rem;
  color: #aaa;
  margin-top: 0.3rem;
}

/* Notification Button */
#custom-navbar .dropdown-menu-end .btn-notification {
  margin-top: 0.5rem;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  display: inline-block;
  background-color: #FFD700 !important;
  color: black !important;
  font-weight: bold;
  border: 2px solid black;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: inset 0 0 3px black;
  font-family: 'Press Start 2P', sans-serif;
  text-align: center;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  height: auto;
}

.site-footer {
  text-align: center;
  padding: 1rem;
  background-color: #222;
  color: #ccc;
  font-size: 0.8rem;
  border-top: 1px solid #444;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 1000;
}

.footer-nav a {
  color: #ccc;
  text-decoration: none;
  margin: 0 0.5rem;
  font-size: 0.8rem;
}
.footer-nav a:hover {
  text-decoration: underline;
  color: #fff;
}
.footer-nav span {
  color: #888;
}
.footer-copy {
  margin-top: 0.5rem;
}

/* Font override — Cleaned */
#custom-navbar,
footer.site-footer,
.navbar-text,
.navbar-text strong {
  font-family: 'Press Start 2P', cursive, sans-serif !important;
}
#custom-navbar .navbar-text,
#custom-navbar .btn-outline-light,
#custom-navbar .text-light {
  color: #fff;
}

/* Responsive Fixes */
@media (max-width: 992px) {
  .navbar-custom {
    flex-direction: column;
    align-items: center;
  }

  #custom-navbar {
    flex-direction: column;
    align-items: center;
  }

  #custom-navbar .nav-left,
  #custom-navbar .nav-right {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
  }

  #custom-navbar .navbar-brand {
    margin: 0 auto 1rem auto;
  }

  #custom-navbar .btn,
  #custom-navbar .dropdown .btn {
    font-size: 1rem;
    padding: 0.25rem 0.4rem;
  }

  .navbar-custom .navbar-text {
    font-size: 1rem;
    max-width: 100%;
    text-align: center;
  }
}

@media screen and (max-width: 1400px) and (min-resolution: 1.5dppx) {
  body {
    font-size: 0.68rem;
  }

  #custom-navbar .btn,
  #custom-navbar .dropdown .btn,
  .navbar-custom .btn-outline-light {
    font-size: 0.65rem;
    height: 1.6rem;
    padding: 0.1rem 0.25rem;
  }

  .navbar-custom .navbar-text {
    font-size: 0.6rem;
    max-width: 120px;
  }

  .notification-bell {
    font-size: 1.1rem;
  }

  .dropdown-menu-dark {
    font-size: 0.65rem;
  }

  .dropdown-menu-dark .dropdown-item {
    padding: 4px 7px;
  }

  .site-footer,
  .footer-nav a {
    font-size: 0.65rem;
  }
}
