@import "chembl_base";

$chembl-header-height: 54px;
$ebi-nav-height: 50px;
$full-header-height: $chembl-header-height + $ebi-nav-height;
$full-header-height-large: 180px;

/* -------- DEFAULT STYLES -------- */
.main-page-container {
  h2 {
    color: $darker-teal;
    font-size: 3em;
  }

  p {
    color: $grey-dark;
    font-family: $helvetica;
  }

  .color-row {
    padding: 40px 0;
    margin-bottom: 0;
    background: linear-gradient(#f9f9f9 20%, #f5f5f5);
  }

  .container {
    width: 90%;
    max-width: 1280px;
  }

  .main-page-section {
    height: calc(100vh - #{$full-header-height});
    min-height: 400px;
    max-height: 900px;

    .btn-chembl{
      img {
        width: 20px;
        background-color: transparent;
        vertical-align: middle;
      }
    }

    /* -------- SMALL SCREEN -------- */
    @media (max-width: 600px) {
      &:first-child{
        max-height: 500px;
      }
    }

     /* -------- MEDIUM SCREEN -------- */
    @media (min-width: 600px) and (max-width: 992px) {
      min-height: 900px;
      max-height: 1800px;
    }

    &.half-height {
      padding: 0 30px 20px 30px;
    }

    &.fit-height {
      height: fit-content;
      min-height: 300px;
      max-height: none;
      height: -moz-fit-content;
    }

    &.min-height {
      height: fit-content;
      min-height: 1px;
      max-height: none;
      height: -moz-fit-content;
    }

    .section-col {
      height: 100%;
    }
  }

  .col-divider {
    height: 1px;
    background-color: $divider-grey;

  }
  .divider {
    margin: 55px auto;
  }

  .btn-container {
    padding: 30px 0 20px 0;

    .button {
      font-size: 1em;
      padding: 10px 20px;
      background-color: $chembl-teal;
      color: white;
      border-radius: $default-btn-border-radius;
      letter-spacing: 0.02em;

      -webkit-transition: background-color 100ms ease;
      transition: background-color 100ms ease;

      &:hover {
        background-color: $chembl-teal;
      }
    }

    .hollow-button {
      padding: 8px 12px;
      background-color: white;
      color: $chembl-teal;
      border: solid $chembl-teal 2px;
      border-radius: 1px;
      letter-spacing: 0.02em;

    }
  }

  .chembl-text {
    font-family: $helvetica;
  }

  .small-text {
    font-family: $helvetica;
    font-size: 0.9em;
    color: $grey-dark;

    a {
      color: $chembl-teal;

      &:hover {
        text-decoration: underline;
      }
    }
  }
}

/* -------- CAROUSEL WITH CAPTIONS WRAPPER -------- */
.main-page-container {

  .first-section {

    .what-is-chembl{
      height: 30%;
      display: flex;
      justify-content: center;
      align-items: center;
      .chembl-text{
        padding: 0 10%;
      }

      /* -------- MEDIUM SCREEN -------- */
      @media (min-width: 600px) and (max-width: 992px) {
        .chembl-text{
          text-align: justify;
        }
      }
      /* -------- SMALL SCREEN -------- */
      @media (max-width: 600px) {
        .chembl-text{
          padding: 0;
          text-align: justify;
        }

        height: 40%;
      }

    }

    .mobile-search-buttons{

      display: flex;
      flex-direction: column;

      .mobile-search-bar-container{
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 30px 0;
      }

      /* -------- SMALL SCREEN -------- */
      @media (max-width: 600px) {
        height: 60%;
      }

    }


    .chembl-game{
      border: black 1px solid;
      background-color: $grey-light;
      margin-top: 20px;
      height: calc(100% - 20px);
    }

  }

  .visualisations-with-captions-container {

    height: 70%;

    .slick-disabled{
      color: transparent;
      cursor: unset;
    }
    .caption-text{
      padding: 2%;
    }

    /* -------- MEDIUM SCREEN -------- */
    @media (min-width: 600px) and (max-width: 992px) {

      .visualisations {
        height: 60%;
      }

      .captions {
        height: 40%;
      }

    }

     /* -------- LARGE SCREEN -------- */
    @media (min-width: 992px) {

      .visualisations, .captions {
        height: 100%;
      }

    }

  }
}

/* -------- VISUALISATIONS CAROUSEL -------- */
.main-page-container {

  .slick-slide {
    outline: none !important;
  }

  .visualisations{
    .carousel-wrapper {
      height: calc(100% - 35px); //50px for slick dots
    }
  }
  .carousel-wrapper {

    height: 100%;
    .slick-list {
      height: 100%;
    }

    .slick-track {
      height: 100%;
    }

    .caption-buttons{
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      a{
        white-space: nowrap;
        text-overflow: ellipsis;
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
      }
    }
    .caption-text{
      .description, .instructions{
        text-align: justify;
      }
    }

    /* -------- MEDIUM SCREEN -------- */
    @media (min-width: 600px) and (max-width: 992px) {

      .caption-text{
        height: 80%;
      }

      .caption-buttons {
        height: 20%;
      }

    }

     /* -------- LARGE SCREEN -------- */
    @media (min-width: 992px) {

      .caption-text{
        height: 90%;
      }

      .caption-buttons {
        height: 10%;
      }

    }

  }
}

/* --- Browse Entities Visualisation --- */
.circles-vis-container {

  circle {
    cursor: pointer;
  }

  text {
    font-family: $chembl-helvetica;
    text-anchor: middle;
    fill: white;
  }
}

/* --- SUNBURST --- */
.tree-select-container {
  text-align: center;
  padding-bottom: 10px;

}

.sunbursts-group-container {

  height: 95%;
  .sunburst-container {
    height: 100%;
    .arc-path {
      stroke: white;
      stroke-width: 0.8px;
    }
    .sunburst-text {
      fill: #0d343a;
      font-size: 9px;
      pointer-events: none;
    }
  }

}


/* -------- CHEMBL TEXT -------- */
.main-page-container {

  .chembl-text {
    text-align: center;

    h2 {
      margin: 0;
      padding-bottom: 10px;
    }

    p {
      font-size: 1.25em;
      margin: 0;
    }

    .small-text {
      font-size: 0.9em;
    }

    .btn-container {

      .btn-separator {
        height: 20px;
      }

    }

    .social-media {
      margin-top: 15px;

      img {
        width: 30px;
        height: auto;
        opacity: 0.7;

        &:hover {
          opacity: 1;
        }
      }
    }
  }
}

/* -------- EXPLORE THE DATABASE -------- */
.main-page-container {

  .explore-database {
    text-align: center;
    margin-bottom: 20px;

    h2 {
      margin-bottom: 10px;
    }

    .btn-container {
      padding-top: 15px;
    }
  }
}

/* -------- DATABASE SUMMARY -------- */
.main-page-container {

  .database-summary {
    padding-bottom: 25px;
    text-align: center;

    h3 {
      color: $grey-dark;
      margin: 0;
      padding-top: 10px;
    }

    .small-text {
      margin-top: 0;
    }

    .db-records {
      margin: 0 auto;
      padding-top: 30px;
      max-width: 1200px;
      position: relative;

      .db-record-item {
        font-family: $chembl-helvetica;
        padding-bottom: 30px;

        h4 {
          margin-bottom: 0;
          color: $darker-teal;
          text-anchor: middle;
          transition: letter-spacing 100ms ease-in;
        }

        p {
          margin-top: 0;
          text-anchor: middle;
        }

        img {
          padding: 5px;
          height: auto;

          transition: width 200ms ease-in;
        }

        &:hover {

          img {
            padding: 2px;
          }
        }
      }
    }
  }
}

/* -------- PAPERS BY CHEMBL -------- */
.papers {
  background: white;
  min-height: 1px !important;

  .row {
    background: #f9f9f9;
    max-width: none;
    height: 50%;
    margin: 0;
  }

  .container {
    position: relative;
    max-width: 1100px;

    .responsive-img {
      max-width: 280px;
      position: absolute;
      padding: 0;
    }

    .pub-container {
      padding: 0;

      h3 {
        color: $grey-dark;
        margin-bottom: 10px;
      }

      .chembl-paper {
        margin-bottom: 20px;

        &:last-child {
          margin-bottom: 15px;
        }

        h6 {

          a {
            color: $primary-color;

            &:hover {
              text-decoration: underline;
            }
          }
        }

        .small-text {
          margin: 0;
          font-family: $chembl-helvetica;
          color: #aeaeae;
        }
      }
    }
  }
}

/* -------- ASSOCIATED RESOURCES -------- */
.associated-resources {
  padding-top: 85px;
  padding-bottom: 30px;

  .container {
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 100%;

    .chembl-text {
      padding: 0 0 30px 0;
      text-align: center;

      h2 {
        color: $grey-dark;
        margin: 0;
        padding: 0;
      }
    }

    .resources-container {
      margin-bottom: 50px;
      display: flex;
      align-items: stretch;

      .cards-column {
        display: flex;
        flex-direction: column;
        justify-content: center;

        .resource-card {
          border-radius: $default-btn-border-radius;
          padding: 15px 0 20px 0;
          margin: 5px 0;
          border: solid 1px white;
          display: flex;
          align-items: center;

          .resource-content {
            padding: 0;

            h6 {
              color: $chembl-teal;
              font-weight: bolder;
            }

            p {
              font-size: 1.1em;
              color: $grey-dark;
              margin: 0;
            }

            span {
              color: $chembl-teal;
            }
          }

          .chevron-icon {
            margin: 0;
            padding: 0;
            color: $grey-dark;
          }

          transition: box-shadow 100ms ease-in;

          &:hover {

            .chevron-icon {
              color: $chembl-teal;
            }
          }
        }
      }
    }

    .imgs-column {
      flex-direction: column;
      justify-content: center;
      padding: 30px 0;

      img {
        width: 150px;
        height: auto;
        margin-left: auto;
      }
    }
  }
}

/* -------- GITHUB DETAILS-------- */
.github-details {
  border-top: 1px solid $grey-light;
  padding-top: 30px;
  padding-bottom: 30px;

  .row {
    margin-bottom: 0;
  }

  .container {
    max-width: 1400px;
  }

  .btn-container {
    padding: 0;
  }

  .spacer-div {
    height: 1.5em;
  }

  h6 {
    color: $grey-dark;
  }

}

/* -------- WANT TO KNOW MORE SECTION-------- */
.know-more {
  background: #f9f9f9;
  min-height: 1px !important;
  padding-top: 50px;
  padding-bottom: 40px;
  border-bottom: 1px solid $grey-light;

  .container {
    max-width: 1000px;
    margin-bottom: 0;

    h3 {
      color: $grey-dark;
      margin-top: 10px;
      margin-bottom: 30px;
    }

    .more-container {
      padding-bottom: 20px;

      .more-img {
        width: 110px;
        height: auto;
        border-radius: 100%;
      }

      .title {
        color: $grey-dark;
        font-size: 1.1em;
      }
    }
  }
}

/* -------- TWEETS -------- */

.tweet-box {
  height: 100%;
  display: flex;
  flex-direction: column;

  .num-results {
    display: none;
  }

  .tweet-header {
    padding-left: 5px;
    font-family: $chembl-helvetica;
    color: $grey-dark;
    a {
      color: $chembl-teal;
    }
  }

  .row {
    margin: 0;
  }

  .tweet-list-container {
    max-height: 100%;
    overflow: scroll;
    border-radius: 10px;

    //Each tweet on the list
    .tweet {
      border: 1px solid $grey-light;
      border-radius: $default-btn-border-radius;
      padding: 12px 10px;
      width: 100%;
      margin: 7px 0;

      .tweet-content {
        font-size: 1em;
        word-wrap: break-word;
        color: $grey-dark;
        margin: 0;

        a {
          color: $chembl-teal;
        }

      }

      .tweet-extras {
        margin-top: 5px;
        font-size: 0.9em;
        font-family: $verdana;

        span {
          margin-right: 10px;
          color: #a8a8a8;

          &:hover {
            text-decoration: underline;
          }

        }
        img {
          width: 22px;
          height: auto;
          float: right;
          margin-right: 10px;
          padding: 1px;

          &:hover {
            padding: 0;
          }
        }
      }
    }
  }
}

/* -------- BLOG ENTRIES (like tweets but with some tweaks) -------- */

.blog-box {

  h5 {
    margin: 0 !important;
    font-size: 1.3em;

    a {
      color: $chembl-teal;

      &:hover {
        text-decoration: underline;
      }
    }
  }

  .tweet-content {
    margin: 5px 0 !important;
  }

  .tweet-extras {
    color: #a8a8a8;
    margin: 0 !important;

  }
}

/* ------------------- MEDIA QUERIES ------------------- */


.main-page-container {

  /* -------- SMALL SCREEN -------- */
  @media (max-width: 600px) {


    .papers {
      padding: 0;

      .row {
        padding: 30px 0;
      }

      h3 {
        font-size: 1.8em;
        text-align: center;
        padding-bottom: 20px;
      }

      h6 {
        font-size: 1.5em;
        line-height: 1.2em;
        letter-spacing: 0.03em;
      }
    }

    .smaller-on-small {
      height: 60vh;
    }

    .associated-resources {

      .chembl-text {
        h2 {
          font-size: 2em;
        }

        p {
          font-size: 1.1em;
        }
      }

      .imgs-column {
        display: none !important;
      }
    }

    .db-record-item {

      img {
        width: 110px;
      }

      h4 {
        font-size: 1.6em;
      }
    }

    #tweets-section {
      padding-left: 0;
      padding-right: 0;
    }

    #blog-section {
      padding-left: 0;
      padding-right: 0;
    }
  }

  /* -------- MEDIUM SCREEN -------- */
  @media (min-width: 600px) {

    .db-record-item {

      img {
        width: 145px;
      }

      h4 {
        font-size: 2.2em;
      }
    }

    .resource-card {

      &:hover {

        box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);

      }
    }

    .ws-button {
      margin-left: 10px;
    }

    .papers {

      h3 {
        font-size: 1.8em;
      }

      h6 {
        font-size: 1.3em;
        line-height: 1.2em;
        letter-spacing: 0.03em;
      }
    }
  }

  @media (min-width: 600px) and (max-width: 992px) {

    .papers {
      padding-top: 80px;
      padding-bottom: 80px;
    }

    .smaller-on-med {
      height: 50vh;
    }

    .explore-database {
      margin-top: 5%;
    }
  }

  /* -------- LARGE SCREEN -------- */
  @media (min-width: 992px) {

    .main-page-section {
      height: calc(100vh - #{$full-header-height-large});

      &.half-height {
        height: 50vh !important;
      }
    }
    .chembl-text {

      p {
        font-size: 1.1em;
      }
    }

    .btn-container {
      font-size: 1em;
    }

    .papers {
      padding-top: 120px;
      padding-bottom: 120px;

      img {
        margin-left: 40px !important;
      }
    }
  }

  .db-records {
    align-content: space-between;
    display: flex;
  }

  @media (max-width: 992px) {
    .db-records {
      display: block;
    }

    .half-height {
      height: 50vh;
    }

    .color-row {

      .col-divider {
        margin: 50px 0;
      }
    }
  }
}