summary {
  margin-bottom: 1rem;
}
summary h2 {
  display: inline;
  text-decoration: underline;
}


/* Main Search Container */
.search-container {
  position: relative; /* Essential for positioning the icon and results */
  margin-bottom: 1rem;
}

/* Search Icon Style */
.search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  stroke: #888; /* Icon color */
  z-index: 1;
}

/* Search Input Box Style */
#search-input {
  width: 100%;
  padding: 10px 15px 10px 40px; /* Add left padding for the icon */
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 25px; /* Rounded corners */
  box-sizing: border-box; /* Ensures padding doesn't affect width */
  transition: all 0.2s ease-in-out;
}

#search-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); /* Highlight on focus */
}

/* Search Results List Style */
#search-results {
  list-style: none;
  margin: 5px 0 0;
  padding: 0;
  width: 100%;
  background-color: white;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: absolute; /* Make it a dropdown */
  top: 100%;
  left: 0;
  z-index: 1000;
  max-height: 400px; /* Limit height and add scroll if needed */
  overflow-y: auto;
}

/* Hide when empty */
#search-results:empty {
  display: none;
}

/* Individual Result Item Style */
#search-results li a {
  display: block;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}
#search-results li:last-child a {
  border-bottom: none;
}

#search-results li a:hover {
  background-color: #f5f5f5;
  color: #000;
}

/* Utility class to hide labels visually but keep for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Style for the "No results" message */
#search-results .no-results {
  padding: 12px 15px;
  color: #888; /* Grayed-out text */
  text-align: center;
  font-style: italic;
}

/* Style for the content snippet in search results */
.search-result-snippet {
  font-size: 0.85em; /* Smaller font size */
  color: #666;      /* Lighter text color */
  display: block;    /* Ensures it appears on its own line */
  line-height: 1.4;
  padding: 1rem 1rem 0 1rem;
}

/* Style for highlighted text in search results */
.search-result-snippet mark {
  background-color: #ffde73; /* A pleasant yellow */
  color: #333;
  font-weight: bold;
  padding: 1px 2px;
  border-radius: 3px;
}