/*
 @file
 Base styles include setting heading sizes, default link styles, default font styles, and body backgrounds.
 There should be no need to use !important in a Base style.

 @see https://smacss.com/book/type-base/
*/
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-font-feature-settings: "kern" 1;
  font-feature-settings: "kern" 1;
  -webkit-font-kerning: normal;
  font-kerning: normal;
  font-family: var(--font-family-paragraph);
  font-size: 100%;
}

body {
  background-color: var(--body-background-color);
  padding: 0;
  margin: 0;
  color: var(--body-text-color);
  /* Need to adjust the graident px once header is finalized - don't forget to do js file as well */
  background: linear-gradient(to bottom, var(--fdic-dark-blue) 355px, var(--body-background-color) 355px);
}

img {
  max-width: 100%;
  height: auto;
}

hr {
  margin: 2rem 0;
  height: 5px;
  outline: none;
  border: none;
  border-top: solid 1px #dcdcdc;
  border-bottom: solid 1px #dcdcdc;
  background-color: transparent;

  &.single-line {
    margin: 2rem 0 0;
    height: 1px;
    width: 100%;
    border: 0;
    background-color: #dcdcdc;
  }
}

/* Future need for content editor; faux <hr> */
/* p.single-line::after {
  content: '';
  display: block;
  height: 1px;
  width: 100%;
  margin: 2rem 0 0 -1rem;
  background-color: #dcdcdc;
} */

/* ============================================
   Basic Text Styles
  ============================================= */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: 6.25%;
  text-underline-offset: 12.5%;
  text-underline-position: from-font;

  &:hover {
    color: var(--link-hover);
    text-decoration-thickness: 12.5%;
  }

  &:visited {
    color: var(--link-visited);
  }

  &:visited:hover {
    color: var(--link-visited-hover);
  }
}

p {
  font-size: var(--default-font-size);
  font-family: var(--font-family-paragraph);
  line-height: var(--default-line-height);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: var(--heading-margin);
  padding: var(--heading-padding);
  color: var(--fdic-dark-blue);
  font-family: var(--heading-family);

  /* Global Divergent */
  a,
  a:visited {
    color: var(--fdic-dark-blue);
    line-height: var(--default-line-height);
    text-decoration: none;

    &:hover {
      color: var(--fdic-med-blue);
      text-decoration: underline;
    }
  }
}

h1 {
  font-size: var(--h1-size);
  line-height: var(--h1-line-height);
  font-weight: var(--h1-weight);
}

h2 {
  font-size: var(--h2-size);
  line-height: var(--h2-line-height);
  font-weight: var(--h2-weight);
}

h3,
.h3 {
  font-size: var(--h3-size);
  line-height: var(--h3-line-height);
  font-weight: var(--h3-weight);
}

h4 {
  font-size: var(--h4-size);
  line-height: var(--h4-line-height);
  font-weight: var(--h4-weight);
}

h5 {
  font-size: var(--h5-size);
  line-height: var(--h5-line-height);
  font-weight: var(--h5-weight);
}

h6 {
  font-size: var(--h6-size);
  line-height: var(--h6-line-height);
  font-weight: var(--h6-weight);
  text-transform: uppercase;
}

/* Remove top margin from elements if first in content block */
.field--name-field-content > .field__item:first-child {
  /* Exclude card groups from this rule */
  > div:not(.paragraph--type--card-group) {
    h2,
    h3,
    p {
      width: 95%; /* 1273: Prevent 'lonely' period (.) from dropping on to the next line by it self. */

      &:first-of-type {
        margin-top: 0;
      }
    }
  }
}

/* Unordered Lists - Content Region */
main {
  ul {
    padding: 0.5rem 0 0.5rem 1.5rem;

    li {
      padding-bottom: 0.5rem;
    }

    /* Nested Unordered Lists */
    ul {
      padding-left: 1rem;
    }
  }
}

/* Match marker to ME for first nested ordered list */
ol > li > ol > li {
  list-style-type: lower-alpha;
}

/* Ordered List CKEditor Style Options */
ol {
  li.upper-alpha {
    list-style-type: upper-alpha;
  }

  li.lower-alpha {
    list-style-type: lower-alpha;
  }

  li.upper-roman {
    list-style-type: upper-roman;
  }

  li.lower-roman {
    list-style-type: lower-roman;
  }
}

.ds-region-content fieldset legend {
  font-size: 1.125rem;
  color: var(--fdic-dark-blue);
  font-family: var(--font-family-title);
  margin-block: 1.5rem 0;
  padding-block: 1.5rem .5rem;
  font-weight: 500;
}

.table-wrapper {
  overflow-x: auto;
  width: 100%;
  margin-bottom: 2rem;
}

/* Hotfix to relese/olive to prevent scrollbar from appearing in footnotes */
.table-wrapper:has(table.footnotes) {
  overflow-x: unset;
}

table {
  display: table; /* https://www.tpgi.com/short-note-on-what-css-display-properties-do-to-table-semantics/ */
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  border-collapse: collapse;
  border-spacing: 0;
}

