#content table{
  table-layout: fixed;
  font-family: var(--primary-font, 'Metropolis');
  font-size: 16px;
  line-height: 27px;
  color: black;
  min-width: 40%;
  width: 80%;
  max-width: 80%;
}
#content table caption{
  padding: 5px 8px;
  background: var(--primary-color);
  border: 1px solid black;
  border-bottom: none;
  font-weight: 700;
  text-align: center;
  color: var(--white-color-1);
}
#content table thead{
  background: var(--primary-color);
  font-weight: 700;
  color: var(--white-color-1);
}
#content table caption + thead{
  background: var(--light-color-7);
  color: black;
}
#content table td,
#content table th{
  padding: 5px 8px;
  border: 1px solid black;
}
#content table td p:empty,
#content table th p:empty{
  margin: 0;
}

#content table th,
#content table thead td{
  font-weight: 600;
}

#content table ul,
#content table ol{
  margin: 0;
  margin-left: 1.2rem;
}

/* Dynamic cell colors */
#content table th,
#content table td{
  background: var(--cell-bgcolor);
  color: var(--cell-color);
}

/*******************************************************
 *
 * Media Queries
 *
 *******************************************************/
 @media only screen and (max-width: 991px){
  #content table{
    /* 
      The !important is for an iOS fix where inline width
      takes precedence over css max-width. This only occurs on iOS
    */
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }

  #content table thead{
    display: none;
  }

  #content table tbody td{
    display: flex;
    flex-flow: row nowrap;
  }
  #content table tbody td:not(:last-child),
  #content table tbody tr:not(:last-child) td:last-child{
    border-bottom: none;
  }

  /* Column header is on left on mobile */
  #content table.mobile-header-left tbody td,
  #content table[data-mobile-header-mode="left"] tbody td{
    padding: 0 5px 0 0;
    align-items: center;
  }
  #content table.mobile-header-left tbody tr:not(:last-child) td,
  #content table.mobile-header-left tbody tr:last-child td:not(:last-child),
  #content table[data-mobile-header-mode="left"] tbody tr:not(:last-child) td,
  #content table[data-mobile-header-mode="left"] tbody tr:last-child td:not(:last-child){
    border-bottom: none;
  }
  #content table.mobile-header-left tbody td.valign-top,
  #content table[data-mobile-header-mode="left"] tbody td.valign-top{
    align-items: start;
  }

  #content table.mobile-header-left td::before,
  #content table[data-mobile-header-mode="left"] td::before {
    content: attr(data-header);
    flex: 0 0 50%;
    align-self: stretch;
    font-weight: 700;
    border-right: 1px solid black;
    padding: 5px;
    margin-right: 5px;
    text-align: left;
  }

  /* Column header is on top on mobile */
  #content table.mobile-header-top tbody tr,
  #content table[data-mobile-header-mode="top"] tbody tr{
    display: flex;
    flex-flow: column nowrap;
    border: 1px solid black;
  }
  #content table.mobile-header-top tbody tr[data-has-mobile-header] > td:first-child,
  #content table[data-mobile-header-mode="top"] tbody tr[data-has-mobile-header] > td:first-child{
    background: #E3E3E3;
  }
  #content table.mobile-header-top tbody tr:not(:last-child),
  #content table[data-mobile-header-mode="top"] tbody tr:not(:last-child){
    border-bottom: none;
  }
  #content table.mobile-header-top tbody td,
  #content table[data-mobile-header-mode="top"] tbody td{
    display: flex;
    flex-flow: column nowrap;
    padding: 14px 16px;
    border: none;
    text-align: left !important;
  }
  #content table.mobile-header-top tbody td p:not(:empty),
  #content table[data-mobile-header-mode="top"] tbody td p:not(:empty){
    margin: 1.4rem 0 0 0;
  }
  #content table.mobile-header-top tbody td ul,
  #content table.mobile-header-top tbody td ol,
  #content table[data-mobile-header-mode="top"] tbody td ul,
  #content table[data-mobile-header-mode="top"] tbody td ol{
    margin-left: 40px;
  }
  
  #content table.mobile-header-top td::before,
  #content table[data-mobile-header-mode="top"] td::before{
    content: attr(data-header);
    margin-bottom: 1rem;
    font-weight: 700;
  }
}