/* Global styling */
* {
    font-family: "Merriweather", serif;
  }
  
  /* Body */
  body {
    margin: 0;
    padding: 0;
    background-color: black;
    font-size: 1rem;
    color: white;
  }
  
  /* Heading styles */
  h1 {
    text-align: center;
    font-family: 'Bambi Bold', sans-serif;
    font-weight: 700;
    font-size: 2rem;
  }
  
  /*Section with Information about strikes and mass*/
  .strikes-mass {
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    margin: 10px 20px 0 auto;
    padding: 0px;
  }
  
  .strikes-mass h3,
  .strikes-mass p {
    margin: 0;
  }
  
  /* Search section */
  #meteoriteSearchHeading {
    margin-left: 10%;
    text-align: left;
    font-size: 2rem;
  }
  
  #search-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 1.5rem;
    margin-left: 5%;
    
  }
  
  #search-section * {
    font-size: 1rem;
  }
  
  #met {
    color: white;
    background-color: #5b616b;
    margin-right: 10px;
    font-size: 1rem;
    border-radius: 6px;
    padding: 2px;
  }
  #input {
    border: none;
    padding: 4px;
    position: relative;
    background-color: #5b616b;
    color: white;
    border-radius: 6px;
  }
  
  #dynamicField {
    position: relative;
    padding: 2px;
  }
  #dynamicField > input {
    border-radius: 6px; 
  }

  .error-message {
    display: none;
    color: white;
    margin-bottom: 15px;
  } 

  #error-section {
    margin-left: 5%;
  }
  
  /* Buttons */
  .button {
    background-color: #5b616b;
    font-weight: bold;
    color: white;
    padding: 10px 10px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 18px;
    margin: 20px;
  }
  
  #searchButton {
    margin-right: 2%;
  }
  
  #clearButton {
    position: relative;
    margin-left: 1px;
  }
  
  .button:hover {
    background-color: #d6d7d9;
  }
  
  #meteoritesNotFound {
    display: flex;
    justify-content: center;
  }

  #cursorText {
    float: left;
    margin-left: 5%;
    display: none;
  }
  
  #tableToggle {
    float: right;
    padding: 5px 10px;
    border-radius: 8px;
    margin: 0px 20px 8px; 
  }
  
  
  /* Scrollbar styling to the table container */
  
  .table-container {
    position: relative;
    padding: 0;
    width: 97%;
    max-height: 600px;
    overflow-y: auto;
    margin: 0 auto;
    border-radius: 5px;
  }
  
  /* Scrollbar styling */
  .table-container,
  .autocomplete-results {
    position: relative;
    padding: 0;
    max-height: 600px;
    overflow-y: auto;
    margin: 0 auto;
    scrollbar-width: thin;
    scrollbar-color: #5b616b #aeb0b5;
    border-radius: 5px;
  }

  .autocomplete-results {
    width: 100%;
  }
  
  .table-container {
    width: 97%;
  }
  
  /* For Chrome, Edge, and Safari */
  .table-container::-webkit-scrollbar,
  .autocomplete-results::-webkit-scrollbar {
    position: absolute;
    right: 0;
    top: 0;
    width: 15px;
    border-radius: 5px;
  }
  
  .table-container::-webkit-scrollbar-thumb,
  .autocomplete-results::-webkit-scrollbar-thumb {
    background-color: #aeb0b5;
    border-radius: 5px;
  }
  
  .table-container::-webkit-scrollbar-thumb:hover,
  .autocomplete-results::-webkit-scrollbar-thumb:hover {
    background-color: #5b616b;
    border-radius: 5px;
  }
  
  .table-container::-webkit-scrollbar-track,
  .autocomplete-results::-webkit-scrollbar-track {
    background-color: #5b616b;
    border-radius: 5px;
  }
  
  
  /* Table styling */
  table {
    margin: 0 auto;
    border-collapse: collapse;
    border: 1px solid #ddd;
    width: 100%;
    background-color: white;
    color: black;
  }
  
  th {
    width: 25%;
    border: 1px solid black;
    background-color: #15418c;
    text-align: left;
    color: white;
    padding: 2px;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  th:hover {
    background-color: #1a3666;
  }

  tr:hover {
    background-color: #ddd;
  }

  #arrows {
    float: right;
    color: rgba(255, 255, 255, 0.733);
  }
  
  td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
  }
  /* Histograms */
  .display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-block-end: 5%;
    gap: 3%;
  }
  
  .histogram {
    margin-top: 2%;
    width: 47%;
    max-height: 600vh;
    display: inline-block;
    vertical-align: top;
  }
  
  /*Footer*/
  footer {
    height: 40px;
    width: 100%;
    flex-shrink: 0;
    text-align: center;
    padding: 10px 0;
  }
  
  
  /*Autocomplete*/
  .autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2;
    background-color: #5b616b;
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    border-radius:6px;
  }
  
  .autocomplete-result:hover {
    background-color: #aeb0b5;
  }
  
  
  
  
  #filters {
    display: flex;
    flex-wrap: wrap;
  
    margin-left: 20px;
  }
  
  #filters > * {
    margin-right: 10px;
    
  }
  
  #filters > *:last-child {
    margin-right: 0;
    
  }
  
  
  
  /*Styling for smaller Screens*/
  @media (max-width: 768px) {
    #search-section {
      flex-direction: column;
      align-items: center;
      margin-left: 0;
    }
  
    
    #dynamicField,
    #buttons-container,
    #filters,
    #input {
      margin-top: 10px;
    }
  
    #met {
      margin-left: 10px;
      padding: 2px;
    }
  
    #meteoriteSearchHeading {
      margin-left: 0;
      text-align: center;
      font-size: 20px;
    }
  
    .summary-metrics {
      margin-right: 0;
    }
  
    .button {
      font-size: 12px;
      padding: 5px 10px;
      margin: 5px 2px;
    }
  
    #buttons-container {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
    }
  
    #searchButton {
      margin: 5% 0 3%;
    }
  
    #clearButton {
      margin-left: 0;
    }
  
    #filters {
      display: flex;
      flex-direction: column;
      margin-left: 0;
     
      }
      #filters > * {
        margin-bottom: 7px;
        margin-top: 7px; 
      }
      
     
  
    .histogram {
      width: 100%;
      margin-left: 0;
    }
    table {
      width: 100%;
      font-size: 14px;
    }
    td {
      padding: 3px;
    }
    .histogram {
      margin-top: 10%;
      max-height: 500px;
    }
  
    .display-container {
      flex-direction: column;
    }
  }
