/* Kode skrevet av Aleksander Nilsson sist endret 15.10.2020 */
/* Kode sjekket av Elias W. Harvik-Wright 15.10.2020 */

#overskrift{
  margin-top: 50px;
  text-align: center;
}

h4{
  text-align: center;
}

form{ 
text-align: center;
background-color: honeydew;
padding-bottom: 10px;
border: 3px honeydew groove;
}

label { /* Tekst for feltene i formen */
  padding: 12px 12px 2px 0;
  display: block;
}

input, select{ 
  padding: 5px;
  border: 1px solid #ccc;
}

input[type=submit]{ /* Input knappen */
  margin: 15px auto;
  background-color: #D50035;
  padding: 15px 50px 15px 50px;
  color: whitesmoke;
  font-size: 1.3rem;
  letter-spacing: 2px;
}

textarea{ /* Textarea i form */
  width: 90%;
  resize: none;
  border: 1px solid #ccc;
}

.grid{ /* grid for å plassere slideshow knappene */
  display: grid;
  
}

.slideshow-container {
    margin: auto;

  }

  .navn{ /* Navn på kandidatene*/
    text-align: center;
    position: sticky;
    top: 10%;
    margin: 0;
    padding-top: 1rem;
    padding-bottom: 1rem;
    background-color: white;
  }
  

  .mySlides { /* Gjemmer bildene som default */
  display: none;
}
  
/* Next & previous knappene */
  .prev, .next { /* Next & previous knappene */
  cursor: pointer;
  position: absolute;
  width: auto;
  padding: 16px;
  color: black;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  user-select: none;
}

.kandidatBilde{
  width: 100%;
}
  
  
.next { /* Flytter next knappen til høyre */
  right: 0;
}
  
  
.fade { /* Fading animasjon på slideshow */
  -webkit-animation-name: fade;
  -webkit-animation-duration: 1.5s;
  animation-name: fade;
  animation-duration: 0.5s;
}
  
@-webkit-keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}
  
@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
  
}

.sticky{ /* Sørger for at slideshow blir med ned når man scroller */
  grid-row: 1;
  position: sticky;
  top: 10%;
  
}

.kandidatTekst{ /* beskrivelse av kandidatene */
  margin: 0.25rem 1rem 1rem 1rem;
  font-weight: 500;
  font-size: 1.1rem;
}

#count{
  position: absolute;
  left: 20%;
  padding: 1rem;
}

@media screen and (min-width: 1000px){ /* media query START */

  form{
    max-width: 70%;
    margin: auto;
  }

  .slideshow-container{
    max-width: 70%;
  }

  .kandidatBilde{
    width: 60%;
    margin: auto;
    display: block;
    margin-bottom: 20px;
  }

  .kandidatTekst{
    width: 70%;
    margin: auto;
    margin-bottom: 40px;
  }

  #overskrift{
    margin-top: 1rem;
  }


}