/* -------------------------
    NavBar
   -------------------------*/

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 900; /* stay visible while scrolling, keep it above content */
  background: linear-gradient(135deg, #73af7e, #14410b);
  min-height: var(--navbar-height);
  display: flex;
  padding: 10px 30px;
  flex-wrap: nowrap !important;
  flex: 0 0 auto; /* Don't grow or shrink */
}

.navbar-section {
  display: flex;
  align-items: center;
  flex-wrap: nowrap !important;
}

.navbar-actions {
  flex: 1 1 0;
  justify-content: flex-end;
  display: flex;
  gap: 1rem;
}

.navbar-logo {
  flex: 1 1 0;
}
.nav-toggle {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 1.5rem;
  margin-left: auto;
  cursor: pointer;
}

.btn-toggle {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0.5em 1em;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item div {
  width: 66%;
  float: center;
}

/* height of your navbar so content isn’t hidden behind the bar */
.navbar a {
  font-size: 16px;
  color: #fff;
  padding: 14px 20px;
  text-decoration: none;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

h2,
a:hover {
  color: var(--nl-green-dark);
}

.nav-links a {
  margin-right: 15px;
  text-decoration: none;
  color: #f9f9f9;
}

.navbar-links {
  flex: 2 1 0;
  justify-content: center;
  display: flex;
  gap: 2rem;
  flex-wrap: nowrap !important;
  margin-left: 1rem; /* Add left margin to prevent overlap */
}

.navbar-links,
.dropdown-content {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*NavBar resources*/
.navbar a:hover,
.dropdown:hover .dropbtn {
  background-color: transparent;
  transition: all 0.3s ease;
  color: black;
  text-shadow: 0 0 16px 4px #aef38e, 0 0 40px 8px #33cc66;
}

/* Navbar links on mouse-over */
.dropdown {
  position: relative;
}

/* 1️⃣  Start collapsed */
.navbar .dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  max-height: 0;
  min-width: 130px;
  background-color: #f9f9f9;
  box-shadow: 0 8px 16px 0px rgba(0, 0, 0, 0.2);
  transition: max-height 0.35s ease-in-out;
  z-index: 1;
  opacity: 0.5;
  background: linear-gradient(135deg, #73af7e, #14410b);
  display: none; /* Show on hover/focus with JS or CSS */
}

.navbar .dropdown-content a {
  color: #fff !important;
  padding: 12px 16px; /* Add padding for better click area */
  display: block;
  text-decoration: none;
}

.navbar .dropdown-content a:hover {
  background-color: var(--nl-green-light) !important;
}

/* 2️⃣  Expand smoothly on hover/focus-within (no display swap) */
.navbar .dropdown:hover .dropdown-content,
.navbar .dropdown:focus-within .dropdown-content {
  max-height: 25rem; /* big enough for menu items */
  opacity: 1;
  display: block;
}

.NutraLabelLogo {
  font-family: ITCErasStd-Bold;
  justify-content: left;
  margin: auto;
  flex-shrink: 0;
}
/* -------------------------
     Modal
   -------------------------*/

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}

.modal[style*="display: block"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* Centered white box */
.modal-content {
  background-color: #fff;
  padding: 2em 2em 2em 2em;
  border: 2px solid var(--nl-green-dark, #14410b);
  border-radius: 10px;
  color: var(--nl-green-dark, #14410b);
  width: 100%;
  max-width: 500px;
  padding: 2em 2em 2em 2em;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(20, 65, 11, 0.3); /* Dark green shadow */
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.close-button {
  font-size: 24px;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 16px;
  color: var(--nl-green-dark, #14410b);
  background: none;
  border: none;
  z-index: 10;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-button:hover {
  color: var(--nl-green-light, #73af7e);
  transform: scale(1.1);
}

.password-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid var(--nl-green-dark, #14410b); /* Add border to wrapper */
  border-radius: 6px; /* Match other inputs */
  overflow: hidden;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  width: 100%;
  padding: 0.75em 3.5em 0.75em 0.75em; /* More space on right for eye toggle */
  border: none !important; /* Remove border since wrapper has it */
  background: transparent !important;
  margin: 0 !important;
  outline: none !important;
}

/* Form input styling with dark green theme - EXCLUDE password inputs in wrappers */
.modal-content input[type="text"]:not(.password-wrapper input),
.modal-content input[type="email"]:not(.password-wrapper input),
.modal-content input[type="tel"]:not(.password-wrapper input) {
  border: 2px solid var(--nl-green-dark, #14410b) !important;
  border-radius: 6px;
  padding: 0.75em 3em 0.75em 0.75em; /* Extra right padding for autofill icons */
  font-size: 1em;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white !important;
}

/* For inputs NOT in password wrapper, give them full styling */
.modal-content input[type="text"]:not(.password-wrapper input),
.modal-content input[type="email"]:not(.password-wrapper input),
.modal-content input[type="tel"]:not(.password-wrapper input) {
  border: 2px solid var(--nl-green-dark, #14410b) !important;
  border-radius: 6px;
  padding: 0.75em 3em 0.75em 0.75em;
}

.modal-content input[type="text"]:focus:not(.password-wrapper input),
.modal-content input[type="email"]:focus:not(.password-wrapper input),
.modal-content input[type="tel"]:focus:not(.password-wrapper input) {
  outline: none;
  border-color: var(--nl-green-light, #73af7e) !important;
  box-shadow: 0 0 0 3px rgba(115, 175, 126, 0.2);
}

/* Password toggle eye button - Keep greyscale */
.toggle-eye {
  position: absolute;
  right: 0.75em;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.3em;
  color: #666 !important; /* Keep greyscale */
  cursor: pointer;
  z-index: 10;
  padding: 0.25em;
  line-height: 1;
  transition: color 0.2s ease;
  min-width: 2em; /* Ensure enough space */
  text-align: center;
  filter: grayscale(100%);
}

.toggle-eye:hover {
  color: #888 !important; /* Slightly darker grey on hover */
  background-color: rgba(0, 0, 0, 0.05); /* Very subtle grey background */
  border-radius: 4px;
}

.toggle-eye:focus {
  outline: 2px solid #ccc !important; /* Grey outline instead of green */
  outline-offset: 2px;
  border-radius: 4px;
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.forgot-link {
  font-size: 0.95em;
  color: #014d0b;
  text-decoration: underline;
  margin-left: 1em;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 1em;
}

.captcha {
  display: inline-block;
  border: 2px solid #014d0b;
  border-radius: 8px;
  padding: 8px 16px;
  background: #f6f6f6;
  color: #014d0b;
  font-weight: bold;
  /*margin-left: 0.5em;*/
  min-width: 70px;
  text-align: center;
  width: 100%;
  margin-bottom: 1em;
  margin: auto;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: 100%;
  max-width: 400px;
  margin-bottom: 1em;
}

.login-row {
  display: flex;
  align-items: center;
  gap: 1em;
  /*  margin-bottom: 0.5em;
  justify-content: space-between;*/
}

.login-row input {
  flex: 1 1 0;
  width: 100%;
  padding: 0.4em 0.6em;
  font-size: 1em;
  border-radius: 6px;
  border: 1.5px solid #014d0b;
}

.login-row:last-child {
  justify-content: center;
}

.forgot-container {
  background: #fff;
  max-width: 400px;
  margin: 4em auto;
  padding: 2em 2.5em 2.5em 2.5em;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(20, 65, 11, 0.15); /* Dark green shadow */
  border: 2px solid var(--nl-green-dark, #14410b); /* Dark green border */
  text-align: center;
}

.forgot-container h2 {
  margin-bottom: 1.5em;
  color: var(--nl-green-dark, #14410b); /* Dark green heading */
}

label {
  display: block;
  margin-bottom: 0.5em;
  color: var(--nl-green-dark, #14410b) !important;
  font-weight: 600;
  text-align: left;
}

/* Modal-specific label styling */
.modal-content label {
  color: var(--nl-green-dark, #14410b) !important;
  background: transparent !important;
  font-weight: 600;
}

/* Remember me styling */
.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.remember-row label {
  color: var(--nl-green-dark, #14410b) !important; /* Dark green theme */
  font-weight: 500;
  margin-bottom: 0;
}

.remember-row input[type="checkbox"] {
  accent-color: var(--nl-green-dark, #14410b); /* Dark green checkbox */
  margin-right: 0.5em;
}

input[type="email"] {
  width: 100%;
  padding: 0.75em;
  margin-bottom: 1.5em;
  border: 1.5px solid #014d0b;
  border-radius: 6px;
  font-size: 1em;
}

/* Button styling for modals */
.modal-content .btn {
  background: linear-gradient(
    150deg,
    var(--nl-green-dark, #14410b) 0%,
    var(--nl-green-light, #73af7e) 100%
  ) !important;
  color: white !important;
  border: 2px solid var(--nl-green-dark, #14410b) !important;
  transition: all 0.3s ease;
}

.modal-content .btn:hover {
  background: var(--nl-green-dark, #14410b) !important;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 4px #97e4a5, 0 0 10px #238a45;
}

/* Forgot link styling */
.forgot-link {
  color: var(--nl-green-dark, #14410b) !important;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: var(--nl-green-light, #73af7e) !important;
}

#forgotMessage {
  margin-top: 1em;
  color: #014d0b;
  font-weight: 500;
}

.back-link {
  display: block;
  margin-top: 1.5em;
  color: #014d0b;
  text-decoration: underline;
  font-size: 0.95em;
}

/* Captcha styling */
.captcha {
  border: 2px solid var(--nl-green-dark, #14410b) !important;
  background: #f6f6f6;
  color: var(--nl-green-dark, #14410b) !important;
  font-weight: bold;
}

.password-wrapper:focus-within {
  border-color: var(--nl-green-light, #73af7e) !important;
  box-shadow: 0 0 0 3px rgba(115, 175, 126, 0.2);
}

/* NAVBAR COLUMN ALIGNMENT */
.navbar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  flex-wrap: nowrap !important;
  padding: 10px 0 !important; /* Remove horizontal padding for alignment */
}

.navbar-section {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

/* Navigation Links - CENTER COLUMN */
.navbar-links {
  flex: 1 1 auto !important;
  display: flex !important;
  justify-content: center !important;
  gap: 2rem !important;
  margin: 0 20px !important; /* Equal margin on both sides */
  order: 2 !important;
}

/* Navbar Actions - RIGHT COLUMN */
.navbar-actions {
  flex: 0 0 auto !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 1rem !important;
  min-width: 100px !important;
  padding-right: 10px !important; /* Align with logo padding */
  order: 3 !important;
}