@import "chembl_base";

/*
----------------------------------------------------------------------------------------------------------------------
 BASIC STYLING
----------------------------------------------------------------------------------------------------------------------
*/

.chembl-teal {
  background-color: $chembl-teal !important;
}

.chembl-teal-text {
  color: $chembl-teal !important;
}

html {
  font-family: $verdana;
  color: $grey-dark;
  scroll-behavior: smooth;
}

h1 {
  color: $h1-color;
  font-family: $chembl-helvetica;
  font-size: 370%;
}

h2 {
  color: $h2-color;
  font-family: $chembl-helvetica;
  font-size: 277%;
}

h3 {
  color: $h3-color;
  font-family: $chembl-helvetica;
  font-size: 182%;
}

h4 {
  color: $h4-color;
  font-family: $chembl-helvetica;
  font-size: 161.6%;
}

h5 {
  color: $h5-color;
  font-family: $chembl-helvetica;
  font-size: 138.5%;
}

h6 {
  color: $h6-color;
  font-family: $chembl-helvetica;
  font-size: 123.1%;
}

b,
strong {
  color: $primary-color-dark
}

/*
----------------------------------------------------------------------------------------------------------------------
 Positioning
----------------------------------------------------------------------------------------------------------------------
*/

.relative-wrapper{
  position: relative;
}

.absolute-right{
  position: absolute;
  right: 0.75em;
}

/*
----------------------------------------------------------------------------------------------------------------------
 GENERAL LAYOUT SETUP
----------------------------------------------------------------------------------------------------------------------
*/
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}


a {

  &.disabled {
    color: color('grey', 'base')
  }

  &:hover {
    cursor: pointer;
  }
}

.no-margin {
  margin: 0 !important;
}

footer {
  padding-top: 0 !important;
}

/*
----------------------------------------------------------------------------------------------------------------------
 BUTTONS
----------------------------------------------------------------------------------------------------------------------
*/

.dotted-link {
  border-bottom: 1px dotted;
}

.btn-chembl {
  white-space: nowrap;
  color: white;
  background-color: $chembl-teal;
  border-radius: $default-btn-border-radius;
  padding: 10px 20px;
  text-align: center;

  &:hover,:not(.disabled) {
    background-color: $teal-accent;
  }
  &.disabled{
    background-color: $grey-light;
    cursor: default;
  }
}