/* Sorting Tables */
.dvf-table,
.fdic-datatable,
.field--name-field-datatable {
  .sorting.active-sort {
    background-color: #20509e;
    color: var(--fdic-white);
  }
}

.views-element-container table {
  display: table;
}

thead th,
thead th p {
  text-align: left;
  padding: 1rem;
  background-color: var(--table-header-bg-color);
  color: var(--table-header-text-color);
  font-family: var(--table-header-font-family);
  font-weight: 400;
  font-style: normal;
}

tbody th {
  text-align: left;
  padding: 1rem;
}

thead th a {
  color: var(--table-header-text-color);
  text-decoration: none;
}

thead th a:hover {
  color: var(--table-header-text-color);
  text-decoration: none;
}

thead th a .tablesort--asc,
thead th a .tablesort--desc {
  background-image: none;
}

thead th a .tablesort--asc:before,
thead th a .tablesort--desc:before {
  color: var(--table-header-text-color);
  font-family: var(--font-family-fontawesome);
  font-weight: 900;
  position: relative;
}

thead th a .tablesort--asc:before {
  content: "\f0dd";
  top: -3px;
}

thead th a .tablesort--desc:before {
  content: "\f0de";
  top: 4px;
}

tr {
  background-color: var(--table-row-bg-color);
  margin: 0;
  padding: 0;
}

td,
th {
  padding: 1rem;
  border: 1px solid var(--table-border-color);
  margin: 0;
}

figure {
  margin: 0;
}

figcaption {
  font-family: var(--font-family-paragraph);
  font-size: var(--xs-font-size);
  line-height: var(--xs-line-height);
}

caption {
  text-align: left;
  padding: 1.5rem 0;
  font-weight: 500;
  font-family: var(--font-family-title);
  font-size: 1.5rem;
}

.text-center {
  text-align: center;
}

.add-top {
  margin-block-start: var(--spacing-lg);
}

.add-bottom {
  margin-block-end: var(--spacing-lg);
}

blockquote {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  padding: 0 3rem;
}

.pub-title {
  font-style: italic;
}

.field--name-field-event-smartdate .field__label,
.field--name-field-where .field__label {
  font-weight: 600;
}

.field--name-field-event-smartdate .field__label::after,
.field--name-field-where .field__label::after {
  content: ':';
}
/* 5 columns */
.fixed-column-ratios .usa-table.cols-5 thead tr th:nth-child(1),
.fixed-column-ratios .usa-table.cols-5 tbody tr td:nth-child(1) {
  width: 20%;
  text-align: left;
}

.fixed-column-ratios .usa-table.cols-5 thead tr th:nth-child(2),
.fixed-column-ratios .usa-table.cols-5 tbody tr td:nth-child(2) {
  width: 15%;
  text-align: center;
}
.fixed-column-ratios .usa-table.cols-5 thead tr th:nth-child(3),
.fixed-column-ratios .usa-table.cols-5 tbody tr td:nth-child(3) {
  width: 10%;
  text-align: center;
}
.fixed-column-ratios .usa-table.cols-5 thead tr th:nth-child(4),
.fixed-column-ratios .usa-table.cols-5 tbody tr td:nth-child(4) {
  width: 10%;
  text-align: center;
}
.fixed-column-ratios .usa-table.cols-5 thead tr th:nth-child(5),
.fixed-column-ratios .usa-table.cols-5 tbody tr td:nth-child(5) {
  width: 50%;
  text-align: left;
}
/* 6 columns */
.fixed-column-ratios .usa-table.cols-6 thead tr th:nth-child(1),
.fixed-column-ratios .usa-table.cols-6 tbody tr td:nth-child(1) {
  width: 20%;
  text-align: left;
}
.fixed-column-ratios .usa-table.cols-6 thead tr th:nth-child(2),
.fixed-column-ratios .usa-table.cols-6 tbody tr td:nth-child(2) {
  width: 15%;
  text-align: center;
}
.fixed-column-ratios .usa-table.cols-6 thead tr th:nth-child(3),
.fixed-column-ratios .usa-table.cols-6 tbody tr td:nth-child(3) {
  width: 10%;
  text-align: center;
}
.fixed-column-ratios .usa-table.cols-6 thead tr th:nth-child(4),
.fixed-column-ratios .usa-table.cols-6 tbody tr td:nth-child(4) {
  width: 10%;
  text-align: center;
}
.fixed-column-ratios .usa-table.cols-6 thead tr th:nth-child(5),
.fixed-column-ratios .usa-table.cols-6 tbody tr td:nth-child(5) {
  width: 10%;
  text-align: center;
}
.fixed-column-ratios .usa-table.cols-6 thead tr th:nth-child(6),
.fixed-column-ratios .usa-table.cols-6 tbody tr td:nth-child(6) {
  width: 40%;
  text-align: left;
}

.fixed-column-ratios .scroll_to {
    font-size: var(--default-font-size);
}

/* Nav Elements */
#backtotop {
  background-size: 44px;
  text-indent: -140px;
}

.remove-bottom-margin {
  margin-bottom: 0;

  .table-wrapper,
  .usa-table {
    margin-bottom: 0;
  }
}
