.top-nav {
  background-color: #eae6dd;
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 1000;
}

.nav-menu {
  list-style-type: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.nav-menu>li {
  display: inline-block;
  position: relative;
}

.nav-menu li a {
  display: block;
  color: #808080;
  text-align: center;
  padding: 8px 16px;
  text-decoration: none;
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #eae6dd;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  left: 0;
  top: 100%;
  text-align: left;
}

.dropdown-menu li {
  display: block;
}

.dropdown-menu li a {
  padding: 12px 16px;
  display: block;
}

/* Hover effects */
.dropdown:hover .dropdown-menu {
  display: block;
}

.nav-menu li a:hover,
.dropdown-menu li a:hover {
  background-color: #fbc24b !important;
    color: #ffffff !important;
}

/* Mobile styles */
@media screen and (max-width: 870px) {
  /* Base mobile styling */
  .nav-menu {
    display: flex !important; /* Force display */
    flex-wrap: wrap;
    align-items: center;
    padding: 2px 10px;
  }
  
  /* Hide all menu items except for those with mobile-visible class */
  .nav-menu > li:not(.mobile-visible) {
    display: none !important; /* Override any other display properties */
  }
  
  /* Show mobile-visible items */
  .nav-menu > li.mobile-visible {
    display: inline-flex !important; /* Force display */
  }
  
  /* Positioning: logo on left, user on right */
  .nav-menu > li.mobile-visible:first-child {
    margin-right: auto; /* Push to left */
  }
  
  .nav-menu > li.mobile-visible:last-child {
    margin-left: auto; /* Push to right */
  }
  
  /* Ensure toggleLogout function works properly in mobile view */
  .login-status.active .logout-popup {
    display: block;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1001;
  }
  
  /* Style adjustments for mobile */
  .top-nav {
    padding: 5px 0;
  }
}
@media screen and (max-width: 870px) {
  /* Other mobile styles remain the same */

  /* Fix for logout popup positioning on mobile */
  .login-status .logout-popup {
    right: 0;
    /* Align to the right edge of the button */
    left: auto;
    /* Override any left positioning */
    width: 280px;
    /* Slightly smaller for mobile */
    max-width: 90vw;
    /* Never wider than 90% of viewport */
    position: absolute;

    /* Additional positioning adjustments */
    margin-top: 5px;
    /* Small gap from button */
    transform: translateX(0);
    /* Override any transform that might be centering it */
  }

  /* If the button is too close to the right edge */
  .nav-menu>li.mobile-visible:last-child .login-status .logout-popup {
    right: 0;
    left: auto;
    transform: translateX(-30%);
    /* Pull it slightly to the left */
  }

  /* Internal layout adjustments */
  .logout-popup .org-info-container,
  .logout-popup .language-preferences {
    padding: 10px;
    /* Smaller padding */
  }

  /* Make form elements slightly more compact on mobile */
  .custom-select-wrapper {
    margin-bottom: 10px;
  }

  .form-group {
    margin-bottom: 10px;
  }
}
.login-status {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #fbc24b;    
    border-radius: 24px;
    transition: all 0.2s ease;
    margin-top: 7px; /* Adjust this value to move it down */
    vertical-align: middle;
}

/* The hover styles remain the same */
.login-status:hover {
    background-color: #eea94d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* You might also need to adjust the parent li element */
.nav-menu > li:last-child {
    vertical-align: middle;
    padding-bottom: 2px; /* This helps align with other nav items */
}
.login-status .icon {
  width: 22px;
  height: 22px;
  transition: opacity 0.2s ease;
}

.login-status:hover .icon {
  opacity: 0.8;
}

.org-name {
  font-size: 14px;
  color: #4a4540;
  font-weight: 500;
  transition: color 0.2s ease;
  margin-right: 4px;
}

.login-status:hover .org-name {
  color: #ffffff;
}
.logout-popup {
  width: 320px;
  padding: 18px;
  background: #fff;
  border-radius: 22px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(251, 194, 75, 0.3) !important;
  animation: popup-fade-in 0.3s ease !important;
}

@keyframes popup-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.logout-link {
  margin: 30px;
}
/* Improve organization section */
.org-info {
  padding: 10px !important;
  margin-bottom: 10px;
  background-color: #eae6dd;
  border-radius: 8px;
  font-weight: 500 !important;
}

/* Enhanced form groups */
.language-preferences {
  border-top: 1px solid #eee;
  padding-top: 15px;
  margin-top: 10px;
  margin-bottom: 15px;
}

.language-preferences .form-group {
  margin-bottom: 18px;
}

.language-preferences label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
  font-weight: 500;
}

.language-preferences select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
  font-size: 14px;
}

.update-button {
  background-color: #fbc24b;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  margin-top: 5px;
}

.update-button:hover {
  background-color: #eea94d;
}

/* Make sure the logout link still looks good */
.logout-popup a {
  display: block;
  padding: 8px 0;
  text-align: center;
  color: #666;
  text-decoration: none;
  border-top: 1px solid #eee;
  font-size: 14px;
}

.logout-popup a:hover {
  color: #333;
}

/* Make the select dropdown look better on focus */
.language-preferences select:focus {
  outline: none;
  border-color: #4B8BF4;
  box-shadow: 0 0 0 2px rgba(75, 139, 244, 0.2);
}

/* Ensure text inside options is visible */
.language-preferences option {
  background-color: white;
  color: #333;
}

/* Show popup when parent has active class */
.login-status.active .logout-popup {
    display: block;
}
.update-button.success {
  background-color: #4CAF50;
}
.custom-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 15px;
}

