/* General Table Styles */
table {
  width: 85%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hidden {
  display: none;
}

th,
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

th {
  background-color: #6F9937;
  color: white;
  font-weight: bold;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

tbody tr:hover {
  background-color: #f0f0f0;
}

thead th:first-child {
  text-align: center;
}

/* Sticky Header */
thead {
  position: sticky;
  top: 0;
  z-index: 2000;
}

/* Adjust Table Header for Sticky */
.table-header {
  display: none;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 2;
  font-weight: bold;
}

.table-header.sticky-header {
  display: block; /* Show the sticky header on medium and large screens */
}

/* Header Row Styles */
.header-row {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.header-row > div {
  flex: 1;
  text-align: center;
}

.header-row > div:first-child {
  flex: 0.5;
}

/* Table Information Section */
.table-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

tbody td:first-child {
  font-weight: bold;
}

/* Media Queries for Responsiveness */
@media screen and (max-width: 1024px) {
  .header-row {
    flex-direction: column;
    text-align: center;
  }

  .header-row > div {
    flex: none;
    width: 100%;
    padding: 10px;
  }

  th, td {
    padding: 8px;
  }

  /* Table layout adjustments for medium screens */
  table {
    width: 100%;
    font-size: 14px;
  }

  /* Adjust sticky header on smaller screens */
  .table-header.sticky-header {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  /* Stack the table content vertically for mobile */
  th, td {
    display: block;
    width: 100%;
    padding: 8px 10px;
  }

  th {
    background-color: #6F9937;
    color: white;
  }

  td {
    background-color: #f9f9f9;
    margin-bottom: 5px;
  }

  .header-row {
    display: block;
  }

  .table-info {
    display: block;
    padding: 10px;
  }

  /* Hide the sticky table header on very small screens */
  .table-header.sticky-header {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  /* On very small screens, reduce font size and improve spacing */
  th, td {
    padding: 6px;
    font-size: 12px;
  }

  /* Adjust the header row for mobile devices */
  .header-row > div {
    padding: 5px;
  }

  table {
    font-size: 12px;
  }
}
