.nord-user-dropdown {
  position: absolute;
  top: auto; /* Adjust as needed to position vertically */
  right: 5%; /* Adjust as needed to control distance from the right */
  font-family: "Roboto", sans-serif;
}

/* Ball (Avatar) Styling */
/* Updated Hover Effect for Nord Ball */
.nord-user-dropdown .nord-ball {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #20344c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.5s ease, box-shadow 0.5s ease, background-size 0.5s ease;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  background-color: transparent; /* Match the initial transparent background */
}

/* Hover Effect */
.nord-user-dropdown .nord-ball::before {
  content: "";
  position: absolute;
  top: -1;
  left: -1;
  right: 0;
  bottom: 0;
  background-image: url("/static/images/new-menu-nord-icon.png");
  background-size: 120%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0; /* Hidden initially */
  transition: opacity 0.5s ease; /* Smooth fade-in */
  border-radius: 50%; /* Match the ball's shape */
  z-index: 1; /* Ensure it appears above */
}

.nord-user-dropdown .nord-ball .nord-initials {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  display: inline-flex; /* Allows inline layout while supporting alignment */
  align-items: center; /* Vertically aligns the text and icon */
}

.nord-user-dropdown .nord-ball:hover .nord-initials {
  opacity: 0;
  visibility: hidden;
}

.nord-initials i {
  font-size: 1em; /* Adjust icon size to match text size */
  vertical-align: middle; /* Ensures proper alignment with text */
}

/* Ensure pseudo-element changes with hover */
.nord-user-dropdown .nord-ball:hover::before {
  opacity: 1; /* Make background image visible */
}

.nord-user-dropdown .nord-ball:hover {
  color: white; /* Change icon color */
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3); /* Slightly stronger shadow */
}

.nord-user-dropdown .nord-ball::before {
  content: "";
  position: absolute; /* Position it absolutely within the parent */
  top: -1px;
  left: -1px;
  width: 100%;
  height: 100%;
}

.nord-user-dropdown .nord-initials {
  position: relative;
  font-family: "Ubuntu", sans-serif;
  font-size: 19px;
  color: #000000;
  z-index: 1;
  padding: 4px; /* Add some padding to make the border more visible */
  opacity: 1; /* Fully visible */
  visibility: visible; /* Ensure the element is visible */
  transition: opacity 0.5s ease, visibility 0.5s ease; /* Smooth transition */
}

/* Dropdown Content Styling */
.nord-user-dropdown .nord-dropdown-content {
  position: fixed; /* Now positioned relative to the viewport */
  height: 100vh;
  width: 20vw;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #fe8b48, #fbb487);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transform: translateX(-20vw);
  transition: transform 0.3s ease;
}

/* Dropdown Content Styling */
.nord-user-dropdown .nord-dropdown-blurer {
  position: fixed; /* Now positioned relative to the viewport */
  height: 100vh;
  width: 80vw;
  top: 0;
  right: -80vw;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  transform: translateX(80vw);
  transition: transform 0.5s ease;
}

/* Show Dropdown on Hover, including the menu */
.nord-user-dropdown .nord-dropdown-content.expanded {
  transform: translateX(0);
  right: 0vw;
}

/* Show Dropdown on Hover, including the menu */
.nord-user-dropdown .nord-dropdown-blurer.expanded {
  transform: translateX(0);
  left: 20vw;
}

@media (max-width: 768px) {
  .nord-user-dropdown .nord-dropdown-content {
    width: 80vw; /* Use the full width of the screen */
    height: 100vh; /* Full height for a mobile-friendly dropdown */
    top: 0;
    left: 0;
    border-radius: 0; /* Remove border-radius for a cleaner look on mobile */
    transform: translateX(-80vw); /* Adjust animation to match full width */
    transition: transform 0.3s ease;
  }
  .nord-user-dropdown .nord-dropdown-content.expanded {
    transform: translateX(0);
    right: 0vw;
  }
}
/* Dropdown Content Styling */
.nord-user-dropdown .nord-dropdown-content.inverted {
  right: 0;
  transform: translateX(20vw);
  left: auto;
}

/* Dropdown Content Styling */
.nord-user-dropdown .nord-dropdown-blurer.inverted {
  left: -80vw;
  transform: translateX(-80vw);
  right: auto;
}

/* Show Dropdown on Hover, including the menu */
.nord-user-dropdown .nord-dropdown-content.inverted.expanded {
  transform: translateX(0);
}

/* Show Dropdown on Hover, including the menu */
.nord-user-dropdown .nord-dropdown-blurer.inverted.expanded {
  transform: translateX(80vw);
}

@media (max-width: 768px) {
  .nord-user-dropdown .nord-dropdown-content.inverted {
    transform: translateX(80vw); /* Adjust animation to match full width */
  }
  .nord-user-dropdown .nord-dropdown-content.expanded {
    transform: translateX(0w);
  }
}
/* Dropdown Item Styling */
.nord-user-dropdown .nord-dropdown-content span,
.nord-user-dropdown .nord-dropdown-content button {
  padding: 10px 16px;
  font-size: 18px;
  color: #000000;
  text-align: left;
  background: none;
  border: none;
  width: 100%;
  display: block;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.nord-user-dropdown .nord-dropdown-content button:hover {
  background-color: #f1f1f1;
  border-radius: 5px;
}

#dropdown-menu {
  position: absolute; /* Enables positioning relative to the nearest positioned ancestor */
  top: auto;
  font-size: 30px;
  left: 5%; /* Places it at the far right */
  width: auto; /* Adjust width as needed */
  height: auto; /* Adjust height as needed */
  cursor: pointer;
}

#dropdown-menu:hover {
  color: #363434;
}

.alert {
  display: none;
  padding: 15px;
  margin: 10px 0;
  border-radius: 5px;
  font-size: 16px;
  text-align: center;
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(-10%); /* Start off-screen (above) */
  opacity: 0;
  z-index: 1000;
  width: 80%;
  max-width: 500px;
  transition: transform 0.5s ease, opacity 0.5s ease; /* Animate position and opacity */
}

.success {
  background-color: #d4edda; /* Light Green */
  color: #155724;
}

.failure {
  background-color: #f8d7da; /* Light Red */
  color: #721c24;
}

.alert.show {
  transform: translateX(-50%) translateY(50%); /* Move down into view */
  opacity: 1;
}

/* Planning Button */
.planning-button {
  position: absolute;
  top: 20px; /* Align with header */
  left: 5%; /* Adjust as needed for spacing from the left */
  font-size: 16px;
  color: #20344c;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 3px solid #20344c;
  border-radius: 50%;
  background-color: transparent;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover Effect */
.planning-button:hover {
  background-color: #20344c;
  color: white;
}

/* Icon Styling */
.planning-button i {
  font-size: 18px; /* Adjust size for better visual balance */
}

#loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #172438;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1999900000;
  visibility: hidden;
}

.loader {
  width: 50px;
  height: 50px;
  border: 8px solid white;
  border-top: 8px solid transparent;
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}