/** Base Navbar Styles */

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #003366;
  color: white;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.navbar-logo {
  display: flex;
  align-items: center;
  margin-right: auto;
  margin-left: 0;
}

.navbar-logo-img {
  height: 52px;
  width: 190px;
  padding-right: 24px;
  object-fit: contain;
  display: block;
}

.navbar-toggle {
  background: #003366;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: none;
}

.navbar-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.navbar-icon-link {
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-height: 58px;
  min-width: 78px;
  text-align: center;
}

.navbar-icon {
  display: block;
  flex: 0 0 auto;
}

.navbar-label {
  display: block;
  font-size: 0.82rem;
  line-height: 1.1;
}

.navbar-links a,
.dropdown a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.navbar-links a:hover,
.dropdown a:hover {
  background-color: #0d3a75;
}

.staff-nav-link {
  display: none !important;
}

.manager-nav-link {
  display: none !important;
}

.tenant-nav-link {
  display: none !important;
}

.staff-nav-link.is-visible,
.manager-nav-link.is-visible,
.tenant-nav-link.is-visible {
  display: inline-flex !important;
}

.quick-access {
  position: relative;
}

.quick-access:hover .dropdown {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #003366;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

.dropdown {
  display: none;
  flex-direction: column;
}

/* Overlay Styles */
.navbar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 99;
}

.overlay.show,
#navbarOverlay.show {
  display: block;
}

/* Hide hamburger toggle on desktop and show links */
@media (min-width: 769px) {
  .navbar-toggle {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
  }

  .navbar-links {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-evenly !important;
    align-items: center;
    gap: 10px;
    position: static !important;
    height: auto !important;
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100%;
  }

  .navbar-links a img {
    width: 36px;
    height: 36px;
    margin-bottom: 0;
  }
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .navbar-logo-img {
    height: 44px;
    width: 160px;
    padding-right: 0;
  }

  .navbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
  }

  .navbar-links {
    flex-direction: column;
    background-color: #0b2e59;
    width: 150px;
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    height: 100%;
    display: none;
    padding: 60px 20px 20px 20px;
    z-index: 1050;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  }

  .navbar-links.show {
    display: flex;
  }

  .navbar-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .navbar-links a img {
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
  }

  .quick-access:hover .dropdown {
    position: static;
    display: flex;
    padding-left: 10px;
  }
}
