/*
 * SOCIB brand overlay for TDS 5 catalog pages (wired as catalogCssUrl in
 * threddsConfig.xml htmlSetup). Loaded after tds.css and socib.css.
 * Styles the catalog listing table (tr.subset rows).
 */

table th {
  color: #00223e;
  border-bottom: 2px solid #21b9da;
  padding: 6px 5px;
}

/* Row striping: overrides the inline bgcolor attribute the template emits.
 * nth-child counts the header row (child 1), so subset rows start at 2. */
tr.subset:nth-child(even) {
  background-color: #ffffff;
}

tr.subset:nth-child(odd) {
  background-color: #f2f7f9;
}

tr.subset:hover {
  background-color: #ddf3f9;
}

tr.subset td {
  border-bottom: 1px solid #e2eaee;
}

tr.subset code {
  font-size: 10pt;
}

/* Folder icons: the webapp ships 32px isometric GIF-era PNGs (folder.png for a
 * plain container dataset, scan_folder.png with a red arrow for a datasetScan,
 * fc_folder.png for a featureCollection). Replaced here with flat SOCIB-palette
 * SVGs via `content`, so nothing has to be mounted over the war and an image
 * change upstream cannot silently revert the branding. The three-way
 * distinction is kept but re-read for data users: plain folder, magnifier for
 * a scanned directory, stacked lines for an aggregation.
 */
td img[src$="folder.png"],
td img[src$="scan_folder.png"],
td img[src$="fc_folder.png"] {
  width: 20px;
  height: 20px;
  vertical-align: -4px;
}

/* Plain container dataset (leading slash: must not match the two below) */
td img[src$="/folder.png"]      { content:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M2.5%206.2c0-.9.7-1.6%201.6-1.6h4.6c.5%200%201%20.2%201.3.6l1%201.2h9c.9%200%201.6.7%201.6%201.6v9.8c0%20.9-.7%201.6-1.6%201.6H4.1c-.9%200-1.6-.7-1.6-1.6V6.2z%22%20fill%3D%22%2321b9da%22%2F%3E%3Cpath%20d%3D%22M2.5%209.4h19.1v8.4c0%20.9-.7%201.6-1.6%201.6H4.1c-.9%200-1.6-.7-1.6-1.6V9.4z%22%20fill%3D%22%2300223e%22%2F%3E%3C%2Fsvg%3E'); }

/* datasetScan — magnifier */
td img[src$="scan_folder.png"]  { content:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M2.5%206.2c0-.9.7-1.6%201.6-1.6h4.6c.5%200%201%20.2%201.3.6l1%201.2h9c.9%200%201.6.7%201.6%201.6v9.8c0%20.9-.7%201.6-1.6%201.6H4.1c-.9%200-1.6-.7-1.6-1.6V6.2z%22%20fill%3D%22%2321b9da%22%2F%3E%3Cpath%20d%3D%22M2.5%209.4h19.1v8.4c0%20.9-.7%201.6-1.6%201.6H4.1c-.9%200-1.6-.7-1.6-1.6V9.4z%22%20fill%3D%22%2300223e%22%2F%3E%3Ccircle%20cx%3D%2210.8%22%20cy%3D%2213.8%22%20r%3D%222.7%22%20fill%3D%22none%22%20stroke%3D%22%237fd6e8%22%20stroke-width%3D%221.6%22%2F%3E%3Cpath%20d%3D%22M12.9%2015.9l2.6%202.6%22%20stroke%3D%22%237fd6e8%22%20stroke-width%3D%221.9%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E'); }

/* featureCollection — stacked lines */
td img[src$="fc_folder.png"]    { content:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M2.5%206.2c0-.9.7-1.6%201.6-1.6h4.6c.5%200%201%20.2%201.3.6l1%201.2h9c.9%200%201.6.7%201.6%201.6v9.8c0%20.9-.7%201.6-1.6%201.6H4.1c-.9%200-1.6-.7-1.6-1.6V6.2z%22%20fill%3D%22%2321b9da%22%2F%3E%3Cpath%20d%3D%22M2.5%209.4h19.1v8.4c0%20.9-.7%201.6-1.6%201.6H4.1c-.9%200-1.6-.7-1.6-1.6V9.4z%22%20fill%3D%22%2300223e%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2212%22%20width%3D%2212%22%20height%3D%221.6%22%20rx%3D%22.8%22%20fill%3D%22%237fd6e8%22%2F%3E%3Crect%20x%3D%226%22%20y%3D%2215.2%22%20width%3D%228%22%20height%3D%221.6%22%20rx%3D%22.8%22%20fill%3D%22%237fd6e8%22%2F%3E%3C%2Fsvg%3E'); }
