/* Link Depository page styles. Colours and type come from ungcmyb-brand.css. */

body {
  margin: 0;
  background: var(--col-bg);
  color: var(--col-text-2);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--lh-base);
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.topbar-img { height: 30px; width: auto; }
.intro { margin: 0 0 var(--sp-6); color: var(--col-text-3); }

.tabs { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-bottom: var(--sp-4); border-bottom: 1px solid var(--col-border); }
.tab {
  font: inherit; font-weight: var(--w-medium); color: var(--col-text-3); cursor: pointer;
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: var(--sp-2) var(--sp-3); margin-bottom: -1px;
}
.tab:hover { color: var(--col-teal-dark); }
.tab:focus-visible { outline: 2px solid var(--col-teal); outline-offset: -2px; }
.tab[aria-pressed="true"] { color: var(--col-teal-dark); border-bottom-color: var(--col-teal); font-weight: var(--w-semibold); }

.toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.toolbar #search { flex: 2 1 240px; }
.toolbar select { flex: 1 1 150px; }

.status { margin: 0 0 var(--sp-2); font-size: var(--text-sm); color: var(--col-text-4); }
.status.error, .form-error { color: #B23C26; }
.form-error { margin: 0; font-size: var(--text-sm); min-height: 1.2em; }

.table-card { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: var(--sp-3) var(--sp-4); text-align: left; vertical-align: top; }
th {
  font-size: 9.5px; font-weight: var(--w-bold); text-transform: uppercase;
  letter-spacing: var(--ls-wider); color: var(--col-text-4);
  border-bottom: 1px solid var(--col-border); white-space: nowrap;
}
td { border-bottom: 1px solid var(--col-divider); }
tbody tr:last-child td { border-bottom: none; }
td a { color: var(--col-teal-dark); font-weight: var(--w-semibold); text-decoration: none; }
td a:hover { text-decoration: underline; }
.host { display: block; font-size: var(--text-xs); color: var(--col-text-4); }
.desc {
  font-size: var(--text-sm); color: var(--col-text-3);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;
}
th:first-child { width: 38%; }
tr[aria-expanded] { cursor: pointer; }
tr[aria-expanded]:focus-visible { outline: 2px solid var(--col-teal); outline-offset: -2px; }
tr[aria-expanded="true"] .desc { display: block; white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
.row-actions { display: flex; gap: var(--sp-1); }

dialog {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--col-border); border-radius: var(--r-lg);
  padding: var(--sp-6); color: inherit;
}
dialog::backdrop { background: rgba(11, 22, 51, .45); }
dialog form { display: grid; gap: var(--sp-4); }
dialog .section-title { margin: 0; font-size: var(--text-lg); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); }

@media (max-width: 600px) {
  .two-col { grid-template-columns: 1fr; }
}
