.tsfem-form-collapse-wrap {
	width: 100%;
}

.tsfem-form-collapse {
	position: relative;
	width: 100%;
	padding: 0 20px 20px;
}

.tsfem-form-collapse-sub-wrap {
	padding-top: 15px;
}

.tsfem-form-collapse-sub-wrap .tsfem-form-collapse {
	padding: 0 0 15px;
}

.tsfem-form-collapse-sub-wrap .tsfem-form-collapse:last-of-type {
	padding: 0;
}

.tsfem-form-collapse > input[type="checkbox"] {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.tsfem-form-collapse > input[type=checkbox]:checked:before {
	content: none;
	float: none;
	margin: 0;
	width: 0;
}

.tsfem-form-collapse-header {
	position: relative;
	width: 100%;
	background: #fefefe;
	color: #23282d;
	box-shadow: 0 .1em 0.6em rgba(0,0,0,.18);
	-webkit-align-items: center;
	align-items: center;
	cursor: pointer;
	transition: box-shadow .33s;
	z-index: 1;
}

.tsfem-form-collapse-header-good .tsfem-form-collapse-icon {
	color: #0cc34b;
}

.tsfem-form-collapse-header-error .tsfem-form-collapse-icon {
	color: #dd3811;
}

.tsfem-form-collapse:nth-of-type(2n-1) > .tsfem-form-collapse-header {
	background: #f9f9f9;
}

.tsfem-form-collapse-header:hover,
.tsfem-form-collapse > input[type="checkbox"]:focus + .tsfem-form-collapse-header {
	box-shadow: 0 .1em .5em .1em rgba(0,0,0,.25);
}

.tsfem-form-collapse > input[type="checkbox"]:active + .tsfem-form-collapse-header,
.tsfem-forum-collapse-header:active {
	box-shadow: 0 .1em .7em .3em rgba(0,0,0,.28);
}

.tsfem-form-collapse-title-wrap {
	line-height: 1.15em;
	font-size: 1.15em;
	vertical-align: middle;
	padding: 14px 0;
	margin: 0 2.3em 0 14px;
}

.tsfem-form-title-icon:before {
	display: inline-block;
	width: 19px;
	line-height: inherit;
	font-family: dashicons;
	font-style: normal;
	font-weight: 400;
	font-size: inherit;
	vertical-align: bottom;
	line-height: 1em;
	content: "";
	margin-right: 2px;
}

.tsfem-form-title-icon-okay:before,
.tsfem-form-title-icon-good:before {
	color: #0cc34b;
	font-size: 1.1em;
	content: "\f147";
	margin-left: -2px;
	margin-right: 4px;
}
.tsfem-form-title-icon-okay:before,
.tsfem-form-title-icon-warning:before {
	color: #ffa01b;
}
.tsfem-form-title-icon-warning:before {
	content: "\f227";
}

.tsfem-form-title-icon-error:before,
.tsfem-form-title-icon-bad:before {
	color: #dd3811;
	content: "\f227";
}
.tsfem-form-title-icon-error:before {
	content: "\f153";
}

.tsfem-form-title-icon-unknown:before {
	content: "\f223";
}

.tsfem-form-collapse-icon {
	position: relative;
	max-width: 18px;
	max-height: 3px;
}

.tsfem-form-collapse-icon:before,
.tsfem-form-collapse-icon:after {
	content: "";
	position: absolute;
	width: 6px;
	right: 20px;
	top: 0;
	height: 1px;
	border: 1px solid;
	border-radius: 3px;
	transition: all 0.5s ease-in-out;
	background: currentColor;
}

.tsfem-form-collapse-icon:before {
	-webkit-transform: translate(-2px, 0) rotate(-45deg);
	transform: translate(-2px, 0) rotate(-45deg);
}

.tsfem-form-collapse-icon:after {
	-webkit-transform: translate(2px, 0) rotate(45deg);
	transform: translate(2px, 0) rotate(45deg);
}

/* TODO might be a performance hit: */
.tsfem-form-collapse > input[type="checkbox"]:checked + .tsfem-form-collapse-header .tsfem-form-collapse-icon:before {
	-webkit-transform: translate(-2px, 0) rotate(45deg);
	transform: translate(-2px, 0) rotate(45deg);
}

/* TODO might be a performance hit: */
.tsfem-form-collapse > input[type="checkbox"]:checked + .tsfem-form-collapse-header .tsfem-form-collapse-icon:after {
	-webkit-transform: translate(2px, 0) rotate(-45deg);
	transform: translate(2px, 0) rotate(-45deg);
}

.tsfem-form-collapse-content {
	display: block;
	position: relative;
	margin: 0;
	padding: 0;
	box-shadow: 0 2px 3px 1px #ccc;
	width: 100%;
	-webkit-animation: tsfemForm-fade-in .25s;
	animation: tsfemForm-fade-in .25s;
}

.tsfem-form-collapse > input[type="checkbox"]:checked ~ .tsfem-form-collapse-content {
	display: none;
}

@keyframes tsfemForm-fade-in {
	from {
		opacity: 0;
	} to {
		opacity: 1;
	}
}

/**------------------------------------
 * # FLEX SETTINGS
 * ------------------------------------ */
/*
h4.tsfem-form-multi-title {
	margin: 0;
}*/

.tsfem-form-multi-setting,
.tsfem-form-iterator-setting,
.tsfem-form-iterator-selector-wrap,
.tsfem-form-setting {
	width: 100%;
	-webkit-flex-direction: row;
	flex-direction: row;
}

.tsfem-form-multi-setting-label,
.tsfem-form-multi-setting-input,
.tsfem-form-iterator-setting-label,
.tsfem-form-iterator-setting-input,
.tsfem-form-setting-label,
.tsfem-form-setting-input {
	background-color: #fff;
	padding: 15px 12px;
	-webkit-flex: 10 1 350px;
	flex: 10 1 350px;
	box-shadow: 0 0 0 1px #e9e9e9;
}

.tsfem-form-multi-setting-label,
.tsfem-form-iterator-setting-label,
.tsfem-form-setting-label {
	background-color: #f9f9f9;
	-webkit-flex: 1 1 250px;
	flex: 1 1 250px;
}

.tsfem-form-multi-setting-label-item,
.tsfem-form-iterator-setting-label-item,
.tsfem-form-setting-label-item,
.tsfem-form-setting-action {
	-webkit-flex-wrap: nowrap;
	-ms-flex-wrap: nowrap;
	flex-wrap: nowrap;
	-webkit-flex-direction: row;
	flex-direction: row;
	-webkit-justify-content: space-between;
	justify-content: space-between;
	-webkit-flex-grow: 0;
	flex-grow: 0;
}

.tsfem-form-multi-setting-input,
.tsfem-form-iterator-setting-input,
.tsfem-form-setting-input,
.tsfem-form-setting-label-inner-wrap {
	-webkit-justify-content: center;
	justify-content: center;
}

.tsfem-form-setting-label-inner-wrap {
	will-change: contents;
}

.tsfem-form-multi-setting-label-inner-wrap,
.tsfem-form-select-multi-a11y-label-inner-wrap,
.tsfem-form-iterator-setting-label-inner-wrap {
	-webkit-justify-content: flex-start;
	justify-content: flex-start;
}

.tsfem-form-multi-setting-label-item > *,
.tsfem-form-iterator-setting-label-item > *,
.tsfem-form-setting-label-item > * {
	margin-right: 4px;
}

.tsfem-form-multi-setting-label-item > *:last-child,
.tsfem-form-iterator-setting-label-item > *:last-child,
.tsfem-form-setting-label-item > *:last-child {
	margin-right: 0;
}

.tsfem-form-setting-action {
	margin-top: 1em;
}

.tsfem-form-setting-input textarea {
	max-height: 250px;
}

.tsfem-form-option-title.tsfem-form-option-has-description {
	margin: 0 0 0.5em;
}

.tsfem-form-option-description {
	margin: .5em 0;
}

.tsfem-form-option-description:last-of-type {
	margin: .5em 0 0;
}

.tsfem-form-validate .tsfem-form-setting-input input[type=text],
.tsfem-form-validate .tsfem-form-setting-input input[type=password],
.tsfem-form-validate .tsfem-form-setting-input input[type=tel],
.tsfem-form-validate .tsfem-form-setting-input input[type=url],
.tsfem-form-validate .tsfem-form-setting-input input[type=search],
.tsfem-form-validate .tsfem-form-setting-input input[type=time],
.tsfem-form-validate .tsfem-form-setting-input input[type=week],
.tsfem-form-validate .tsfem-form-setting-input input[type=month],
.tsfem-form-validate .tsfem-form-setting-input input[type=date],
.tsfem-form-validate .tsfem-form-setting-input input[type=number],
.tsfem-form-validate .tsfem-form-setting-input input[type=range],
.tsfem-form-validate .tsfem-form-setting-input input[type=color],
.tsfem-form-validate .tsfem-form-setting-input input[type=hidden],
.tsfem-form-setting-input select,
.tsfem-form-setting-input textarea {
	display: inline-block;
	width: 100%;
}

.tsfem-form-image-buttons-wrap {
	margin-top: 1.15em;
	margin-left: 1px;
	vertical-align: top;
	line-height: 1em;
}

.tsfem-form-image-buttons-wrap button {
	margin-right: 1.15em;
}

.tsfem-form-image-buttons-wrap button:last-of-type {
	margin-right: 0;
}

.tsfem-form-multi-select-wrap {
	max-height: 350px;
	padding: 0px 15px;
	box-shadow: 0 0 0 1px #e9e9e9;
	overflow: hidden;
	overflow-y: auto;
	position: relative; /* For traps */
}

.tsfem-form-multi-select-wrap-row ul {
	display: -webkit-box;
	display: -webkit-flex;
	display: flex;
	-webkit-flex-direction: row;
	flex-direction: row;
	-webkit-flex-wrap: wrap;
	flex-wrap: wrap;
	-webkit-justify-content: flex-start;
	justify-content: flex-start;
}

.tsfem-form-multi-select-wrap-row ul li {
	margin: 7px 14px 7px 0;
}

/* Indent second or later */
.tsfem-form-multi-a11y-wrap .tsfem-form-multi-a11y-wrap {
	margin-left: 20px;
}

/* Timer */
.tsfem-form-iterator-timer {
	height: 3px;
	width: 100%;
	display: block;
	box-shadow: 0px 1px 3px 0px #ccc;
}

.tsfem-form-iterator-timer span {
	height: 3px;
	width: 0%;
	max-width: 100%;
	display: block;
	background: #057c99;
}

.tsfem-form-iterator-timer-invalid span {
	background: #d14b44;
}

/**------------------------------------
 * # VALIDATORS
 * ------------------------------------ */

/* So important when SCRIPT_DEBUG... */
.tsfem-form-checkbox-required {
	height: 100% !important;
	width: 0 !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	pointer-events: none;
	position: absolute;
	opacity: 0;
	top: 0;
	left: 0;
}

/* TODO?
input[type=checkbox]
input[type=radio]
*/
.tsfem-form-validate .tsfem-form-setting-input input[type=text]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=password]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=tel]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=url]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=search]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=time]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=week]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=month]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=date]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=number]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=range]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=color]:invalid,
.tsfem-form-validate .tsfem-form-setting-input input[type=hidden]:invalid,
.tsfem-form-validate .tsfem-form-setting-input select:invalid,
.tsfem-form-validate .tsfem-form-setting-input textarea:invalid,
.tsfem-form-validate .tsfem-form-multi-invalid {
	border-left: 3px solid #d14b44;
}

.tsfem-form-validate .tsfem-form-setting-input input[type=text]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=password]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=tel]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=url]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=search]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=time]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=week]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=month]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=date]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=number]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=range]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=color]:valid,
.tsfem-form-validate .tsfem-form-setting-input input[type=hidden]:valid,
.tsfem-form-validate .tsfem-form-setting-input select:valid,
.tsfem-form-validate .tsfem-form-setting-input textarea:valid,
.tsfem-form-validate .tsfem-form-multi-valid {
	border-left: 3px solid #008964;
}

.tsfem-form-validate .tsfem-form-setting-input input[type=text]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=password]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=tel]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=url]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=search]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=time]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=week]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=month]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=date]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=number]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=range]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=color]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input input[type=hidden]:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input select:invalid:focus,
.tsfem-form-validate .tsfem-form-setting-input textarea:invalid:focus {
	border-color: #0ebfe9;
}
