/**/

/* "normal" state */
.checkbox + label:before {
    background: rgb(255, 255, 255);
    border: 1px solid rgb(216, 216, 216);
}

/* transitionned state when checked */
.checkbox:checked + label:before {
    background: #111;
    border-color: #111;
}

/* applying transition */
.checkbox + label:before {
    transition: 
      background .2s, 
      border-color .2s;
    /* double transition, yup ! */  
}



/* Let's animate the mark */
.checkbox:not(:checked) + label:after {
    transform: scale(0);
}
.checkbox:checked + label:after {
    transform: scale(1);
}
.checkbox + label:after {
    transition: transform .4s;
}



/****** 2. Let's shake this form  ******/

/* Creating the animation */
@keyframes shakeMe {
    0%, 100% {
        transform: translateX(0);
    }
    20%,
    60% {
        transform: translateX(-10px);
    }
    40%,
    80% {
        transform: translateX(10px);
    }
}


/* Applying the animation */
.errors {
    animation-name: shakeMe;
    animation-duration: .5s;
}




/****** Here come the unicorns, aka all the styling not useful for the animation demo at the conference :)  ******/

/* body {
    background: #ffd647;
    font-family: 'Raleway', sans-serif;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}*/


.form {
	border-top: 5px #111 solid;
    background: #fff;
    color: rgb(99, 99, 99);
    border-radius: 4px;
    /*width: 300px;
    margin: 0 auto;*/
    padding: 20px 30px;
	box-shadow: 0 0 15px rgba(0,0,0,0.1);}
.form h1 {
        text-transform: uppercase;
        font-weight: bold;
        font-size: 1.5em;
        text-align: center;
        margin: 0 0 25px;
        padding: 10px 0px;
        border-bottom: 1px solid rgb(220, 220, 220);
		color: #111;    
}

form p {
    position: relative;
    margin: 15px 0 10px 0 ;
    position: relative;
}


p.remember {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgb(220, 220, 220);
}
.email label,
.password label,
.text label,
.input {
    display: block;
    width: 100%;
	color: #111;
	font-weight: normal;
    padding-bottom: 10px;
    box-sizing: border-box;
}


/* Submit button Styling */

[type="submit"] {
    display: block;
    color: #111;
    font-weight: bold;
    border-radius: 2px;
    background: #ffd647;
    box-shadow: 5px 5px 0 0 #ffd647,
      inset 4px 4px 0 0 white;
    border: 2px solid #111; 
    border-radius: 3px;
    padding: 10px;
    width: 100%;
	font-size: 1.1em;
    margin: 50px auto 30px;
    transition: background .3s;
    /*&:hover {
        background: white;
    box-shadow: 5px 5px 0 0 #ffd647,
      inset 4px 4px 0 0 white;
    }
  
    &:active,
    &:focus {
        // outline: none;
       //  background: darken(#ffd647, 10%);
    }*/
}
[type="submit"]:hover {
    background: white;
    box-shadow: 5px 5px 0 0 #ffd647,
    inset 4px 4px 0 0 white;
    }
[type="submit"]:active, [type="submit"]:focus {
	outline: none;
	background: darken(#ffd647, 10%);
    }

[type="password"],
[type="email"],
[type="text"] {
    padding: 20px;
    /*&:focus {
        outline: none;
    }*/
}
/* Styling the input */

.input {
    font-size: 1em;
    background: rgb(255, 255, 255);
    border: 1px solid rgb(220, 220, 220);
	padding: 10px;
	height: auto;
    transition: border-color .4s, box-shadow 1s;
}

.input:active,
.input:focus {
    border: 1px solid #555;
    box-shadow: 4px 4px 0 #e6e6e6;
}


/* Removing the checkbox from screen */
.checkbox {
    position: absolute;
    left: -300%;
}
.checkbox + label {
    position: relative;
    padding-left: 25px;
    cursor: pointer;
}

/* Creating the fake checkbox */
.checkbox + label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 15px;
    height: 15px;
    border-radius: 2px;
}

/* accessibility */
.checkbox:focus + label:before {
    border: 1px solid #111;
    box-shadow: 4px 4px 0 #EEE;
}

/* Adding the SVG mark */

.checkbox + label:after {
    content: " ";
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10.7 8.7" enable-background="new 0 0 10.7 8.7"><path fill="white" d="M4.2 8.7c-.3 0-.5-.3-.7-.5l-3.2-3.1c-.4-.4-.4-1.1 0-1.5s1-.4 1.4 0l2.4 2.3 4.9-5.6c.4-.4 1-.5 1.4-.1.4.4.5 1 .1 1.4l-5.6 6.6c-.1.2-.4.5-.7.5z"/></svg>') no-repeat; /* OMG you can embed SVG in background, awesoome */
    position: absolute;
    left: 2px;
    top: 3px;
    width: 13px;
    height: 13px;
}



/****** Validation messages ******/

.invalid {
    border-color: rgb(183, 0, 76);
}

.required {
    border-color: #B54300;
}

.validation {
  display: block;
  font-size: .8em;  
  padding-top: .5em;
  position: absolute;
	top:-3px;
  right:0;
  opacity: 0;
  transition: opacity 1s ;
}

.validation.req {
  color: #B54300;
}

.validation.error {  
  color: rgb(183, 0, 76); 
}


.invalid:not(.required)  ~ .validation.error {
  opacity: 1;
  transform: scale(1);   
}

.required  ~ .validation.req {
  opacity: 1;
  transform: scale(1);   
}



