// @import 'foundation';
@import url('https://fonts.googleapis.com/css?family=Roboto:300,500');

$normal: 300;
$bold: 500;

$blue: #29abe2;
$purple: #4f2e8c;
$white: #fff;
$red: #721c24;

html,
body {
  min-height: 100vh;
}

body {
  color: darken($white, 70%);
  display: flex;
  flex-direction: column;
  font-family: 'Roboto', sans-serif;
  font-weight: $normal;
  margin: 0;
  padding: 0;
}

footer {
  background: $purple;
  padding: 1.5em 1em;
  text-align: center;

  a {
    color: $white;
  }
}

h1 {
  color: darken($white, 90%);
  font-size: 2em;
  font-weight: $bold;
  line-height: 1;
  margin: 1em 1em 1.5em;
  text-align: center;
  text-transform: uppercase;
}

a {
  color: $blue;
  text-decoration: none;
}

strong {
  color: darken($white, 90%);
  font-weight: $bold;
}

b {
  font-weight: $bold;
}

header {
  margin: 3em auto 2em;
  max-width: 640px;
  width: 90%;
}

main {
  flex: 1;
  margin: 0 auto 4em;
  max-width: 640px;
  width: 90%;
}

form {
  display: block;
  margin: 2.5em 0 0;
}

.control {
  margin: 2em 0 0;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0 -.3em;
  text-align: center;
}

label {
  color: darken($white, 90%);
  display: block;
  font-weight: $bold;
  margin: 0 0 .5em;
  text-transform: uppercase;

  small {
    color: darken($white, 70%);
    display: inline-block;
    font-size: 1em;
    font-weight: $normal;
    margin: 0 0 0 .5em;
    text-transform: none;
  }

  &.radio {
    border: 1px darken($white, 30%) solid;
    cursor: pointer;
    display: inline-block;
    flex: 1;
    font-weight: $normal;
    height: 2.8em;
    line-height: 2.8;
    margin: 0 .3em;
    padding: 0;
    text-align: center;
    text-transform: none;
  }

  &.checkbox {
    border: 1px darken($white, 30%) solid;
    border-radius: 999px;
    cursor: pointer;
    display: inline-block;
    flex: 1;
    font-weight: $normal;
    height: 2.1em;
    line-height: 2.1;
    margin: .5em .3em;
    max-width: 50%;
    padding: 0 1em;
    text-align: center;
    text-transform: none;
    white-space: nowrap;

    @media screen and (max-width: 420px) {
      max-width: none;
    }
  }

  &.check {
    cursor: pointer;
    font-weight: $normal;
    padding: 0 0 0 2em;
    text-transform: none;

    span {
      background: $white;
      border: 1px darken($white, 30%) solid;
      display: inline-block;
      height: 1em;
      margin: -.25em .6em 0 -2em;
      vertical-align: middle;
      width: 1em;
    }
  }
}

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

[type=radio],
[type=checkbox] {
  display: none;

  &:checked + label,
  &:checked + span {
    background: $purple;
    border: 1px darken($purple, 10%) solid;
    color: $white;
  }
}

select,
[type=text] {
  background: $white;
  border: 0;
  border-bottom: 1px darken($white, 30%) solid;
  font-size: 1.2em;
  font-weight: $normal;
  height: 2.2em;
  line-height: 2.2;
  padding: 0;
  width: 100%;

  &:focus {
    border-bottom: 1px $purple solid;
    outline: none;
  }
}

button {
  background: $purple;
  border: 1px darken($purple, 10%) solid;
  color: $white;
  cursor: pointer;
  font-size: 2em;
  font-weight: $normal;
  height: 2.3em;
  line-height: 2.3;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
}

.errors {
  background: lighten($red, 60%);
  border: 1px lighten($red, 50%) solid;
  color: $red;
  padding: 1.2em 1.5em;

  ul {
    margin: 1em 0 0;
    padding: 0 0 0 2em;
  }

  li {
    margin: 0;
    padding: .2em 0;
  }
}

.social {
  list-style: none;
  margin: 2em 1em 2em 6em;
  padding: 0;

  @media screen and (max-width: 550px) {
    margin: 2em 1em;
  }

  li {
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 1.7em auto;
    font-size: 1.5em;
    margin: 1.5em 0;
    padding: 0 0 0 2.4em;

    @media screen and (max-width: 460px) {
      font-size: 1em;
    }

    &.twitter {
      background-image: image-url('icon-twitter.svg');
    }

    &.instagram {
      background-image: image-url('icon-instagram.svg');
    }

    &.telegram {
      background-image: image-url('icon-telegram.svg');
    }

    &.facebook {
      background-image: image-url('icon-facebook.svg');
    }

    &.whatsapp {
      background-image: image-url('icon-whatsapp.svg');
    }
  }

  strong {
    display: block;
    margin: 0 0 .2em;
  }

  span {
    color: $blue;
  }
}
