/*
*  Valori di defoult: color_input_active, color_input_inactive
*/

:root{
  --color_input_active: #ff6400; /** #COLOR INPUT ACTIVE  **/
  --color_input_inactive: lightgrey; /** #COLOR INPUT INACTIVE **/
  --color_border_input_inactive: lightgrey;
  --color_background_input: black;
  --color_font_input: white;

  --red: #d92d3b;

}
  .my_container_special_input{
    width: 100%;
    max-width: 500px;
  }
@media only screen and (max-width: 650px){
  .my_container_special_input{
    width: 95%;
    margin: auto;
  }
}
  .my_wrap_input,
  .my_wrap_input .my_div_animate_input,
  .my_wrap_input input {
    border-radius: 3px;
  }
  .my_wrap_input{
    width: 100%;
    height: auto;
    padding: 0;
    border: 1px solid var(--color_border_input_inactive);
    -webkit-box-shadow: 0 0px 0px 1px rgba(0, 0, 0, 0);
    box-shadow: 0 0px 0px 1px rgba(0, 0, 0, 0);
    position: relative;
  }
  .my_wrap_input.active{
    border-color: var(--color_input_active);
    -webkit-box-shadow: 0 0 0px 1px var(--color_input_active);
    box-shadow: 0 0 0px 1px var(--color_input_active);

  }
  .my_container_special_input .my_wrap_input input[type=text],
  .my_container_special_input .my_wrap_input input[type=password],
  .my_container_special_input .my_wrap_input input[type=email],
  .my_container_special_input .my_wrap_input input[type=number],
  .my_container_special_input .my_wrap_input input[type=tel]{
    width: 100%;
    height: 3em;
    border: 0px;
    padding-left: 1em;
    position: relative;
  }

  .my_container_special_input .my_wrap_input input{
    background: transparent;
  }
  .my_container_special_input .my_wrap_input input:focus,
  .my_container_special_input .my_wrap_input textarea:focus{
  color: var(--color_font_input);
  }


  .my_div_animate_input{
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100%);
    height: 100%;
    padding: 0 0 0 1em;
    font-size: 1.2em;
    color: var(--color_input_inactive);
    display: flex;
    align-items: center;
    cursor: text;
    background: var(--color_background_input);
    -webkit-transition: height 0.1s ease-in, width 0.1s ease-in, color 0s 0.10s ease-in, left 0s ease-in, padding 0s ease-in, font-size 0.1s, -webkit-transform 100ms cubic-bezier(0.4,0,0.2,1);    transition: height 0.1s ease-in, width 0.1s ease-in, color 0s 0.10s ease-in, left 0s ease-in, padding 0s ease-in, font-size 0.1s, -webkit-transform 100ms cubic-bezier(0.4,0,0.2,1);    -o-transition: height 0.1s ease-in, width 0.1s ease-in, transform 100ms cubic-bezier(0.4,0,0.2,1), color 0s 0.10s ease-in, left 0s ease-in, padding 0s ease-in, font-size 0.1s;    transition: height 0.1s ease-in, width 0.1s ease-in, transform 100ms cubic-bezier(0.4,0,0.2,1), color 0s 0.10s ease-in, left 0s ease-in, padding 0s ease-in, font-size 0.1s;    transition: height 0.1s ease-in, width 0.1s ease-in, transform 100ms cubic-bezier(0.4,0,0.2,1), color 0s 0.10s ease-in, left 0s ease-in, padding 0s ease-in, font-size 0.1s, -webkit-transform 100ms cubic-bezier(0.4,0,0.2,1);
  }

  .my_div_animate_input.textarea{
    -webkit-box-align: start;-ms-flex-align: start;align-items: flex-start;
    transition: height 0.0s ease-in, width 0.1s ease-in, transform 0ms cubic-bezier(0.4,0,0.2,1), color 0s 0.10s ease-in, left 0s ease-in, padding 0s ease-in, font-size 0.1s;
    padding: 1em 0 0 1em;
  }
  .my_div_animate_input.textarea.my_start_animate{
    -webkit-box-align: center;  -ms-flex-align: center; align-items: center;
  }
  .my_div_animate_input.my_start_animate{
    height: 1em;
    font-size: 95%;
    cursor: default;
    width: auto;
    -webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);transform: translateY(-50%);
    padding: 0 0.2em;
    left: 1em;
    top: -2px;
  }
  .my_input_focus{
    color: var(--color_input_active);
  }



