@import '{ethereum:dapp-styles}/dapp-styles.less';
@import 'components.less';

html, body {
    height: 100%;
    font-weight: 400;
}

header {
    padding: @gridHeight * 6 @gridWidth @gridHeight * 8;
    height: @gridHeight * 15;
    background-color: #A39C9C;
    text-align: center;
    background-position: 50% 70%;   
    background-attachment: fixed; 
    transition: background-image 0.2s ease-in-out, filter 3s ease-out;
    z-index: 1;
    
    &.invalid-name {
      -webkit-filter: grayscale(95%);
      filter: grayscale(95%);
      transition: background-image 0.2s ease-in-out, filter 0.5s ease-out;
    }

    h1 {
        color: #FFF;
        margin-bottom: @gridHeight * 1;
        line-height: 0.75;
    }

    .search-input {
        padding-right: @gridWidth * 1.5;
        font-family: Source Sans Pro, Helvetica, Arial, Sans;
        font-weight: 500;
        height: @gridHeight * 3;
        font-size: 2 em;
    }

    .tld {
        position: relative;
        left: @gridWidth * -1.5;
        font-weight: 500;
        top: 1px;
        opacity: 0.4;
    }

    & > div {
      opacity: 1;
      transition: opacity 0.5s;
    }

    &.about-to-be-fixed > div {
        opacity: 0;
    }    

    &.fixed {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 0;
      padding-bottom: 0;
      z-index: 20;

      & > div {
        opacity: 0;
        visibility: hidden;
      }
    }
}

header.fixed + .container {
  padding-top: @gridHeight * 14;

  .col-md-8 h1 {
    position: fixed;
    top: 100px;
    background: @colorWhite;
    font-size: 1.8em;
    padding-right: @gridWidth/4;
    z-index: 10;
  }
}

input[type='checkbox'] + label {
  position: relative;
  top: -6px;
}

.container {
  display: flex;

  h1 {
    top: 0;
    transition: top 1s ease-in-out;
  }
}

.status-owned {
  h1, h2 {
    display: inline;
  }
  h2 {
    margin-left: 20px;
  }
}

.big-numerals {
  list-style-type: none;
  padding-left: 0;
  padding-bottom: @gridHeight;
  display: flex;

  li {
    flex: 1;
    line-height: 1;
    font-weight: 400;

    .big-numeral {
      font-size: 250%;
    }
  }
}

.big-numeral {
  font-size: 200%;
  font-weight: 100;
}

.unit {
  font-weight: 300;
  text-transform: uppercase;
}

aside {
  overflow: auto;

  h3 {
    margin-bottom: 0;
  }

  ul {
    padding: 0;

    li {
      list-style-type: none;
      padding-bottom: 10px;
    }
  }
}

.dapp-identicon.dapp-tiny {
  position: relative;
  top: 5px;
}

@keyframes yellowfade {
    from { background: yellow;}
    to { background: transparent; }
}


ul.names {
  list-style-type: none;
  padding-left: 0;
  overflow: hidden;

  li {
    a { 
      font-weight: 400;
      font-size: 125%;
      white-space: nowrap;

      &.can-invalidate {
        color: @colorError;
        font-weight: 500;
      }

      &.recent {
          animation-name: yellowfade;
          animation-duration: 30s;
      }
    }
  }

    icon.icon-alert {
        font-weight: 600;
        width: 18px;
        display: inline-block;
        text-align: center;
        color: #bf891e;
        border-radius: 9px;
        height: 18px;
        font-size: 12px;
        position: relative;
        top: -2px;

        &:before {
            content: " ";
            position: absolute;
            top: -1px;
            left: 1px;
            height: 0;
            border-bottom:15px solid #ffd60c;
            border-left:8px solid transparent;
            border-right:8px solid transparent;
            z-index: -1;
        }
    }

}

.main-content {
    padding-bottom: @gridHeight * 5;
    transition: opacity 0.25s;
    overflow: auto;

    &.loading {
        opacity: 0.5;
    }

    .names {
        column-count: 3;
        a {
          font-weight: 300;
          &.watched {
            font-weight: 400;
          }
        }
    }
}

.dapp-block-button {
  text-align: center;
  line-height: 1.6em;
}

.help {
  cursor: help;
}

.components_address {
  display: inline;
  .address {
    color: #132a62;
  }
  .address.true, .icon-user {
    color: #497b2b;
  }
}

.unused-bids {
  background: #e6e0e0;
  padding: @gridHeight * 0.5 @gridWidth @gridHeight * 1.5;
  margin-top: @gridHeight;
  margin-left: @gridWidth * -1;
}

.explainer-modal {
  min-width: @gridWidth * 14;
  width: 80vw;
  text-align: left;

  h2 {
    color: @colorGrayDark;
    background: transparent;
    margin-bottom: 0;
    padding: @gridHeight 0 @gridHeight/2;
  }

  p {
    margin: 0 0 @gridHeight;
    font-size: 1em;
  }
}

.dapp-modal-overlay {
  background: rgba(255,255,255,0.75);
}

.fixed-alert {
    z-index: 100;
    position: absolute;
}


// RESPONSIVE

@media only screen and (max-width: 500px) {
  header {
    transition: none;
      
    &.invalid-name {
      transition: none;
    }

    div {
      position: absolute;
      left: 0;
      right: 0;

      h1 {
        font-size: 130%;
        margin-bottom: @gridHeight/2;
      }

      .search-input {
        width: 95%;
      }

      .tld {
        position: absolute;
        left: auto;
        top: 58px;
        right: 20px;
      }
    }
  }

  .dapp-content {
    padding: 0;
    width: 100%;
  }

  .main-content {
      .names {
          column-count: 2;
      }
  }  

  .dapp-modal-container.explainer-modal {
    width: 100%;
    min-width: auto;
  }
}
