﻿/* Standard Tables */

/* This stylesheet used to create a sticky table header. Used in Introduction topic for features and roles table. */

/** For top nav, you must put the table in a div for sticky head to work. Otherwise, when Flare builds, the parent in foundation.css overrides sticky */
div.tableSticky {
    max-height: 75vh;
    overflow: auto;
}

table {
  margin: 1em 0;
  border-collapse: collapse;
  border: 1px solid #d3d3d3;
}

th,
td {
  padding: 2px 1px 1px 2px;
  vertical-align: baseline;
  text-align: left;
  border: 1px solid #d3d3d3;
}

th {
  vertical-align: middle;
  background-color: #4e6659;
  color: #ffffff;
}

tr:nth-child(even) th[scope=row] {
  background-color: #fdf8f1;
}

tr:nth-child(odd) th[scope=row] {
  background-color: #fff;
}

tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);
}

tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

td:nth-of-type(2) {
  font-style: italic;
}

th:nth-of-type(3),
td:nth-of-type(3) {
  text-align: right;
} 

/* Fixed Headers */

th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
}

th[scope=row] {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 2;
}

th[scope=row] {
  vertical-align: top;
  color: inherit;
  background-color: inherit;
  background: linear-gradient(90deg, transparent 0%, transparent calc(100% - .05em), #d6d6d6 calc(100% - .05em), #d6d6d6 100%);
}

table:nth-of-type(2) th:not([scope=row]):first-child {
  left: 0;
  z-index: 3;
  background: linear-gradient(90deg, #666 0%, #666 calc(100% - .05em), #ccc calc(100% - .05em), #ccc 100%);
}

/* Strictly for making the scrolling happen. */

th[scope=row] + td {
  min-width: 24em;
}

th[scope=row] {
  min-width: 20em;
}

body {
  padding-bottom: 90vh;
}