/* ----------  base theme (tweak these to match your site) ---------- */
:root {
  --sihf-bg          : #ffffff; /* table background */
  --sihf-head-bg     : #0d47a1; /* header bar */
  --sihf-head-color  : #ffffff; /* header text */
  --sihf-row-border  : #e5e7eb; /* divider lines */
  --sihf-row-hover   : #f3f4f6; /* row hover */
  --sihf-font        : system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                       Roboto, "Helvetica Neue", Arial, sans-serif;
  --sihf-radius      : 0.5rem;
}

/* ----------  layout wrappers ---------- */
.sihf-table-wrapper{
  overflow-x: auto;          /* enables horizontal scroll if needed */
  -webkit-overflow-scrolling: touch;
}

.sihf-table{
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sihf-font);
  font-size: 0.875rem;       /* 14 px default */
  background: var(--sihf-bg);
  border-radius: var(--sihf-radius);
}

/* ----------  header row ---------- */
.sihf-table thead{
  background: var(--sihf-head-bg);
  color: var(--sihf-head-color);
}

.sihf-table thead th{
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

/* ----------  body rows ---------- */
.sihf-table tbody td{
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--sihf-row-border);
  text-align: center;
}

.sihf-table tbody tr:last-child td{
  border-bottom: none;
}

.sihf-table tbody tr:hover{
  background: var(--sihf-row-hover);
}

/* left-align the first column (usually the team name) */
.sihf-table thead th:first-child,
.sihf-table tbody td:first-child{
  text-align: left;
}

/* ----------  mobile: collapse into cards under 640 px ---------- */
@media (max-width: 640px){
  .sihf-table thead{
    display: none;           /* hide header bar */
  }

  .sihf-table tbody tr{
    display: block;
    border: 1px solid var(--sihf-row-border);
    border-radius: var(--sihf-radius);
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
  }

  .sihf-table tbody td{
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
    border: none;
  }

  /* show a “label: value” pair (requires data-label attr, see note) */
  .sihf-table tbody td::before{
    content: attr(data-label);
    font-weight: 600;
    text-transform: capitalize;
    color: var(--sihf-head-bg);
  }
}
