:root {
  --primary-color: rgb(20, 99, 32);
  --secondary-color: rgb(160, 229, 162);
  --tertiary-color: rgb(8, 228, 15);
  --light-brown: rgb(250, 213, 165);
  --dark-brown: rgb(167, 85, 3);
  --normal-brown: rgb(252, 156, 30);
  --inactive-color: rgb(200, 200, 200);
  --font-family: "Arial", sans-serif;
  --font-size: 20px;
  --loader-size: 60px;
  --account-logo-size: 36px;
  --loader-border-width: 6px;
  --loader-speed: 1.2s;
  --background-transparent: rgba(0, 0, 0, 0.5);
}

#nav_link {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: large;
}
#nav_link :hover {
  color: var(--tertiary-color);
}
#nav_link :active {
  color: var(--inactive-color);
}
#nav_user,
#nav_link {
  color: var(--secondary-color);
}

/*` Loader Styles */
.loader {
  border: var(--loader-border-width) solid var(--tertiary-color); /* The light grey track */
  border-top: var(--loader-border-width) solid var(--primary-color); /* The blue part that spins */
  border-radius: 50%; /* Makes it a circle */
  width: var(--loader-size);
  height: var(--loader-size);
  animation: spin var(--loader-speed) linear infinite; /* Applies the animation */
  /* Center the loader on the page (optional, adjust as needed) */
  position: fixed;
  top: calc((100vh - var(--loader-size)) / 2);
  left: calc((100vw - var(--loader-size)) / 2);
  transform: translate(-50%, -50%);
  z-index: 10000;
}
#loading {
  display: none;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: var(
    --background-transparent
  ); /* Semi-transparent background */
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Ensure it's on top of other content */
}
/* Keyframe animation for the spin effect */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#small_profile_picture {
  height: calc(35px-2.5px);
  width: 28px;
  border-radius: 50%;
  margin: calc(5px / 2);
  padding: 0;
}
#account_img {
  height: var(--account-logo-size);
  width: var(--account-logo-size);
  margin: 5px;
  border-radius: 50%;
  padding: 0;
  background-color: var(--secondary-color);
}
#account_img:hover {
  background-color: var(--tertiary-color);
}
#nav_user:hover {
  color: var(--tertiary-color);
}

/*left side bar*/
.sidebar {
  position: fixed;
  margin-top: 40px;
  right: 0;
  top: 0;
  background: var(--secondary-color);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(100%); /* Hidden initially */
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
  padding: 20px;
  border-radius: 10px;
}
.sidebar.active {
  transform: translateX(0); /* Slides in */
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  overflow: scroll;
  background: var(--background-transparent);
  display: none;
  z-index: 999;
}
.overlay.active {
  display: block;
}
/* Basic Menu Styling */
.user-info {
  text-align: center;
  margin-bottom: 30px;
}
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}
.menu-links {
  list-style: none;
  padding: 0;
}
.menu-links li {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.menu-links a:hover {
  color: var(--primary-color);
}
.menu-links a {
  text-decoration: none;
  color: #222;
  display: block;
}
.logout {
  color: #d9534f !important;
  font-weight: bold;
}
.closeBtn {
  background-color: red;
  color: var(--tertiary-color);
  border-radius: 50%;
}

/*account overlay*/
.content-container {
  display: none;
  height: calc(100vh - 40px);
  left: 0;
  top: 0;
  margin: auto;
  width: 100vw;
  position: fixed;
  background-color: var(--background-transparent);
  border-radius: 10px;
}
/* Hide all sections by default */
.account-section {
  display: none;
  background-color: var(--secondary-color);
  padding: 10px;
  border-radius: 10px;
  box-sizing: border-box;
  animation: fadeIn 0.5s ease;
  width: 90vw;
}
.account-section-out {
  display: none;
  background-color: var(--secondary-color);
  padding: 10px;
  border-radius: 10px;
  box-sizing: border-box;
  animation: fadeOut 0.5s ease;
  width: 90vw;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100px);
  }
}
/* Show only the active section */
.account-section.active {
  display: block;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.form-group input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.save-btn {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
}
#overlay_accounts {
  display: none;
}
