@import 'variables';

.articleformcontainer {
  padding-top: calc(80px + 0.2vw);
  @media screen and ( min-width: 500px ){
    padding-top: calc(98px + 0.2vw);
  }
  padding-bottom: calc(94px + 2vw);
  background: $light-gray;
  background: var(--theme-background, $light-gray);
}

.articleform {
  margin: 0 auto;
  width: calc(95% - 40px);
  max-width: 880px;
  padding: 0px 20px;
  box-shadow: 5px 5px 0px darken($light-medium-gray, 3%);
  border: 1px solid darken($light-medium-gray, 5%);
  border-radius: 3px;
  background: white;
  position:relative;
  .container{
    border: 1px solid $light-medium-gray;
  }
  .help-guide-title{
    padding-top: 20px;
    h1{
      background: $yellow;
    }
  }
}

.articleform__form {
  display: flex;
  flex-direction: column;
}

.articleform__errors{
  background: $red;
  color: white;
  font-weight: bold;
  margin-top: 12px;
  border-radius: 3px;
  padding: 15px;
}

.articleform__orgsettings{
  padding: 0px;
  padding-left: 0px;
  margin: 20px 2px 0px;
  font-size:17px;
  cursor: pointer;
  user-select: none;
  img{
    height: 28px;
    width: 28px;
    border-radius: 50px;
    vertical-align: -7px;
    margin-right: 4px;
  }
  button {
    background: transparent;
    border-radius: 3px;
    border: 0px;
    font-size: 0.8em;
    font-family: $helvetica-condensed;
    width: 80px;
    border-radius: 100px;
    padding: 1px 0px;
    margin-left: 10px;
    border: 3px solid white;
    &.no{
      background: $light-gray;
      color: $medium-gray;
    }
    &.yes{
      background: darken($green, 18%);
      color: white;
    }
  }
  @media screen and ( min-width: 600px ){
    font-size:23px;
    padding-left: 10px;
    img{
      height: 33px;
      width: 33px;
      vertical-align: -8px;
      margin-right: 8px;
    }
    button {
      width: 120px;
    }
  }
}

.articleform__mainimage{
  padding: 10px 0px;
  text-align: center;
  width: 100%;
  img {
    width: 100%;
    height: calc(42vw - 44px);
    background: #fcfcfc;
    @media screen and ( min-width: 985px ){
      height: 370px;
    }
    display: block;
    cursor: pointer;
    &:hover{
      opacity:0.8;
    }
  }
}

.articleform__title {
  height: 26px;
  width: 99%;
  font-size: 18px;
  word-break: break-word;
  border: 0;
  padding: 20px 0px 15px;
  font-weight: 600;
  @media screen and ( min-width: 600px ){
    font-size: 29px;
    height: 50px;
  }
}
.articleform__detailfields{
  display: flex;
  flex-direction: row;
  position: relative;
}
.articleform__tagswrapper{
  display: inline-block;
  flex-grow: 1;
  float: left;
  padding-right: 15px;
  @media screen and ( min-width: 500px ){
    padding-right: 0px;
  }
}

.articleform__tags {
  height: 40px;
  width: 100%;
  border-radius: 3px;
  padding: 8px 8px 7px;
  @media screen and ( min-width: 500px ){
    width: 98%;
  }
  @media screen and ( min-width: 600px ){
    height: 19px;
    border-radius: 100px;
    padding-left: 17px;
  }
  margin-left: -4px;
  resize: none;
  border: 0;
  font-size: 16px;
  font-family: $monospace;
  font-weight: bold;
  background: $light-gray;
}

.articleform__tagsoptions{
  position: absolute;
  left: 0;
  right: 0;
  top: 50px;
  @media screen and ( min-width: 600px ){
    top: 30px;
  }
  background: white;
  border: 1px solid $medium-gray;
  box-shadow: $bold-shadow;
  box-shadow: var(--theme-container-box-shadow, $bold-shadow);
  font-family: $monospace;
  z-index:20;
}
.articleform__tagoptionrow{
  padding: 10px;
  cursor:pointer;
  &:hover{
    background: lighten($green, 27%);
  }
}
.articleform__tagoptionrow--active{
  background: $green;
  &:hover{
    background: darken($green, 10%);
  }
}

.articleform__detailsButton{
  color: $black;
  background: $purple;
  border: 0px;
  border-radius: 300px;
  padding: 3px 18px;
  font-family: $helvetica-condensed;
  font-size: 14.4px;
  height: 34px;
  display: none;
  @media screen and ( min-width: 600px ){
    display: inline-block;
  }
  margin-left:25px;
  &:hover{
    background: lighten($green, 24%);
  }
  img{
    width: 21px;
    height: 21px;
    vertical-align: -4px;
    display: inline-block;
  }
  &.articleform__detailsButton--moreconfig {
    margin-left: 5px;
    background: $light-medium-gray;
    &.articleform__detailsButton--bottom{
      margin-left: 5px;
      width:50px;
    }
  }
  &.articleform__detailsButton--bottom{
    margin-left: -5px;
    margin-top:10px;
    margin-bottom: 8px;
    display: inline-block;
    padding: 2px 15px;
    border-radius: 3px;
    width:100px;
    @media screen and ( min-width: 600px ){
      display: none;
    }  
  }
}

