.bhsu-grads {
  max-width: 100%;
  color: inherit;
}

.bhsu-grads .bhsu-grads-search {
  padding: 1rem;
  margin: 1rem 0;
  background: #f1f6f2;
  border-radius: 4px;
}

.bhsu-grads label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.bhsu-grads input[type="search"] {
  font: inherit;
  width: min(100%, 30rem);
  padding: 0.6rem;
  border: 2px solid #697d72;
  border-radius: 4px;
}

.bhsu-grads :focus-visible {
  outline: 3px solid #d89b00;
  outline-offset: 2px;
}

.bhsu-grads .bhsu-grads-table-wrap {
  overflow-x: auto;
}

.bhsu-grads table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.bhsu-grads caption {
  text-align: left;
  font-weight: 700;
  padding: 0.6rem 0;
}

.bhsu-grads th {
  background: #075c3b;
  color: #fff;
  text-align: left;
}

.bhsu-grads th,
.bhsu-grads td {
  border: 1px solid #c6d2cb;
  padding: 0.5rem 0.65rem;
  vertical-align: top;
}

.bhsu-grads tbody tr:nth-child(even) {
  background: #f5f8f6;
}

.bhsu-grads tr[hidden] {
  display: none !important;
}

/* =========================================================
   Mobile Card Layout (768px and below)
   ========================================================= */
@media screen and (max-width: 768px) {
  .bhsu-grads .bhsu-grads-table-wrap {
    overflow-x: visible;
  }

  .bhsu-grads table,
  .bhsu-grads caption,
  .bhsu-grads tbody,
  .bhsu-grads tr,
  .bhsu-grads td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  /* Visually hide table headers while keeping them accessible to screen readers */
  .bhsu-grads thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* Style each row as a card */
  .bhsu-grads tbody tr {
    background: #fff;
    border: 1px solid #c6d2cb;
    border-top: 4px solid #075c3b;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  .bhsu-grads tbody tr:nth-child(even) {
    background: #fff;
  }

  .bhsu-grads td {
    border: none;
    padding: 0.25rem 0;
  }

  /* 1. Honors Badge */
  .bhsu-grads td:nth-child(1) {
    display: inline-block;
    width: auto;
    background: #f1f6f2;
    color: #075c3b;
    border: 1px solid #c6d2cb;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    margin-bottom: 0.45rem;
  }

  /* Hide Honors cell completely if empty */
  .bhsu-grads td:nth-child(1):empty,
  .bhsu-grads td:nth-child(1).is-empty {
    display: none;
  }

  /* 2. Student Name (Card Title) */
  .bhsu-grads td:nth-child(2) {
    font-size: 1.15rem;
    font-weight: 700;
    color: #075c3b;
    padding-bottom: 0.5rem;
    margin-bottom: 0.45rem;
    border-bottom: 1px solid #e2e8e4;
  }

  /* 3. Degree */
  .bhsu-grads td:nth-child(3)::before {
    content: "Degree: ";
    font-weight: 700;
    color: #333;
  }

  /* 4. Major(s) */
  .bhsu-grads td:nth-child(4)::before {
    content: "Major(s): ";
    font-weight: 700;
    color: #333;
  }

  /* 5 & 6. Combine Hometown and State/Country onto a single line */
  .bhsu-grads td:nth-child(5),
  .bhsu-grads td:nth-child(6) {
    display: inline;
  }

  .bhsu-grads td:nth-child(5)::before {
    content: "Hometown: ";
    font-weight: 700;
    color: #333;
  }

  .bhsu-grads td:nth-child(5)::after {
    content: ", ";
  }
}

@media print {
  .bhsu-grads-search {
    display: none;
  }
  .bhsu-grads .bhsu-grads-table-wrap {
    overflow: visible;
  }
  .bhsu-grads table {
    min-width: 0;
  }
}
