﻿/* Table */
.resource-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.resource-table th,
.resource-table td {
  border: 1px solid rgba(127, 127, 127, 0.35);
  padding: 0.625rem 0.75rem;
  vertical-align: top;
}
.resource-table th {
  text-align: left;
  background: rgba(127, 127, 127, 0.15);
  font-weight: 600;
}

/* Sticky header */
.resource-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(127, 127, 127, 0.15);
  /* subtle divider when stuck */
  box-shadow: 0 1px 0 rgba(127, 127, 127, 0.35);
}

/* Zebra striping */
.resource-table tbody tr:nth-child(odd) {
  background: rgba(127, 127, 127, 0.08);
}

/* Text handling */
.resource-table td,
.resource-table th {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Multi-line clamp for long text containers */
.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Links */
.resource-table a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.resource-table a:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 720px) {
  .page-title {
    font-size: 1.25rem;
  }
  .resource-table th,
  .resource-table td {
    padding: 0.5rem;
  }

  /* Responsive table -> cards */
  .resource-table {
    border: 0;
  }
  .resource-table thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  .resource-table tr {
    display: block;
    margin: 0 0 0.75rem 0;
    border: 1px solid rgba(127, 127, 127, 0.35);
    border-radius: 6px;
  }
  .resource-table td {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 0.5rem;
    border: 0;
    border-top: 1px solid rgba(127, 127, 127, 0.2);
  }
  .resource-table tbody tr:nth-child(odd) {
    background: transparent;
  }
  .resource-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: rgba(0, 0, 0, 0.7);
  }
  .clamp {
    -webkit-line-clamp: 5;
  }
}
