/*Custom checkbox
 * Hide the inputs. 
 */

.hiden_input {
  display: none;
}


/*
 * Then, style the label so it looks like however you want.
 * Here's a quick rundown of how I did it here:
 */


/*
 * Some basic positioning styles, and we give it the pointer cursor to show 
 * that it's clickable
 */

.lblForInput {
  display: inline-block;
  cursor: pointer;
  font-family: Arial;
}


/*
 * With how I decided to build this, the position: relative is super important.
 * We're going to position a pseudo element within this element(As it is the containing box)
 */

.lblForInput .divider {
  position: relative;
  line-height: 22px;
  margin-right: 4px;
}


/* 
 * Because we're using pseudo elements, a content property is required to make them appear.
 */

.lblForInput .divider:before,
.lblForInput .divider:after {
  content: '';
}


/*
 * We are using the :before peudo elemnt as the actual button,
 * then we'll position the :after over it. You could also use a background-image,
 * font-icon, or really anything if you want different styles.
 * For the specific style we're going for, this approach is simply the easiest, but
 * once you understand the concept you can really do it however you like.
 */

.lblForInput .divider:before {
  border: 1px solid #222021;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  display: inline-block;
}

.lblForInput .divider:after {
  background: #222021;
  width: 6px;
  height: 6px;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: 300ms;
  opacity: 0;
}

/*
 * This is the most important part of this whole file, if you understand what's happening here
 * you can really make this in so many different ways.
 * 
 * We start by selecting the input inside of the label, with "label input". From there we use the 
 * ":checked" selector to *only* select the input when it is checked. We then use the immediate sibling 
 * selector(+) to select the span, and then it's pseudo element :after(What we are using to mark the button)
 * Because we already styled the :after, all we have to do is set the opacity to 1, making it fade in.
 */
.lblForInput .hiden_input:checked+.divider:after {
  opacity: 1;
}


/* 
 * A little styling for the demo 
 */

.consensiPrivacy {
  background: #fbfbfb;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.7);
}