.custom-button {
  background: #53a7db;
  color: white;
  border: none;
  padding: 0.5vh 1vh 0.1vh 0.6vh;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  font-family: "Acumin Pro Condensed Medium", sans-serif;
  font-size: 0.9rem;
  @media (max-width: 369px) {
    font-size: 0.6rem;
    padding: 4px 8px 2px 8px;
    white-space: nowrap;
  }
  @media (min-width: 768px) {
    font-size: 1.4rem; /* 25.03636px / 16px base */
  }
}

.search-title-container {
  text-align: left;
  margin-bottom: 40px;
  color: white;
  width: 100%;
  max-width: 1302px;
  margin-top: 20px;
}

.search-title {
  font-family: "Acumin Pro Medium";
  font-size: 1.7rem;
  margin-bottom: 4px;
}

.search-subtitle {
  font-family: "Acumin Pro Medium";
  font-size: 1.5rem;
  opacity: 0.9;
  color: #22a0dc;
  margin-bottom: 1.6vh;
}
.search-bar-container {
  position: relative;
  display: flex;
  align-items: center;
}
.search-bar-input::placeholder {
  color: black;
  font-family: "Acumin Pro Light";
}
.search-bar-input {
  padding-right: 30px !important;
}

.search-bar-button {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-bar-button:hover img {
  opacity: 1;
}
.search-overlay {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 70px);
  background-color: rgba(29, 49, 71, 0.98); /* 98% opacity */
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 76px;
  animation: fadeInOverlay 0.4s ease-out forwards;
  opacity: 0;
}