.articleform__description {
  height: 30px;
}

.articleform__body {
  min-height: calc(90vh - 370px);
  // height: calc(90vh - 240px);
  width: 98%;
  border: 0;
  font-size: 15px;
  resize: none;
  padding: 20px 6px;
  font-family: $monospace;
  @media screen and ( min-width: 600px ){
    font-size: 18px;
    min-height: calc(90vh - 280px);
  }
}

.articleform__buttons{
  padding: 20px 0px 20px;
  text-align: center;
  position:fixed;
  bottom: 0px;
  left: 0;
  right: 0;
  background: white;
  z-index: 20;
  border-top: 1px solid $light-medium-gray;
  button, a{
    cursor:pointer;
    background: $light-gray;
    font-family: $helvetica-condensed;
    font-size:14.5px;
    border: 0px;
    border-radius: 113px;
    box-shadow:  2px 2px 8px darken($light-medium-gray, 13%);
    padding: 6px 13px;
    display: inline-block;
    text-align: center;
    color: $medium-gray;
    margin: 4px calc(3px + 0.7vw);
    &:hover{
      background: lighten($green, 24%);
    }
    &.active{
      background: $green;
    }
    &.articleform__buttons--small{
      width: 45px;
      border: white;
    }
    &.articleform__buttons--publish{
      background: $bold-blue;
      color: white;
      &:hover{
        opacity:0.9;
      }
    }
    @media screen and ( min-width: 600px ){
      font-size:16px;
      width: 130px;
    }
  }
}

.articleform__overlay{
  position: absolute;
  top: 0px;
  left: 0;
  right: 0;
  bottom: 0;
  background: $dark-gray;
  color: white;
  padding: 5%;
  box-shadow: $bold-shadow;
  box-shadow: var(--theme-container-box-shadow, $bold-shadow);
  text-align: center;
  border-radius: 3px;
  h2{
    color: $green;
    font-size: 2em;
    font-family: $helvetica-condensed;
  }
  input[type="file"]{
    width: 90%;
    background: $black;
    padding: 20px;
    border-radius: 3px;
    margin: 20px auto;
    display: block;
    cursor:pointer;
  }
  input[type="text"]{
    width: calc(80% - 20px);
    padding: 10px 20px;
    border-radius: 3px;
    margin: 5px auto 0px;
    display: inline-block;
    border: 0px;
    font-size: 1em;
    @media screen and ( min-width: 600px ){
      width: calc(100% - 270px);
      border-top-left-radius: 0px;
      border-bottom-left-radius: 0px;
      margin: 20px auto 0px;
    }
  }
  label {
    margin-top:20px;
    display: inline-block;
    width: 80%;
    font-weight: bold;
    color: white;
    font-size: 1em;
    background: $medium-gray;
    padding: 10px;
    border-radius: 3px;
    @media screen and ( min-width: 600px ){
      width: 180px;
      border-top-right-radius: 0px;
      border-bottom-right-radius: 0px;  
    }

  }
  small {
    display: block;
    font-size:0.8em;
    color: $light-medium-gray;
    text-align: left;
    width: 80%;
    margin: 7px auto;
    font-style:oblique;
    @media screen and ( min-width: 600px ){
      width: calc(100% - 40px);
    }
    button {
      margin-left: 5px;
      background: $bold-blue;
    }
  }
  .articleform__exitbutton{
    position:absolute;
    color: white;
    font-size: 37px;
    font-weight: bold;
    left: 1%;
    top: 0%;
    background: transparent;
    border: 0px;
    cursor:pointer;
  }
  button{
    background: $red;
    color: white;
    border: 0px;
    padding: 4px 10px;
    font-size: 14px;
    border-radius: 3px;
    font-weight: bold;
  }
  .articleform__donebutton{
    display: block;
    font-size: 22px;
    background: $green;
    color: $black;
    padding: 10px 40px;
    margin: 20px auto;

  }
  img{
    display: block;
    margin: 10px auto;
    max-width: 80%;
  }
}

.articleform__notice{
  position: fixed;
  bottom:0;
  left:0;
  right:0;
  padding: 25px 0px;
  color: white;
  background: $green;
  text-align: center;
  font-size:2em;
  font-weight: bold;
  z-index:50;
  &.articleform__notice--draft{
    background: $yellow;
    color: $black;
  }
}