/*============================
          CHECKBOX
============================*/
.wrap-checkbox{
  width: 2em;
  height: 2em;
  display: inline-block;
  position: relative;
  border: 1px solid grey;
  margin: 0.2em;
  transition: border 0.3s ease-in;
}
.border{
  border: 1px solid var(--color_input_active);
}
.wrap-image-checkbox{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}
.image-checkbox{
  width: 0%;
  height: auto;
  transition: width 0.25s ease-in-out;
}

.image-checkbox-active{
  width: 92%;
  -animation: checked 0.25s linear forwards; /* To out not animation */
}
@keyframes checked {
  100%{ width: 100%; }
}
.wrap-checkbox input[type="checkbox"]{
  opacity: 0;
}


/*==============
    TEXTAREA
=============*/
.my_container_special_input .my_wrap_input textarea{
  width: 100%;
  height: auto;
  border: 1px;
  padding-left: 1em;
  padding-top: 1em;
  position: relative;
  background: transparent;
  resize: none;
}


/*===========================
        ERROR INPUT
=============================*/

.error-input{
  width: 100%;
  height: auto;
  display: block;
  color: var(--red);
  font-size: 0.9em;
  position: relative;
  margin: 2px auto 0;
  top: 0;
  left: 0;
  animation: height_error 0.3s ease-in-out forwards;
}
@keyframes height_error {
  0% {opacity: 0;}
  100%{ opacity: 1;}
}
.error-input::before{
  width: 1em;
  height: 1em;
  display: inline;
  content: '!';
  color: var(--color_font_input);
  background: var(--red);
  position: relative;
  padding: 0 7px;
  border-radius: 100%;
  text-align: center;
  margin-right: 0.4em;
  font-size: 0.9em;
}

.success-input{
  width: 100%;
  height: auto;
  color: var(--color_input_active);
  font-size: 0.9em;
  position: relative;
  margin: 12px auto 0;
  top: 0;
  left: 0;
  -webkit-animation: height_success 0.3s ease-in-out forwards;
          animation: height_success 0.3s ease-in-out forwards;
}
@-webkit-keyframes height_success {
  0% {opacity: 0;}
  100%{ opacity: 1;}
}
@keyframes height_success {
  0% {opacity: 0;}
  100%{ opacity: 1;}
}
.success-input::before{
  width: 1em;
  height: 1em;
  display: inline;
  content: '\2713';
  color: var(--color_font_input);
  background: var(--color_input_active);
  position: relative;
  padding: 0 4px;
  border-radius: 100%;
  text-align: center;
  margin-right: 0.4em;
  font-size: 1em;
}


.success-submit, .error-submit{
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid var(--color_font_input);
  background: var(--color_background_input);
  z-index: 2;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
          justify-content: center;
}
.error-submit{
  z-index: 3 !important;
}
.success-submit::before{
  display: block;
  content: '\2713';
  color: var(--color_font_input);
  position: relative;
  padding: 0 4px;
  text-align: center;
  font-size: 1em;
  -webkit-transform: scale(1.6);
          transform: scale(1.6);
}

.error-submit::before{
  display: block;
  content: '\00d7';
  color: var(--color_font_input);
  position: relative;
  padding: 0 4px;
  text-align: center;
  font-size: 1em;
  -webkit-transform: scale(2);
          transform: scale(2);
}
