.searchOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.98);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.searchOverlay.open {
  opacity: 1;
  pointer-events: auto;
}

.searchContainer {
  width: 80%;
  max-width: 600px;
  position: relative;
  animation: slideDown 0.4s ease forwards;
}

.searchForm {
  width: 100%;
  position: relative;
  margin-bottom: 20px;
}

.searchInput {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: none;
  border-bottom: 2px solid darkblue;
  font-size: 1.2rem;
  background: transparent;
  outline: none;
  color: darkblue;
}

.searchSubmit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: darkblue;
  font-size: 1.2rem;
}

.searchClose {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #444;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.searchClose:hover {
  color: darkblue;
  transform: translateY(-50%) rotate(90deg);
}

.resultsContainer {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 60vh;
  overflow-y: auto;
  animation: fadeIn 0.3s ease forwards;
}

.searchResults {
  list-style: none;
  padding: 0;
  margin: 0;
}

.searchResultItem {
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.searchResultItem:hover {
  background-color: rgba(0, 0, 139, 0.05);
}

.searchResultItem:last-child {
  border-bottom: none;
}

.resultName {
  display: block;
  font-weight: 600;
  color: darkblue;
  margin-bottom: 5px;
}

.resultAliases {
  display: block;
  font-size: 0.85rem;
  color: #666;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Tablet Responsiveness */
@media only screen and (max-width: 1024px) and (min-width: 769px) {
  .searchContainer {
    width: 85%;
  }

  .searchClose {
    right: 10px;
    top: -40px;
  }
}

/* Mobile Responsiveness */
@media only screen and (max-width: 768px) {
  .searchContainer {
    width: 90%;
  }

  .searchClose {
    right: 10px;
    top: -40px;
  }

  .searchOverlay {
    padding-top: 20vh;
  }

  .searchInput {
    font-size: 1rem;
    padding: 12px 40px 12px 15px;
  }
}
