/**
 * Checkator jQuery Plugin
 * A plugin for radio and checkbox elements
 * version 1.1, Dec 20th, 2013
 * by Ingi P. Jacobsen
 *
 * CSP-safe layout: holder size / source opacity use classes instead of
 * jQuery .css() style attributes (blocked by style-src-attr).
 */

/* RESET */
input[type=radio],
input[type=checkbox] {
	margin-bottom: 0;
}

/* SOURCE ELEMENT (when checkator is enabled on an element) */
.checkator_source {
	position: absolute;
	z-index: 2;
	display: block;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/* Holders that page CSS sizes "auto" (e.g. .newWrapper .checkbox-inline) collapse to 0x0 now that the
	   source is absolute; keep a clickable area over the drawn box. */
	min-width: 13px;
	min-height: 13px;
	margin: 0;
	cursor: pointer;
}

/* SHARED SETTING */
.checkator_holder { /* Holder for the new element */
	display: inline-block;
	position: relative;
	vertical-align: middle;
}
/* Matches typical browser checkbox outer box (pre-CSP outerWidth/outerHeight) */
.checkator_holder_sized {
	width: 13px;
	height: 13px;
	vertical-align: middle;
	margin-right: 10px;
}
/* Hidden source checkboxes (signup roletypechkbox, etc.) — see fm.checkator.jquery.js */
.checkator_holder.csp-checkator-holder-hidden {
	display: none !important;
	visibility: hidden !important;
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}
.checkator_source_invisible {
	opacity: 0 !important;
	margin: 0 !important;
}
.checkator_holder.csp-chk-holder-float {
	float: left !important;
}
.checkator_element { /* New element */
	border: 2px solid #abadb3;
	background-color: #fff;
	display: block;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	box-sizing: border-box;
}
.checkator_source:checked+.checkator_element:after { /* Checked element fill */
	background-color: #9C0300;
	display: block;
	content: ' ';
	top: 0%;
	right: 0%;
	bottom: 0%;
	left: 0%;
	border: 2px solid #fff;
	position: absolute;
	box-sizing: border-box;
}
.checkator_source:focus+.checkator_element { /* Focused element */
	border: 2px solid #cc0;
}
.checkator_source:hover+.checkator_element { /* Hovered element */
	/* Bug: There is a bug in chrome preventing this from working correctly */
	background-color: #def;
	border: 2px solid #79b;
}


/* RADIO SETTINGS */
.checkator_element.radio {
	border-radius: 50% !important;
}
.checkator_element.radio:after {
	border-radius: 50% !important;
}

/* CHECKBOX SETTINGS */
.checkator_element.checkbox { /* New element */
	border: 2px solid #D3D3D3;
}
