:root {
  --panel-width: 275px;
}

.visible-banner #SearchPage {
  height: calc(100vh - var(--banner-height));
  & .controls, & .search .results {
    height: calc(100vh - 170px - var(--banner-height));
  }
}

#SearchPage {
  height: 100vh;
  padding-top: var(--nav-height);
  & .controls {
    height: calc(100vh - 170px);
    margin-top: 50px;
    width: var(--panel-width);
    & .clear {
      background-color: #434958;
      color: #979AA2;
      font-family: "Palanquin", sans-serif;
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 0.05em;
      line-height: 1;
      margin: 0 25px 15px;
      opacity: 1;
      padding: 6px 0 9px;
      text-align: center;
      text-transform: uppercase;
      transition: background-color 0.25s, color 0.25s;
      width: calc(100% - 50px);
      & span {
        display: inline-block;
        font-size: 17px;
        font-weight: 300;
        padding: 0 2px;
        vertical-align: baseline;
      }
      &:hover {
        background-color: #727682;
        color: #fff;
        cursor: pointer;
      }
    }
    & > ul {
      color: #979AA2;
      font-family: "Palanquin", sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.06em;
      line-height: 1.3;
      list-style-type: none;
      margin: 0;
      padding: 0 25px;
      text-transform: uppercase;
      width: 100%;
      & > li {
        margin: 20px 0;
        &.geo { color: var(--geo); }
        &.naics { color: var(--naics); }
        &.soc { color: var(--soc); }
        &.cip { color: var(--cip); }
        &.university { color: var(--university); }
        &.napcs { color: var(--napcs); }

        & .dim-icon {
          display: inline-block;
          margin: 0 6px 0 0;
          text-align: center;
          vertical-align: middle;
          width: 20px;
        }
        &.geo .dim-icon path[fill] { fill: var(--geo); }
        &.geo .dim-icon path[stroke] { stroke: var(--geo); }
        &.naics .dim-icon path[fill] { fill: var(--naics); }
        &.naics .dim-icon path[stroke] { stroke: var(--naics); }
        &.soc .dim-icon path[fill] { fill: var(--soc); }
        &.soc .dim-icon path[stroke] { stroke: var(--soc); }
        &.cip .dim-icon path[fill] { fill: var(--cip); }
        &.cip .dim-icon path[stroke] { stroke: var(--cip); }
        &.university .dim-icon path[fill] { fill: var(--university); }
        &.university .dim-icon path[stroke] { stroke: var(--university); }
        &.napcs .dim-icon path[fill] { fill: var(--napcs); }
        &.napcs .dim-icon path[stroke] { stroke: var(--napcs); }

        &:hover {
          cursor: pointer;
        }
        &:first-child {
          color: #727682;
          font-size: 12px;
          font-weight: 400;
          &:hover {
            cursor: auto;
          }
        }
      }
      & > ul {
        list-style-type: none;
        margin: -10px 0 5px;
        padding: 0;
        & > li {
          font-size: 12px;
          font-weight: 600;
          line-height: 2;
          margin-left: 25px;
          transition: color 0.15s;

          &:hover {
            color: white;
            cursor: pointer;
          }
          &.active {
            color: white;
          }
        }
      }
      & .num {
        display: inline-block;
        float: right;
      }
    }
  }
  & .search {
    display: block;
    & .bp3-input-group {
      border-bottom: 1px solid var(--gray);
      border-radius: 0;
      height: 50px;
      margin: 25px;
      transition: border-color 0.25s;
      &.active {
        border-color: white;
      }
      & .bp3-icon {
        color: white;
        font-size: 27px;
        line-height: 35px;
        margin-bottom: 0;
      }
      & input {
        background-color: var(--dark);
        box-shadow: none;
        color: white;
        font-size: 30px;
        height: 40px;
        overflow: visible;
        padding-left: 50px;
        &:placeholder {
          color: var(--gray);
        }
      }
    }
    & .results {
      border-left: 1px solid var(--gray);
      display: block;
      height: calc(100vh - 170px);
      left: var(--panel-width);
      list-style-type: none;
      margin: 0;
      overflow-y: scroll;
      padding: 0;
      position: absolute;
      top: 100px;
      width: calc(100% - var(--panel-width));
      & .result {
        padding: 20px;
        text-align: left;
        transition: background-color 0.25s;
        width: 100%;
        & a {
          align-items: center;
          display: flex;
          &:hover {
            text-decoration: none;
          }
        }
        &.highlighted, &:hover {
          background-color: var(--gray);
          cursor: pointer;
        }

        & .dim-icon {
          flex: none;
          margin-right: 20px;

          &.geo path[fill] { fill: var(--geo); }
          &.geo path[stroke] { stroke: var(--geo); }
          &.naics path[fill] { fill: var(--naics); }
          &.naics path[stroke] { stroke: var(--naics); }
          &.soc path[fill] { fill: var(--soc); }
          &.soc path[stroke] { stroke: var(--soc); }
          &.cip path[fill] { fill: var(--cip); }
          &.cip path[stroke] { stroke: var(--cip); }
          &.university path[fill] { fill: var(--university); }
          &.university path[stroke] { stroke: var(--university); }
          &.napcs path[fill] { fill: var(--napcs); }
          &.napcs path[stroke] { stroke: var(--napcs); }

        }

        & .result-text {
          flex: 1;
          & .title {
            color: white;
            font-size: 16px;
            line-height: 1.25;
            margin-bottom: 2px;
          }
          & .sumlevel {
            color: var(--lightgray);
            font-size: 12px;
            letter-spacing: 1px;
            line-height: 1.15;
            font-weight: 700;
            margin-top: 5px;
            text-transform: uppercase;
          }
        }
      }
      & .all-results, & .no-results {
        border: 0;
        box-shadow: none;
        color: white;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 1px;
        padding: 10px 0;
        text-align: center;
        text-transform: uppercase;
      }
    }
  }
}
