body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #f4f4f4;
  transition: background-color 0.3s, color 0.3s;
}

body[data-theme="dark"] {
  background-color: #333;
  color: #fff;
}

header {
  background-color: #282c34;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home-button {
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 20px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav ul li {
  margin-right: 20px;
}

nav ul li a {
  color: #61dafb;
  text-decoration: none;
  font-size: 1.2em;
}

.mode-toggle {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-left: 10px; /* Optional: Add some space between text and switch */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

main {
  text-align: center;
  margin-top: 50px;
}

.search-bar {
  position: relative;
  display: inline-block;
}

#job-search {
  padding: 10px;
  width: 300px;
  border: 1px solid #ccc;
  border-radius: 5px; /* Rounded corners */
  font-size: 1em;
  border-radius: 10px; /* Add border radius to curve the border */
  background-image: url("https://img.icons8.com/fluency-systems-regular/48/find-matching-job.png"); /* Add the path to your search icon image */
  background-repeat: no-repeat; /* Prevent the icon from repeating */
  background-position: left center; /* Position the icon on the left side */
  background-size: 20px; /* Adjust the size of the icon */
  background-position: 10px 40%; /* Position the icon 10px from the left and vertically centered */
  padding-left: 30px; /* Add some space for the icon */
}

#result-limit {
  margin-left: 10px;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

#search-button {
  background-color: #61dafb;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  margin-left: 10px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
}

#search-button:hover {
  background-color: #21a1f1;
}


#location {
  flex: 1;
  min-width: 150px;
  background-color: #fff;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  margin-top: 10px;
}



/* Default light mode styles */
.suggestions {
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 5px 5px;
  background-color:white; /* Transparent background */
  color: #333; /* Default text color */
  z-index: 1000;
  display: none;
}

.suggestions ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.suggestions ul li {
  padding: 10px;
  cursor: pointer;
}

.suggestions ul li:hover {
  background-color: rgba(0, 0, 0, 0.1); /* Slightly dark background on hover */
}

/* Dark mode styles */
body[data-theme="dark"] .suggestions {
  border: 1px solid #555; /* Adjust border color for dark mode */
  color: #ffffff; /* Text color for dark mode */
  background-color: #000000;
}

body[data-theme="dark"] .suggestions ul li {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly light background on hover for dark mode */
}

footer {
  background-color: #282c34;
  color: #61dafb;
  text-align: center;
  padding: 10px;
  position: fixed;
  bottom: 0;
  width: 100%;
}

footer ul {
  list-style: none;
  padding: 0;
}

footer ul li {
  display: inline;
  margin: 0 10px;
}

footer ul li a {
  color: #61dafb;
  text-decoration: none;
}

footer .social-icons {
  margin-top: 10px;
}

footer .social-icons a {
  margin: 0 10px;
  color: #61dafb;
  text-decoration: none;
  font-size: 1.5em;
}
@media (max-width: 768px) {
  .search-bar {
      width: 100%;
  }

  #job-search {
      width: calc(100% - 50px);
  }

  #result-limit {
      width: 10%;
  }

  #search-button {
      width: 80%;
      margin-top: 10px;
  }
}

@media (max-width: 400px) {
  .search-bar {
      width: 100%;
  }

  #job-search {
      width: calc(100% - 50px);
  }

  #result-limit {
      width: 50%;
  }

  #search-button {
      width: 70%;
      margin-top: 10px;
  }
}


/* Job populate css */


.jobListings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 20px;
  margin: 20px;
  color: #333; /* Default text color */
  background-color: #f4f4f4; /* Default background color */
  border-radius: 8px; /* Rounded corners */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Shadow effect */
}

.job-item {
  margin: 10px;
  padding: 15px;
  border: 1px solid #ccc;
  background-color: #fff; /* Default background color for job items */
  border-radius: 8px; /* Rounded corners */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Light shadow effect */
  text-align: left;
  cursor: pointer; /* Change cursor to pointer on hover */
  transition: background-color 0.3s, box-shadow 0.3s;
}


.job-item:hover {
  background-color: #f0f0f0; /* Light grey background on hover */
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); /* Slightly darker shadow on hover */
}

body[data-theme="dark"] .jobListings {
  background-color: #333; /* Dark background color */
  text-align: left;
}

body[data-theme="dark"] .job-item {
  border: 1px solid #555; /* Darker border color for job items */
  background-color: #444; /* Dark background color for job items */
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1); /* Dark shadow effect */
}

/* Loader styles */
.loader {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  /* Initially hidden */
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