.btn-small {
  color: white;
  background-color: $chembl-teal;
  border-radius: $default-btn-border-radius;
  padding: 6px 6px 6px 6px;
  text-align: center;
  width: 60px;
  line-height: 9px;
  font-size: 9px;

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

.btn-mini i,
.btn-small i {
  font-size: 180%;
}

.btn-micro i {
  font-size: 150%;
}

.btn-small img {
  height: 15px;
}

.btn-mini {
  color: white;
  background-color: $chembl-teal;
  border-radius: $default-btn-border-radius;
  padding: 10px 3px 6px 3px;
  text-align: center;
  width: 30px;
  line-height: 9px;
  font-size: 9px;
  margin-left: 4px;

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

.btn-micro {
  color: white;
  background-color: $chembl-teal;
  border-radius: $default-btn-border-radius;
  padding: 6px 4px;
  text-align: center;
  width: 25px;
  line-height: 9px;
  font-size: 9px;
  margin-left: 4px;

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

.hollow-grey {
  background-color: white;
  color: $grey-dark !important;
  border: 1px solid $grey-dark;

  &:hover {
    color: $chembl-teal !important;
    background-color: white;
    border-color: $chembl-teal;

  }
}

.hollow-teal {
  background-color: white;
  color: $chembl-teal !important;
  border: 1px solid $chembl-teal;

  &:hover {
    background-color: white;
    border-color: $teal-accent;
    color: $teal-accent !important;
  }
}

.close-corner-button {
  position: absolute;
  top: 2px;
  right: 2px;
}


/**
* Custom elements
* ----------------------------------------------------------------------------------------------------------------------
*/

.css-tooltipped {
  position: relative;

  .css-tooltip {
    white-space: normal;
    visibility: hidden;
    word-wrap: break-word;
    background-color: color('grey', 'lighten-3');
    text-align: left;
    border-radius: 0.5em;
    padding: 0.5em;

    /* Position the tooltip */
    position: absolute;
    left: -0.5em;
    right: -0.5em;
    top: -0.5em;
    z-index: $z-over-a-bit;
  }

  &.active-tooltip {

    &:hover {

      .css-tooltip {
        visibility: visible;
      }
    }
  }
}


/**
* main content container
* ----------------------------------------------------------------------------------------------------------------------
*/

/* medium and up screens */
@media only screen and (min-width: 601px) {

  .main-container {
    width: 95%;
    max-width: none;
  }
}


/**
* Error message styles
* ----------------------------------------------------------------------------------------------------------------------
*/

a.error-redirect-link {
  font-size: 1.3em;
  color: $chembl-teal;
  text-decoration: underline;

  &:hover {
    color: color('teal', 'lighten-1');
    font-size: 1.3em;
  }
}

/**
* Preloaders and Error message wrapppers
* ----------------------------------------------------------------------------------------------------------------------
*/

.card-load-error,
.card-preolader-to-hide {
  padding: 10% 5%;
}

.chembl-help {
  font-size: 210%;
  line-height: 10px;
}

.chembl-help span {
  border-radius: 15px;

}


/**
* EBI-Breadcrums
* ----------------------------------------------------------------------------------------------------------------------
*/

.ebi-breadcrumb {
  font-size: 70%;

  &.truncate {
    max-width: 200px;
    display: inline-block;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 10px;
  }
}

.long-filter-content {
  max-height: 20vh;
  overflow: scroll;
}

.share-url {
  padding: 4px;
  border: 1px solid $primary-color-dark;
}

/**
* Acknowledgements
* ----------------------------------------------------------------------------------------------------------------------
*/

.acks-list {
  li {
    padding: 2px 0;
  }
}

/**
* Download Menu
* ----------------------------------------------------------------------------------------------------------------------
*/

.db-menu-option {
  height: 99px;

  .menu-link {
    height: 100%;
    border-radius: $default-btn-border-radius;
    background-color: $primary-color;
    padding: 5px;

    a {
      color: white;
      width: 100%;

      p {
        margin: 5px 0;
      }
    }

    img {
      max-height: 45px;
    }

    .only-text {
      font-size: 2rem;
    }
  }
}

.db-menu-option-default {
  border: 2px solid $primary-color-dark;
  border-radius: $default-btn-border-radius + 2px;
}

.wizard-modal {
  height: $modals-height;

  .modal-content {
    height: 100%;

    .step-content {
      height: 100%;
      position: relative;

      .db-menu-option {

        .icon-chembl {
          font-size: 220%;
        }
      }
    }
  }

  .db-menu-foter {
    width: 100%;
    position: absolute;
    bottom: 0;

    .db-menu-last-row {
      border-top: 1px solid $primary-color;
      margin-bottom: 0px;

    }

    .db-menu-description {
      font-size: 80%;
      padding: 10px;
    }

  }

  .license-text {
    background-color: white;
    height: 60%;
    overflow-y: scroll;
    padding: 10px;
    margin-bottom: 1rem;
  }

  .input-field {
    margin-top: 0;
    input {
      margin-bottom: 0;
    }
  }
}

.speck-fullscreen {
  position: relative;

  .visualisation {
    width: 100vw;
    height: 90vh;
  }

  .controls {
    position: absolute;
    bottom: 0;
  }
}


/**
 * Download buttons
 * ----------------------------------------------------------------------------------------------------------------------
 */

.downloads-btn-wrapper {
  position: relative;
  display: inline-block;

  .downloads-btns {
    position: absolute;
    top: 0;
    left: 120%;
    width: 300px;
    display: none;
  }
}


/**
  * MarvinJS editor
  * ----------------------------------------------------------------------------------------------------------------------
  */

.marvin-search-container {

  .marvinjs-buttons, .marvin-container, .marvinjs-buttons-closed {

    .col {
      padding-left: 0.2rem;
      padding-right: 0.2rem;
    }

    a {
      width: 100%;
    }
  }

  &.in-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;

    .row {
      padding: 0;
      margin: 0;
    }

    .marvinjs-buttons, .marvin-container, .marvinjs-buttons-closed {

      .col {
        padding: 0.1rem;
      }

      a {
        width: 100%;
      }

      p {
        font-size: 0.7rem;
        margin-top: 0;
        margin-bottom: 0;
      }
    }

    .marvinjs-buttons-closed, .marvinjs-buttons {
      flex-grow: 1;
      flex-shrink: 0;
    }

    .marvin-container {
      width: 100%;
      flex-grow: 100;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      align-items: center;

      .div-cover-wrapper {
        width: 100%;
        flex-grow: 10;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;

        iframe {
          width: 100%;
          flex-grow: 10;
          flex-shrink: 0;
        }

        &::after {
          flex-grow: 0.001;
          flex-shrink: 0;
        }
      }

      &::after {
        flex-grow: 0.001;
        flex-shrink: 0;
      }
    }
  }
}