/* ---------------- 
 reset
---------------- */
*, *::after, *::before {
  box-sizing: border-box;
  margin: 0;
}

/* ---------------- 
  form elements reset
---------------- */
@supports (-webkit-appearance: none) or (-moz-appearance: none) {
  input[type='checkbox'],
  input[type='radio'],
  select,
  button,
  input[type=number]::-webkit-inner-spin-button,
  input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    margin: 0;
  }
}

@supports (-moz-appearance: textfield) {
  input[type=number] {
    appearance: textfield;
    margin: 0;
  }
}

/* ---------------- 
  media query mixin
---------------- */
/* ---------------- 
  colors
---------------- */
:root {
  --light: rgba(248,249,250,1);
  --dark: rgba(52, 58, 64, 1);
  --neutral-l: rgba(167, 220, 207, 1);
  --neutral-d: rgba(90, 140, 127, 1);
  --primary:  rgba(238,97,35,1);
  --primary-l: rgba(241, 118, 65, 0.9);
  
  --gradient: linear-gradient(90deg, #a7dccf, #9dd8c2, #95cd98, #a7b75a, #c89723, #e4731a, #ee6123);
}

/* ---------------- 
 global styles
---------------- */
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--light);
  background: linear-gradient(0deg, #f8f9fa 90%, rgba(236, 240, 241, 0) 97%, rgba(236, 240, 241, 0) 100%), url(https://res.cloudinary.com/bobbymaru/image/upload/v1604928350/Survey%20form/mountains-bg_dxkl4u.png);
  background-repeat: no-repeat, no-repeat;
  color: var(--dark);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.75;
  display: flex;
  justify-content: center;
  margin: 0;
}

h1, .question {
  font-family: 'Montserrat', sans-serif;
}

h1 {
  font-size: 2.488rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 0;
}

small, span {
  font-size: 0.875rem;
}

a {
  color: var(--primary-l);
}

.question {
  font-size: 1.44rem;
}

/* ---------------- 
 layout styles
---------------- */
#wrapper {
  background-color: var(--light);
  border-radius: 0.5em;
  margin: 4em 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  max-width: 35.556em;
}

#survey-form {
  padding: 1em;
}

.form-control {
  color: var(--dark);
  padding: 1em 0 2em 0;
  position: relative;
}

#description {
  padding-bottom: 1em;
}


#photo-credit{
  display: flex;
  padding-bottom: 2em;
  justify-content: space-between;
}

/* ---------------- 
 general input styles
---------------- */
input:focus::placeholder, textarea:focus::placeholder {
  color: transparent;
}

.input-area {
  width: 100%;
  display: block;
  outline: none;
  /* removes default focus */
  background-color: var(--light);
  border: 2px solid var(--neutral-l);
  border-radius: 0.25em;
  font-size: inherit;
  padding: 0.5em;
  transition: 0.3s ease;
}

.input-area:hover, .input-area:focus {
  border: 2px solid var(--primary);
}

.selectable, #submit {
  cursor: pointer;
  padding-bottom: 0.5em;
}

/* arrow on select dropdown */
#dropdown {
  background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='UTF-8' standalone='no'?%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg width='100%25' height='100%25' viewBox='0 0 8 5' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;fill:%23D3D3D3'%3E%3Cpath d='M2.798,4.266c0.406,0.405 1.063,0.405 1.468,0c0.654,-0.654 1.637,-1.636 2.494,-2.494c0.297,-0.297 0.386,-0.743 0.225,-1.131c-0.16,-0.388 -0.539,-0.641 -0.959,-0.641c-1.524,0 -3.464,0 -4.988,0c-0.42,0 -0.798,0.253 -0.959,0.641c-0.161,0.388 -0.072,0.834 0.225,1.131c0.858,0.858 1.84,1.84 2.494,2.494Z'/%3E%3C/svg%3E");
  background-size: 1em;
  background-position: top 0.9rem right 1rem;
  background-repeat: no-repeat;
}

.gender, .coding-sites, .method {
  display: flex;
}

.gender, .method {
  flex-wrap: wrap;
}

.gender label, .method label {
  cursor: pointer;
  flex-basis: 100%;
}

@media (min-width: 650px) {
  .gender label, .method label {
    flex-basis: 50%;
  }
}

.coding-sites {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

textarea {
  font-family: inherit;
  height: 10em;
  resize: none;
}

#submit {
  color: var(--light);
  background: var(--primary-l);
  padding: 1em;
  border: none;
}

#submit:hover {
  background: var(--primary);
}

/* ------------------
 checkbox and radio
-------------------- */
input[type="radio"], input[type="checkbox"] {
  display: inline-block;
  position: relative;
  top: 0.25em;
  margin-right: .25rem;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  outline: none;
  /* removes default focus */
  background: var(--active-bg, var(--light));
  border: 2px solid var(--active-border, var(--neutral-l));
  transition: 0.3s ease;
}

input[type="radio"]:hover, input[type="checkbox"]:hover {
  border: 2px solid var(--primary);
}

input[type="radio"]:checked, input[type="checkbox"]:checked {
  --active-bg: var(--primary);
  --active-inner: #fff;
  --active-border: var(--primary);
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="radio"]::after {
  content: '';
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--active-inner, var(--light));
}

input[type="checkbox"] {
  border-radius: 20%;
}

input[type="checkbox"]::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 9px;
  border: 2px solid var(--active-inner, var(--light));
  border-top: 0;
  border-left: 0;
  left: 5px;
  top: 1px;
  transform: rotate(35deg);
}

/* ------------------
 likert
-------------------- */
.likert-scale {
  margin: 1em 0;
}

.likert {
  padding: 2em 0;
  border-top: 1px solid var(--neutral-l);
}

.likert ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 2em 0;
  /* bar */
}

.likert ul::before {
  content: '';
  position: absolute;
  left: 3%;
  height: 0.375rem;
  margin: 0.5em 0;
  width: 92%;
  background-color: var(--neutral-l);
}

.likert li {
  text-align: center;
  font-size: 0.875rem;
}

.likert li input[type=radio] {
  display: block;
  left: 50%;
  margin-left: -0.625rem;
}

@media (min-width: 650px) {
  .likert li {
    font-size: 1.2rem;
  }
}

/* ---------------- 
progress bar 
---------------- */
.progress {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
}

.progress-bar {
  height: 0.75em;
  background: var(--neutral-l);
  background: var(--gradient);
  width: 0%;
}