.select-flag-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.select-flag {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.flag-select {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.level-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
}

.level-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #eea94d;
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.empty-level {
  background-color: #ccc;
}

.update-button {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #f0c14b;
  border: none;
  border-radius: 4px;
  color: #111;
  font-weight: 500;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
}

.update-button:hover {
  background-color: #ddb347;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}
.org-info-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Centering content */
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-family: Arial, sans-serif;
}

.org-name-info {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.user-name {
  font-size: 16px;
  color: #666;
  margin-top: 5px;
}
.expiry-date {
  font-size: 16px;
  color: #666;
  margin-top: 5px;
}
.nav-flag {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* Add vertical alignment to nav items */
.nav-menu>li {
  vertical-align: middle;
}

/* Ensure consistent height for all nav items */
.nav-menu>li:not(.dropdown) {
  line-height: 40px;
  /* Match the height of other nav items */
}

/* Specific styling for indicator items */
.nav-indicator {
  vertical-align: middle;
  margin-left: 8px;
  line-height: normal;
  display: inline-flex; /* Change to inline-flex for better alignment */
  align-items: center; /* Center items vertically */
  height: 40px; /* Match the nav height */
}

/* Container for indicators */
.nav-indicator > div {
  display: flex;
  align-items: center;
  justify-content: center; /* Center horizontally too */
}
/* Level indicator specific adjustments */
.nav-indicator .level-indicator {
  height: 35px; /* Match the split flag container height */
}
/* Make sure both indicators have the same vertical position */
.split-flag-container,
.nav-indicator .level-indicator .nav-level {
  vertical-align: middle;
  margin: 0; /* Remove any accidental margins */
}
/* Ensure images don't create extra space */
.nav-flag {
  vertical-align: middle;
  display: inline-block;
}
.split-flag-container {
  position: relative;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Full-sized flags */
.split-flag-native {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

.split-flag-learning {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  z-index: 2;
}

/* Simple white line */
.split-flag-divider {
  position: absolute;
  width: 150%;
  height: 3px;
  background-color: #ffffff;
  top: 50%;
  left: -25%;
  transform: rotate(-45deg);
  transform-origin: center;
  z-index: 3;
}

.nav-indicator .level-indicator .nav-level {
  /* Keep existing properties */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 35px !important;
  height: 35px !important;
  min-width: 35px !important;
  min-height: 35px !important;
  max-width: 35px !important;
  max-height: 35px !important;
  border-radius: 50% !important;
  background: #eea94d;
  color: white;
  text-align: center;
  font-weight: bold;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-sizing: border-box !important;
  line-height: normal;
}
/* Base tooltip styles - modified for downward display */
.tooltip-container {
  position: relative;
}

.tooltip-container::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%; /* Changed from bottom: 100% */
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px; /* Add some spacing from the element */
  padding: 5px 10px;
  background-color: rgba(51, 51, 51, 0.9);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1010;
  pointer-events: none;
  
}

.tooltip-container::before {
  content: "";
  position: absolute;
  top: 100%; /* Changed from bottom: 100% */
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: rgba(51, 51, 51, 0.9); /* Changed from border-top-color */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1010;
  margin-top: 0px; /* Adjust for arrow position */
}

.tooltip-container:hover::after,
.tooltip-container:hover::before {
  opacity: 1;
  visibility: visible;
}
/* Make sure all nav items align perfectly */
.nav-menu > li {
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  height: 45px;
}

/* Consistent styling for indicator items */
.nav-indicator {
  vertical-align: middle;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  height: 40px;
  position: relative; /* Added for stable positioning */
}

/* Connected flags container */
.connected-flags {
  display: flex;
  align-items: center;
  height: 35px; /* Fixed height */
  position: relative; /* Added for stable positioning */
  margin: 0; /* Remove any margins */
}

/* Fix flag circles */
.flag-circle {
  width: 35px; /* Fixed the typo from 35x to 35px */
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0; /* Prevent shrinking */
  position: relative; /* Added for stable positioning */
}

.flag-circle.native {
  z-index: 2;
}

.flag-circle.learning {
  margin-left: -15px;
  z-index: 1;
}

.flag-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* Added for stable positioning */
}

/* Make level indicator consistent with flags */
.nav-indicator .level-indicator {
  height: 35px;
  position: relative; /* Added for stable positioning */
}

.nav-indicator .level-indicator .nav-level {
  width: 35px !important;
  height: 35px !important;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
    .language-switcher-section {
      margin-top: 15px;
      border-top: 1px solid #eee;
      padding-top: 15px;
    }
  
    .language-switch-form {
      margin: 0;
      padding: 0;
    }
  
    .language-switcher .language-option {
      display: flex;
      align-items: center;
      width: 100%;
      text-align: left;
      background: none;
      border: none;
      padding: 8px;
      margin-bottom: 5px;
      border-radius: 5px;
      cursor: pointer;
      transition: background-color 0.2s;
    }
  
    .language-switcher .language-option:hover {
      background-color: #d0cbc5;
    }
  
    .language-switcher .language-option.active {
      background-color: #f7f4ee;
      border-left: 3px solid #f0c14b;
    }
  
    .language-flag {
      width: 30px;
      height: 30px;
      margin-right: 10px;
      border-radius: 50%;
      overflow: hidden;
    }
  
    .language-flag img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  
    .language-details {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }
  
    .level-indicator.mini {
      font-size: 12px;
      background-color: #f0f0f0;
      padding: 2px 6px;
      border-radius: 3px;
      margin-top: 2px;
    }