.topic {
  color: white;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  padding: 25px 25px;
  width: 100%;

  & .topic-content {
    align-self: flex-start;
    flex: 1;

    &:first-child {
      flex: none;
      margin: 3px 0 12px;
      max-width: 415px;
      width: 50%;
    }

    &:only-child {
      margin: 3px auto 12px;
      max-width: 600px;
      width: 100%;
    }

    & .topic-title {
      color: var(--darkgray);
      font-family: "Palanquin", sans-serif;
      font-size: 26px;
      font-weight: 400;
      line-height: 1.1;
      margin: 0 auto 10px;
      z-index: 2;
      & a {
        color: #333;
        display: inline-block;
        margin-top: 0;
        outline: 0;
        padding-top: 0;
        position: relative;
      }
    }

    & .topic-subtitle {
      color: var(--red);
      font-family: "Palanquin", sans-serif;
      font-size: 13px;
      font-weight: 400;
      letter-spacing: 0.05em;
      margin: 0px auto 10px;
      width: 100%;
      & a {
        color: var(--red);
      }
    }

    & .topic-select-label {
      color: var(--black);
      font-size: 12px;
      font-weight: 600;
      line-height: 18px;
      text-transform: uppercase;
    }

    & .topic-stats {
      display: flex;
      flex-wrap: wrap;
      width: 100%;
    }

    & .topic-descriptions {
      position: relative;
    }

    & .topic-description {
      color: var(--darkgray);
      font-family: "Palanquin", sans-serif;
      font-weight: 400;
      line-height: 1.5;
      opacity: 1;
      transition: opacity 0.5s;
      & a {
        color: #32415A;
        text-decoration: underline;
      }
      & p {
        font-size: 15px;
        margin-bottom: 10px;
      }
      & .bp3-button {
        background: none;
        border: 1px solid var(--red);
        border-radius: 0;
        box-shadow: none;
        color: var(--red);
        font-size: 13px;
        font-weight: 600;
        margin-top: 10px;
        text-align: center;
        text-decoration: none;
        transition: background 0.1s, color 0.1s;
        &:before {
          color: var(--red);
          font-size: 13px;
          transition: color 0.1s;
        }
        &:hover {
          background: var(--red);
          color: white;
          &:before {
            color: white;
          }
        }
      }
    }

    & a.footnote {
      margin-left: 2px;
      text-decoration: none;
    }

  }

  & .topic-visualization {
    flex: 1;
    margin-left: 50px;
    min-height: 400px;
    overflow: hidden;
    position: relative;
    & ~ .topic-visualization .Options {
      display: none;
    }
  }

  &.topic-loading {
    & .topic-description, & .topic-stats, & .topic-visualization {
      opacity: 0.25;
    }
  }

  & .bp3-non-ideal-state {
    left: 0;
    position: absolute;
    top: 0;
  }

  &.Column, &.SubGrouping {
    flex: 1;
    flex-direction: column;
    width: auto;
    & .topic-content {
      flex: 1;
      max-width: none;
      width: 100%;
    }
    & .topic-visualization {
      flex: none;
      margin: 0;
      min-height: 200px;
    }
  }

  &.house .StatGroup.single, &.senate .StatGroup.single {
    margin-bottom: 0;
    min-width: 100%;
    &:last-child {
      margin-bottom: 10px;
    }
    & .stat-value {
      font-size: 24px;
    }
  }

  &.SubGrouping {
    & .topic-title {
      font-size: 28px;
      font-weight: 500;
      margin-bottom: 0;
      padding: 45px 0 0;
      position: relative;
      text-transform: uppercase;
    }
  }

}
