/* Data Center grids: the server table, the phone list, the AG Grid container, and the method box.
   AG Grid's own theme comes from grids.js (themeQuartz with the brand's custom properties). */

.dc-grid { height: min(76vh, 780px); min-height: 420px; margin: 0 0 12px; }
.dc-grid.dc-grid-auto { height: auto; min-height: 0; }
.dc-grid { box-sizing: border-box; padding-right: 8px; }
#cost-grid .ag-cell.ag-column-last { padding-right: 24px; }
#borrowers-local-grid .ag-cell.ag-column-last { padding-right: 24px; }
#borrowers-local-grid .ag-header-cell-text { word-break: normal; overflow-wrap: normal; }
.dc-grid .num, .dc-grid .ag-right-aligned-cell { font-variant-numeric: tabular-nums; }
.dc-grid .ag-cell.num:not(.ag-cell-wrap-text), .grid-cards dd.num { white-space: nowrap; }
.dc-grid .ag-row-pinned { font-weight: 600; }
.dc-grid .ag-row-group { font-weight: 500; }
.dc-grid a { color: var(--link); }
/* Wrapped cells (long role and issue names) read as text, not one line per row height. */
.dc-grid .ag-cell-wrap-text { line-height: 1.45; padding-top: 7px; padding-bottom: 7px; word-break: normal; }
.dc-grid .ag-cell-wrap-text .ag-group-value { white-space: normal; }
/* Filters fit a 320 px screen: a long option never widens the page. */
.filters > div { min-width: 0; max-width: 100%; }
.filters select, .filters input { max-width: 100%; }
a.download[data-grid-csv] { display: inline-flex; align-items: center; min-height: 44px; }

/* The kit's pager under a paged grid (grids.js buildFoot): the rows line beside Previous, the page
   and Next, as under the server table. */
.grid-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; margin: 0 0 12px; }
.grid-foot[hidden], .grid-foot .pager[hidden] { display: none; }
.grid-foot .rows { margin: 0; font-size: .925rem; color: var(--muted); }
.grid-foot .pager { margin: 0; }
.grid-foot .pager .off { color: var(--muted); }

.skip-grid { position: absolute; left: -9999px; }
.skip-grid:focus { position: static; display: inline-block; margin: 0 0 8px; padding: 4px 8px; background: var(--accent); color: var(--ink); }
.grid-after:focus { outline: none; }

.grid-tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.grid-tabs a { padding: 8px 14px; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.grid-tabs a:hover { color: var(--link); }
.grid-tabs a[aria-current="page"] { border-bottom-color: var(--primary); font-weight: 500; }

.link-button { font: inherit; font-size: .875rem; background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; }
.filters .link-button { background: none; color: var(--link); padding: 0; }
.filters .link-button:hover { background: none; color: var(--primary); }

table.data tbody tr:hover > * { background: rgba(14, 115, 149, 0.06); }
table.data tbody th[scope="row"] { background: transparent; font-weight: 400; }
table.data tfoot th, table.data tfoot td { font-weight: 600; border-top: 2px solid var(--line); background: #fff; }
/* Labels kept on one line where the table has room (par size bands); phone cards still wrap. */
table.data td.nowrap { white-space: nowrap; }

/* Participants: fees with no firm named, above the grid. */
.no-firm h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.no-firm ul { margin: 0 0 10px; padding-left: 1.2rem; }
.no-firm li { margin-bottom: 2px; }
.no-firm .table-scroll { margin: 0 0 6px; }
.no-firm .table-scroll table.data.compact { min-width: 520px; }
table.data.compact th, table.data.compact td { padding: 4px 8px; }
.no-firm table.data tbody th[scope="row"], .no-firm table.data td, .no-firm table.data tfoot th, .no-firm table.data tfoot td { background: transparent; }
@media (max-width: 767.98px) { .no-firm .stack-wrap table.data.compact { min-width: 0; } }

/* The phone list: one card a row, label: value. */
.grid-cards { display: none; list-style: none; margin: 0; padding: 0; }
.grid-cards > li { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin: 0 0 10px; background: #fff; }
.grid-cards .card-eyebrow { font-size: .85rem; margin: 0 0 2px; }
.grid-cards .card-title { font-weight: 500; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.grid-cards dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.grid-cards dl div { min-width: 0; }
.grid-cards dt { font-size: .78rem; color: var(--muted); }
.grid-cards dd { margin: 0; font-size: .925rem; overflow-wrap: anywhere; }
.grid-cards dd.num { font-variant-numeric: tabular-nums; }

@media (max-width: 767.98px) {
  .grid-server:not(.grid-keep-phone) .grid-table { display: none; }
  .grid-server:not(.grid-keep-phone) .grid-cards { display: block; }
  .dc-grid { display: none !important; }
  /* Every link a thumb presses is 44 px tall (POL4-p10). */
  .grid-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
  .grid-cards .card-title a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 300px) {
  .grid-cards dl { grid-template-columns: minmax(0, 1fr); }
}

/* Method boxes */
details.method { border: 1px solid var(--line); border-radius: 6px; padding: 10px 16px; margin: 24px 0 0; background: #fff; }
details.method summary { min-height: 44px; padding: 8px 0; cursor: pointer; font-weight: 500; color: var(--ink); }
details.method[open] summary { margin-bottom: 10px; }
details.method h3 { font-size: 1.05rem; margin-top: 20px; }
details.method li { margin-bottom: 6px; }

/* Cost of issuance: the chart takes its own row and the grid (or the table) the page's full width
   below it, at every width; beside the chart the grid had 708 px and cut its columns (POL4-f). */
.cost-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.cost-layout .cost-chart svg.grouped-bars { max-width: 760px; }
.cost-chart h2, .cost-grid h2 { font-size: 1.2rem; }
.chart-key { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0 0 6px; padding: 0; font-size: .875rem; color: var(--text); }
.chart-key .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
svg.grouped-bars { display: block; width: 100%; height: auto; }
svg.grouped-bars .grid { stroke: var(--line); stroke-width: 1; }
svg.grouped-bars .axis { stroke: var(--muted); stroke-width: 1; }
svg.grouped-bars text { fill: var(--muted); font-size: 13px; font-family: var(--font); }
svg.grouped-bars .phone-band, .chart-band-key { display: none; }
@media (max-width: 767.98px) {
  svg.grouped-bars .band { display: none; }
  svg.grouped-bars .phone-band { display: block; font-size: 20px; }
  svg.grouped-bars .tick { font-size: 18px; }
  .chart-band-key { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 0; list-style: none; font-size: .875rem; }
}
/* Sale types, as the board draws them (POL4-p4): Competitive in charcoal (the page has no pledge to
   confuse it with), Negotiated and Private placement off the primary colour, which is principal. Each
   type keeps its colour whichever types a role reports (grids.cost_chart numbers them by SALE_TYPES). */
.s1, svg.grouped-bars rect.s1 { fill: var(--header, #333333); background: var(--header, #333333); }
.s2, svg.grouped-bars rect.s2 { fill: #5b4a9b; background: #5b4a9b; }
.s3, svg.grouped-bars rect.s3 { fill: #2f7d4f; background: #2f7d4f; }
svg.grouped-bars rect:hover { opacity: .85; }

@media print {
  .dc-grid, .skip-grid, .grid-tabs { display: none !important; }
  .grid-server { display: block !important; }
  .grid-server .grid-table { display: block !important; }
  .grid-cards { display: none !important; }
  details.method { border: 0; padding: 0; }
}
