/* ================================
   search.css — Internal Search Modal Styles
   Matches visual style of Contact/About modals
================================ */

/* --------------------------------
   1. Modal Overlay — darkens background
-------------------------------- */
#searchModal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* semi-transparent dark */
  display: none;                        /* hidden by default */
  align-items: center;                  /* vertical centering */
  justify-content: center;              /* horizontal centering */
}

/* --------------------------------
   2. Modal Box — white popup container
-------------------------------- */
#searchModal .modal-content {
  background: #fff;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  position: relative;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  color: #111;
  z-index: 3001;               /* above the overlay */
}

/* --------------------------------
   3. Close Button “×”
-------------------------------- */
#searchModal .modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #333;
}

/* --------------------------------
   4. Search Input Field
-------------------------------- */
#searchModal input[type="text"] {
  width: 100%;
  padding: 10px;
  margin: 15px 0;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
}

/* --------------------------------
   5. Submit Button
-------------------------------- */
#searchModal button[type="submit"] {
  background-color: #0d1a26;
  color: #fff;
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* --------------------------------
   6. Search Results Container
-------------------------------- */
#searchModal .search-results {
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 1.5rem;
  line-height: 1.5;
}

/* Remove default bullet list */
#searchModal .search-results ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#searchModal .search-results li {
  margin-bottom: 10px;
}

/* --------------------------------
   7. Link Styles
-------------------------------- */
#searchModal .search-results a:link {
  color: #003366; /* dark blue */
  text-decoration: none;
}

#searchModal .search-results a:visited {
  color: #990000; /* dark red */
}

#searchModal .search-results a:hover {
  color: red;
  text-decoration: underline;
}

/* --------------------------------
   8. Highlighted Matches
-------------------------------- */
#searchModal mark {
  background: yellow;
  font-weight: bold;
}

/* --------------------------------
   9. Headings
-------------------------------- */
#searchModal h2 {
  font-size: 1.8rem;
  color: #0d1a26;
  margin-top: 0;
  margin-bottom: 10px;
}

#searchModal h1,
#searchModal .search-results h2 {
  font-size: 1.4rem;
  color: #003366;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* --------------------------------
   10. Query Label (e.g. "Query: ...")
-------------------------------- */
#searchModal .search-results p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 15px;
}

/* --------------------------------
   11. Mobile Responsiveness
-------------------------------- */
@media (max-width: 768px) {
  #searchModal .modal-content {
    width: 95%;
    padding: 20px;
    font-size: 0.95rem;
  }

  /* DO NOT override display here — JS already sets display:flex */
  /* #searchModal {
       display: flex !important; 
     } */
}

.search-results .snippet {
  font-size: 0.875rem; /* or try 0.8rem or 12px */
  color: #444;
  margin-top: 0.25em;
}

/* Ensure the footer’s “Search” link always receives taps on mobile */
#search-link {
  position: relative;
  z-index: 9999;        /* higher than any dropdown or nav layers */
  pointer-events: auto; /* ensure it’s not blocked */
}


