.bcl-list {
  /* Avoid unnecessary horizontal scrollbars. */
  overflow-x: visible;
  max-width: 100%;
}

.bcl-table {
  width: 100%;
  border-collapse: collapse;
  max-width: 100%;
  table-layout: fixed;
}

/* Column widths: give certs most space, keep identity fields compact */
.bcl-table th:nth-child(1),
.bcl-table td:nth-child(1){ width:16%; }

.bcl-table th:nth-child(2),
.bcl-table td:nth-child(2){ width:14%; white-space:nowrap; }

.bcl-table th:nth-child(3),
.bcl-table td:nth-child(3){ width:24%; }

.bcl-table th:nth-child(4),
.bcl-table td:nth-child(4){ width:8%; white-space:nowrap; }

.bcl-table th:nth-child(5),
.bcl-table td:nth-child(5){ width:38%; vertical-align:top; }

/* Let email wrap; avoid forcing wrap everywhere */
.bcl-table td.bcl-email { overflow-wrap:anywhere; word-break:break-word; }
.bcl-table td.bcl-certs { overflow-wrap:normal; word-break:normal; }

.bcl-table tbody tr:nth-child(odd) {
  background: var(--bcl-row-odd, #f2f2f2);
}

.bcl-table tbody tr:nth-child(even) {
  background: var(--bcl-row-even, #f9f9f9);
}

.bcl-table th,
.bcl-table td {
  text-align: left;
  padding: 10px 12px;
  border: 0;
  vertical-align: middle;
  box-sizing: border-box;
  overflow-wrap: normal;
  word-break: normal;
}

.bcl-table thead th {
  background: transparent;
  font-weight: 700;
  position: relative;
  user-select: none;
}

.bcl-table thead th.bcl-sortable {
  cursor: pointer;
  padding-right: 22px;
}

.bcl-table thead th.bcl-sortable::after {
  content: '⇅';
  position: absolute;
  right: 8px;
  opacity: 0.45;
}

.bcl-table thead th.bcl-sorted-asc::after {
  content: '▲';
  opacity: 0.75;
}

.bcl-table thead th.bcl-sorted-desc::after {
  content: '▼';
  opacity: 0.75;
}

.bcl-name {
  font-weight: 600;
}

.bcl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 0;
  margin: 2px 6px 2px 0;
  font-size: 0.9em;
  line-height: 1.4;
  background: transparent;
  white-space: nowrap;
}

/* Intentionally no special styling for expired certs in frontend. */


/* Phone/email columns */
.bcl-table td.bcl-phone,
.bcl-table td.bcl-email { white-space: normal; }
.bcl-table td.bcl-phone { white-space: nowrap; }
.bcl-table td.bcl-email a { text-decoration: none; }

@media (max-width: 782px) {
  .bcl-table th,
  .bcl-table td {
    padding: 8px 10px;
  }
}

.bcl-badge{position:relative; display:inline-block;}
.bcl-badge .bcl-tip{
  position:absolute;
  left:50%;
  top:-10px;
  transform:translate(-50%,-100%);
  background:#111;
  color:#fff;
  padding:8px 10px;
  border-radius:6px;
  font-size:14px;
  line-height:1.2;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:opacity .05s ease;
  z-index:9999;
}
.bcl-badge:hover .bcl-tip{opacity:1;}
.bcl-badge .bcl-tip:after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-6px;
  transform:translateX(-50%);
  border-width:6px 6px 0 6px;
  border-style:solid;
  border-color:#111 transparent transparent transparent;
}
