/** Search box and dropdown */
.search-container {
    position: relative; /* Ensure the container can position elements relative to it */
    margin: 50px auto;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    width: 100%;
    max-width: 600px; /* Limit the width of the search box */    
  }
  
  /* Search input styling */
  .search-input {
    width: 100%; /* Ensure the input takes full width of its container */
    padding: 15px 20px;
    font-size: 18px;
    border: 1px solid #ddd;
    border-bottom: none; /* Remove bottom border to connect with the dropdown */
    border-radius: 0; /* Remove rounded corners */
    outline: none;
    transition: box-shadow 0.3s, border-color 0.3s;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  /* Highlight on focus */
  .search-input:focus {
    border-color: #4285f4;
    box-shadow: 0px 2px 8px rgba(66, 133, 244, 0.4);
  }
  
  /* Dropdown container */
  .search-dropdown {
    width: 100%; /* Ensure the dropdown matches the width of the search box */
    max-height: 300px; /* Limit height with scrolling if necessary */
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default */
    position: absolute; /* Positioned relative to the parent */
    top: 100%; /* Dropdown starts at the bottom of the search box */
    left: 0; /* Align dropdown with the search box */
    z-index: 1000;
    text-align: left;
  }
  
  /* Unordered list styling */
  .search-dropdown ul {
    list-style: none; /* Remove bullet points */
    margin: 0;
    padding: 0;
  }
  
  /* List item styling */
  .search-dropdown ul li {
    padding: 10px 20px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  /* Remove border for the last item */
  .search-dropdown ul li:last-child {
    border-bottom: none;
  }
  
  /* Highlight on hover */
  .search-dropdown ul li:hover {
    background-color: #f8f9fa;
  }
  
  /* Symbol styling */
  .search-dropdown ul li strong {
    font-weight: bold;
    color: #333;
  }
  
  /* Company name styling */
  .search-dropdown ul li span {
    font-weight: normal;
    color: #333;
  }
  
  /* Mobile and Tablet Overrides */
  @media screen and (max-width: 768px) {
    .search-input {
        background-color: #fff !important;
        color: #333 !important;
    }
    .search-input::placeholder {
        color: #555 !important;
    }
  }
  
  /* Loading spinner */
  .htmx-indicator {
      display: none;
      position: absolute;
      top: 50%;
      right: 10px;
      width: 20px;
      height: 20px;
      border: 3px solid #ccc;
      border-top: 3px solid #4285f4;
      border-radius: 50%;
      animation: spin 1s linear infinite;
  }
  
  .htmx-indicator.htmx-request {
      display: inline-block;
  }
  
  /* Style the clickable links */
  .search-result-link {
      text-decoration: none;
      color: inherit;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 20px;
      border-bottom: 1px solid #f1f1f1;
      cursor: pointer;
  }
  
  .search-result-link:hover {
      background-color: #f8f9fa;
      color: #007bff;
  }
  
  .search-result-link:last-child {
      border-bottom: none;
  }
  
  @keyframes spin {
      from {
          transform: rotate(0deg);
      }
      to {
          transform: rotate(360deg);
      }
  }