/* Insight Investment house styles — ported from stylesheets/manifest.css in the
   insight.minerva.info repo (master, 9480874).

   Despite the filename, this is NOT manifest.info's stylesheet: it is Insight's
   own, and the file was added by "Build custom web reporting for Insight"
   (2022-03-29). The same commit added the congressSans font below.

   Brand colours, straight from that file:
     #0E8680  teal-green   links, buttons, active pagination
     #425968  body text
     #34454e  table text, headings, hover
     #FFA500  focus ring
     #c62521  validation error

   Fonts: congressSans (Adrian Williams Design, licensed — served from our own
   origin, not a CDN) for body and form controls, Open Sans for buttons. CF
   loads Open Sans from Google Fonts and so does the template.

   TWO FAMILIES OF SELECTOR NEEDED UPDATING, as on the Publica site, because the
   originals target libraries this port has moved past:

   * Bootstrap 3's `.table > thead > tr > th` descendant chains. Bootstrap 5
     drops the intermediate elements, so the equivalent is `.table th` /
     `.table td`. Both are written where it costs nothing.
   * DataTables 1.x `.pagination > li > a`. DataTables 2 with the Bootstrap 5
     integration renders `.page-link` inside `.page-item`, so those are targeted
     too — otherwise the pager keeps Bootstrap's default blue and the page looks
     half-branded.

   Deliberately NOT carried over: the commented-out `#c62521` table-header
   background and `#f2eeee` input background, both already disabled in CF; and
   the `input[type=...] { border: 0; ... width: 100% }` reset, which fights
   Bootstrap 5's own form-control sizing and made every field full-bleed. The
   border colour and radius from that rule are kept. */

@font-face {
  font-family: congressSans;
  src: url("fonts/congrsanligstd-webfont.woff") format("woff"),
       url("fonts/congrsanligstd-webfont.ttf") format("truetype");
  font-display: swap;
}

:root {
  --insight-green: #0E8680;
  --insight-body: #425968;
  --insight-ink: #34454e;
}

body,
p {
  font-family: congressSans, sans-serif;
  color: var(--insight-body);
}

h1, h2, h3, h4, h5, h6 {
  font-family: congressSans, sans-serif;
  color: var(--insight-ink);
}

a,
a.homenav {
  color: var(--insight-green);
  text-decoration: underline;
}

a:hover {
  color: var(--insight-green);
  text-decoration: none;
}

a.homenav:hover {
  color: var(--insight-ink);
}

th,
.table th {
  font-weight: 600;
  color: var(--insight-ink);
}

.table th,
.table td,
.table > thead > tr > th,
.table > tbody > tr > td {
  padding: 8px;
  line-height: 1.42857143;
  vertical-align: top;
  border-top: 0;
  border-bottom: 1px solid #ddd;
  color: var(--insight-ink);
}

/* The thick grey band above the header row. CF sets it inline on both tables:
   `style="width:100%;border-top:4px solid #CCC;border-bottom:0px;"`. It lives
   here rather than in the markup, per house convention.

   NOTE: no `.table-striped`. CF's grid and resolutions tables are a bare
   `class="table"` — the only striped table on the page is a small label/value
   summary in the detail view, which this port does not carry. Bootstrap 5 does
   not stripe by default, so this is about NOT adding the class. */
.table {
  width: 100%;
  border-top: 4px solid #CCC;
  border-bottom: 0;
}

.table > tbody > tr > td.cell-pad {
  padding-top: 20px;
  padding-bottom: 20px;
}

.form-control,
.form-select {
  font-family: congressSans, sans-serif;
  border: 1px solid rgba(52, 69, 78, .5);
  border-radius: 0;
}

/* CF's own focus treatment — orange, not Bootstrap's blue. */
.form-control:focus,
.form-select:focus {
  border-color: #FFA500;
  box-shadow: 0 0 0 .2rem rgba(255, 165, 0, 1);
}

.validate {
  border-color: #c62521;
  box-shadow: 0 0 0 .2rem rgba(198, 37, 33, 1);
}

/* CF calls this `.btn-bg`; the templates use Bootstrap's `.btn-primary`, so
   both are styled and the class name stops mattering. */
.btn-bg,
.btn-primary {
  background-color: var(--insight-green);
  border-color: var(--insight-green);
  text-shadow: none;
  border-radius: .125rem;
  color: #fff;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
}

.btn-bg:hover,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #CCC;
  border-color: #CCC;
  color: #fff;
  text-shadow: none;
}

.btn-outline-secondary {
  color: var(--insight-green);
  border-color: var(--insight-green);
  border-radius: .125rem;
}

.btn-outline-secondary:hover {
  background-color: var(--insight-green);
  border-color: var(--insight-green);
  color: #fff;
}

/* Pagination. The `.page-link` selectors are the DataTables 2 / Bootstrap 5
   equivalents of CF's `.pagination > li > a`. */
.pagination .page-link,
.pagination > li > a,
.pagination > li > span {
  border: 0;
  padding: 10px;
  color: var(--insight-ink);
  background-color: #fff;
}

.pagination .page-item.active .page-link,
.pagination > .active > a,
.pagination > .active > span {
  background-color: #fff;
  color: var(--insight-green);
  border: 0;
}

.pagination .page-link:hover,
.pagination > li > a:hover {
  color: var(--insight-green);
  border: 0;
}

.pagination .page-item.disabled .page-link,
.pagination .disabled {
  padding: 10px;
  color: #d3d3d3;
  cursor: not-allowed;
}