@keyframes fadeInOverlay {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
.closeButton {
  position: absolute;
  right: 20px;
  top: 20px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  margin-right: 40px;
}
.searchContainer {
  display: flex;
  width: 100%;
  max-width: 1302px;
  gap: 115px;
  align-items: center;
}
.inputWrapper {
  position: relative;
}
.widerInputWrapper {
  position: relative;
  flex: 0.5;
}
.departmentInputContainer {
  position: relative;
  display: flex;
  align-items: center;
  width: 110%;
}
.keywordInputContainer {
  position: relative;
  display: flex;
  align-items: center;
  width: 130%;
}
.keywordTitle {
  text-align: left;
}
.keywordOption:hover .keywordTitle {
  color: #ff0000; /* Red color on hover */
}
.departmentOption:hover {
  color: #ff0000; /* Red color on hover */
}
.verticalLine {
  position: absolute;
  top: 12px;
  height: 26px;
  width: 2px;
  background-color: #53a7db;
}
.searchInputWhite1,
.searchInputWhite2 {
  padding: 10px 30px 4px 0px;
  border: none;
  border-bottom: 1px solid #53a7db;
  width: 100%;
  font-size: 1.2rem;
  background: transparent;
  outline: none;
  color: white;
  position: relative;
}
.searchInputWhite1::placeholder,
.searchInputWhite2::placeholder {
  color: #ffffff;
  font-family: "Acumin Pro Medium";
  font-size: 1.4rem;
  margin-left: 0; /* Remove the margin-left */
  padding-left: 8px; /* Add padding instead for better control */
}

.searchInputWhite1,
.searchInputWhite2 {
  caret-color: #1d97d7;
}
.clearButton {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #53a7db;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
}
.clearButton1 {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #53a7db;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
}
.departmentOptions {
  position: absolute;
  top: calc(100% + 20px);
  left: 0;
  width: 110%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
  /* max-height: 169px; */
   max-height: 60vh;
  padding-top: 10px;
  padding-bottom: 10px;
  overflow-y: auto;
  /* overflow: hidden; */
}
.keywordOptions {
  position: absolute;
  padding-top: 10px;
  top: calc(100% + 20px);
  left: 0;
  width: 160%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10;
  max-height: 60vh;
  overflow: hidden;
  overflow-y: auto;
}
.keywordOptions::-webkit-scrollbar {
  display: none;
}
.scroll-indicator {
  position: sticky;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.9) 75%,
    rgba(255, 255, 255, 0.7) 100%
  );
  padding: 10px 36px;
  text-align: right;
  font-family: "Acumin Pro Medium";
  font-size: 17px;
  color: #1d97d7;
  /* border-top: 1px solid #e0e0e0; */
  z-index: 5;
}
.scroll-indicator-department {
  position: sticky;
  bottom: -9px;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.9) 75%,
    rgba(255, 255, 255, 0.7) 100%
  );
  padding: 10px 36px;
  text-align: right;
  font-family: "Acumin Pro Medium";
  font-size: 17px;
  color: #1d97d7;
  /* border-top: 1px solid #e0e0e0; */
  z-index: 5;
}
.keywordSubtitle {
  font-family: "Acumin Pro Semibold Italic";
  font-size: 15px;
  color: #1d97d7;
  margin-top: 1px;
  display: flex;
  align-items: center; /* Align image and text vertically */
  gap: 6px; /* Space between image and text */
}
.departmentOption {
  padding: 3px 15px;
  color: #1d3147;
  cursor: pointer;
  display: flex;
  font-family: "Acumin Pro Medium";
  font-size: 17px;
}
.keywordOption {
  padding: 8px 0px;
  color: #1d3147;
  cursor: pointer;
  /* display: flex; */
  margin: 0 20px;
  font-family: "Acumin Pro Medium";
  font-size: 17px;
  border-bottom: 1px solid #e0e0e0;
}
/* .keywordSubtitle {
  font-family: "Acumin Pro Italic";
  font-size: 12px;
  color: #1d97d7;
  margin-top: 2px;
  display: flex;
} */
.keywordOption:last-child {
  border-bottom: none;
}
.departmentOption:hover,
.keywordOption:hover {
  /* background-color: #f0f0f0; */
}
.closeButton {
  position: absolute;
  right: 20px;
  top: 20px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
}
.search-bar-container {
  position: relative;
  display: flex;
  align-items: center;
}
.search-bar-input {
  padding-right: 30px !important;
  padding: 5px 10px !important;
  border-radius: 20px !important;
  border: 1px solid #ccc !important;
  width: 140px !important;
  cursor: pointer !important;
  padding-right: 30px !important;
}
.search-bar-button {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-bar-button:hover img {
  opacity: 1;
}
/* Mobile Styles (<= 767px) */
@media (max-width: 767px) {
  .closeButton {
    margin-right: 0px;
  }

  .previewConnector {
    display: none;
  }
  .keywordTitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .custom-button {
    font-size: 0.6rem;
    padding: 4px 8px 2px 8px;
    white-space: nowrap;
  }

  .search-overlay {
    padding-top: 50px;
    height: calc(100vh - 65px);
    margin-top: -4px;
  }
  .search-title-container {
    display: none;
  }
  .searchContainer {
    flex-direction: column;
    gap: 15px;
    width: 95%;
  }
  .keywordOptions {
    width: 100%;
    top: calc(100% + 12px);
    margin-top: 5px;
  }
  .inputWrapper,
  .widerInputWrapper {
    width: 100%;
  }
  .departmentOptions {
    width: 78%;
    top: calc(100% + 12px);
    /* max-height: 149px; */
     max-height: 55vh;
    margin-left: 16px;
    margin-top: 5px;
  }

  .keywordPreviewPanel {
    display: none;
  }
  /* .scroll-indicator {
    display: none;
  } */
  .searchInputWhite1 {
    width: 70%; /* Takes full width of its container */
    font-size: 1.5rem;
    padding: 8px 25px 2px 0px;
    margin-left: 16px;
  }
  .searchInputWhite1::placeholder,
  .searchInputWhite2::placeholder {
    padding-left: 0px;
  }
  .searchInputWhite1 {
    color: #1d97d7 !important;
  }
  /* Keyword input text color */
  .searchInputWhite2 {
    color: #1d97d7 !important;
  }
  .searchInputWhite2 {
    width: 94%; /* 40% wider than searchInputWhite1 */
    font-size: 1.5rem;
    padding: 8px 25px 2px 0px;
    margin-left: 16px;
    margin-right: 16px;
  }
  .departmentOption {
    font-size: 14px;
    padding: 2px 12px;
  }
  .keywordOption {
    font-size: 14px;
    padding: 8px 0px;
    margin: 0 18px;
  }

  .keywordSubtitle {
    font-size: 14px;
  }

  .verticalLine {
    height: 14px;
    top: 12px;
  }
  .clearButton {
    position: absolute;
    right: 30%;
    bottom: 0; /* Position at bottom */
    height: auto; /* Don't take full height */
    padding-bottom: 8px; /* Match input padding */
    color: #53a7db;
    font-size: 1.2rem;
  }
  .clearButton1 {
    position: absolute;
    right: 6%;
    bottom: 0; /* Position at bottom */
    height: auto; /* Don't take full height */
    padding-bottom: 8px; /* Match input padding */
    color: #53a7db;
    font-size: 1.2rem;
  }
  .keywordOptions {
    /* max-height: 405px; */
    max-height: 55vh;
    overflow-y: auto;
  }

  .keywordInputContainer {
    width: 100%;
    margin-top: 20px;
  }
  .search-bar-input {
    width: 100px !important;
  }
  /* .keywordOptions::-webkit-scrollbar {
    display: none;
  } */
  .keywordInputContainer.department-open {
    margin-top: 56vh;
  }
}

/* Tablet Styles (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .custom-button {
    font-size: 1rem;
  }
  .search-title-container {
    display: none;
  }
  .searchContainer {
    flex-direction: row;
    gap: 30px;
    width: 85%;
  }

  .inputWrapper {
    width: 40%;
  }

  .widerInputWrapper {
    width: 60%;
  }

  .search-overlay {
    padding-top: 100px;
  }
  .searchInputWhite1 {
    width: 70%; /* Takes full width of its container */
  }

  .searchInputWhite2 {
    width: 140%; /* 40% wider than searchInputWhite1 */
  }
  .departmentOptions {
    width: 74%;
  }

  /* Adjust container widths */
  .inputWrapper {
    width: 40%; /* Department search container */
  }

  .widerInputWrapper {
    width: 60%; /* Keyword search container */
    overflow: visible; /* Allow keyword options to expand */
  }

  /* Make dropdown match input width */
  .keywordOptions {
    width: 140%; /* Same as input */
    max-height: 300px;
    overflow-y: auto;
  }

  .departmentOptions {
    max-height: 140px;
  }

  .keywordPreviewPanel {
    display: none;
  }
  /* .keywordOptions::-webkit-scrollbar {
    display: none;
  } */
  /* .keywordOptions {
  } */
}
@media (min-width: 1024px) and (max-width: 1600px) {
  .departmentInputContainer {
    width: 105%;
  }
  .keywordInputContainer {
    width: 120%;
  }
  .searchContainer {
    gap: 80px;
  }

  .departmentOptions {
    width: 105%;
  }
  .keywordOptions {
    width: 140%;
    max-height: 45vh;
  }
}
@media (min-width: 1024px) and (max-width: 1400px) {
  .search-title-container {
    width: 80%;
  }
  .searchContainer {
    width: 80%;
  }
}
@media (min-width: 320px) and (max-width: 390px) {
  .search-bar-input {
    width: 90px !important;
  }
}
@media (min-width: 360px) and (max-width: 390px) {
  .search-bar-input {
    width: 85px !important;
    font-size: 10.5px !important ;
  }
}
@media (min-width: 320px) and (max-width: 360px) {
  .search-bar-input {
    width: 78px !important;
    font-size: 10px;
  }
  /* .form-control.search-bar-input::placeholder {
    color: transparent;
  } */
}
/* preview image code */
.keywordPreviewPanel {
  position: absolute;
  top: 50%;
  left: 100%; /* appear to the right */
  transform: translateY(-50%);
  margin-left: 15px;
  display: flex;
  align-items: center;
  z-index: 20;
}

.previewConnector {
  width: 20px;
  height: 2px;
  background-color: #ccc;
  margin-right: 8px;
}

.previewContent {
  background: white;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.previewImage {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.keywordPreviewPanel {
  position: fixed;
  z-index: 1001;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.previewConnector {
  width: 40px;
  height: 4px;
  background-color: white;
  margin-right: 0px;
}

.previewContent {
  background: white;
  padding: 12px;
  border-radius: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 200px;
}

.previewImage {
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 8px;
}

.previewTitle {
  font-family: "Acumin Pro Medium";
  font-size: 14px;
  color: #333;
  text-align: center;
}

/* make a media query for the 1024px to 1350px */

@media screen and (min-width: 1024px) and (max-width: 1400px) {
  
  .departmentOptions {

    max-height: 44vh; 
  }
}
