@import "colours";

html, body {
  background-color: white;
  margin: 0;
  padding: 0;
}

i.fa {
  margin-right: 5px;
}

* {
  font-family: 'Roboto', sans-serif;
}

a {
  color: @accent;
  outline: 0;

  &:hover {
    color: darken(@accent, 4%);
  }
}

div.obscurer {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: @main-bg;
  z-index: 1;
  opacity: 1;
  transition-duration: 1s;
  pointer-events: none;

  &.gone {
    opacity: 0;
  }
}

div.header-section {
  position: fixed;
  top: 0;
  background-color: @main-bg;
  width: 100%;
  height: 70px;
  padding: 0 150px;
  box-sizing: border-box;
  line-height: 70px;
  z-index: 1;

  * {
    color: white;
    -webkit-touch-callout: none;
      -webkit-user-select: none;
       -khtml-user-select: none;
         -moz-user-select: none;
          -ms-user-select: none;
              user-select: none;
  }

  .header-logo {
    text-align: center;
    font-family: 'Arvo';
    font-size: 40px;
    cursor: pointer;
    float: left;
    letter-spacing: normal;
    transition: letter-spacing 0.3s;
    transition-timing-function: ease-in-out;

    &:hover {
      letter-spacing: 6px;
    }
  }

  .bookmark-icon {
    text-align: center;
    font-size: 20px;
    cursor: pointer;
    float: right;
    margin-right: 20px;

    i {transition-duration: 0.15s;}
    &:hover>i {color: @bookmark-colour;}
  }

  .newpost-icon {
    text-align: center;
    font-size: 18px;
    cursor: pointer;
    float: right;
    margin-right: 20px;

    i {transition-duration: 0.15s;}
    &:hover>i {color: @newpost-colour;}
  }

  form.search-form {
    float: right;
    margin-right: 40px;
    display: inline-block;
    height: 38px;

    input[type="text"] {
      height: 100%;
      width: 90px;
      padding: 0 20px;
      color: @accent;
      font-size: 16px;
      outline: none;
      border: none;
      border-radius: 5px;
      transition-duration: 0.3s;
      transition-timing-function: ease-in-out;

      &:focus {
        width: 250px;
      }

      &::placeholder {
        font-weight: normal;
        color: #a6a6a6;
      }
    }
  }

  .username-disp, .login {
    font-size: 18px;
    float: right;
    cursor: pointer;
    width: 250px;
    text-align: center;
  }

  .arrow-down {
    // HACK: Weird way of doing an arrow with borders, and weird way of centering it
    top: -2px;
    position: relative;
    margin-left: 10px;
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid white;

    transition-duration: 0.2s;
    transition-timing-function: cubic-bezier(.11,1.21,.56,1.46);

    &.default {
      transform: rotate(-90deg);
    }
  }
}

div.dropdown-notauth, div.dropdown-auth {
  background-color: @main-bg;
  position: fixed;
  width: 250px;
  top: 50px;
  right: 150px;
  transition-duration: 0.2s;
  transition-timing-function: cubic-bezier(.96,.62,.48,.91);
  height: 0;
  text-align: center;
  font-size: 17px;
  padding-bottom: 20px;

  a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    width: 100%;
    top: -400px;
    transition-timing-function: cubic-bezier(.96,.62,.48,.91);
    transition-duration: 0.3s;
    opacity: 0;
    color: #e4e4e4;
    height: 70px;
    line-height: 70px;

    &:hover {
      color: white;

      @keyframes spin {
        0% {transform: rotate(0deg);}
        100% {transform: rotate(360deg);}
      }

      >i.fa-cog {
        animation-name: spin;
        animation-duration: 3s;
        animation-timing-function: linear;
        animation-iteration-count: infinite;
      }
    }
  }

  &.visible {
    top: 70px;
    height: 210px;
    line-height: 70px;
  }

  &.visible > a {
    top: 0px;
    opacity: 1;
  }
}

.button-big {
  border: none;
  width: 300px;
  height: 60px;
  margin: 20px auto;
  background-color: white;
  border: 2px solid @main-bg;
  color: @main-bg;
  font-size: 20px;
  transition: box-shadow 0.2s, color 0.3s;
  transition-timing-function: linear;
  border-radius: 4.5px;

  &.close-middle {
    box-shadow: inset 0 0 0 0 @main-bg, inset 0 0 0 0 @main-bg;
  }
  &.close-right, &.close-left {
    box-shadow: inset 0 0 0 0 @main-bg;
  }
  &.close-center {
    box-shadow: inset 0 0 0 0 @main-bg;
  }

  &:hover {
    color: white;
    cursor: pointer;
  }

  &.close-middle:hover {
    box-shadow: inset 150px 0 0 0 @main-bg, inset -150px 0 0 0 @main-bg;
  }
  &.close-right:hover {
    box-shadow: inset 300px 0 0 0 @main-bg;
  }
  &.close-left:hover {
    box-shadow: inset -300px 0 0 0 @main-bg;
  }
  &.close-center:hover {
    box-shadow: inset 0 0 0 30px @main-bg;
  }
}
