// main: ../admin.scss

.cmb2-postbox .wp-quiz-meta-box-wrap {
	.inside {
		margin: 0;
		padding: 0;
	}

	.cmb-row {
		margin-bottom: 0;
		padding-top: 1.8em;
		padding-bottom: 1.8em;

		&.cmb2-id-wp-quiz-trivia-content-settings > .cmb-td { width: 100%; }

		&:not(:last-of-type) {
			border-bottom: 1px dashed #ddd;
		}

		&:not(.cmb-type-title):last-of-type { padding-bottom: 1.8em; }
	}

	.cmb2-wrap .cmb-row {

		.cmb-th {
			-webkit-box-sizing: border-box;
							box-sizing: border-box;
			width: 20%;
			max-width: 200px;
			padding: 0 15px;
		}

		.cmb-td {
			-webkit-box-sizing: border-box;
							box-sizing: border-box;
			width: 80%;
			padding: 0 20px;
		}

		.cmb-th label {
			padding: 10px 0 0;
		}
	}

	input[type=text],
	textarea {
		width: 100%;

		border: 1px solid #ddd;
		border-radius: 0;
		-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
						box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
	}



	select:not([multiple]) {
		line-height: 1.2;

		height: 36px;

		background-color: #fff;
		background-image: url(../images/dropdown.png);
		background-repeat: no-repeat;
		background-position: center right 15px;

		-webkit-appearance: none;
			 -moz-appearance: none;
	}


	@at-root .select2-container .select2-dropdown {

		border-color: #e5e5e5;

		.select2-results__option {
			margin-bottom: 0;

			&[aria-selected=true] {
				display: none;
			}
		}
	}


	.wp-picker-container {
		.wp-picker-holder {
			position: absolute;
			z-index: 999;
		}

		.wp-picker-input-wrap {
			vertical-align: top;
		}

		input[type=text].wp-color-picker {
			width: 70px;
			height: 100%;
			padding: 5px 5px;
		}
	}

	// .wp-picker-container {
	// 	display: inline-block;

	// 	.wp-picker-input-wrap {
	// 		vertical-align: top;
	// 	}

	// 	.wp-color-picker {
	// 		padding: 3px;
	// 	}

	// 	.wp-picker-holder {
	// 		position: absolute;
	// 		z-index: 2;
	// 	}
	// }

	// Quiz content
	.cmb-type-quiz-content {
		padding-top: 0;
		padding-bottom: 0;

		> .cmb-td {
			width: 100%;
		}
	}
}

.cmb2-wrap .cmb-row {
	padding: 15px 0;

	border-bottom: 1px solid #ededed;
}

// Switch field
.cmb2-wrap .cmb2-radio-list {
	position: relative;

	display: inline-block;

	padding: 0;

	vertical-align: middle;

	&:before,
	&:after {
		display: table;
		clear: both;

		content: '';
	}

	li {
		float: left;

		margin: 0;
		padding: 0;

		&:first-child label {
			border-right: 0;
			border-radius: 3px 0 0 3px;
		}

		&:last-child label {
			border-left: 0;
			border-radius: 0 3px 3px 0;
		}
	}

	input {
		display: none;
	}

	label {
		line-height: 36px;

		display: inline-block;

		-webkit-box-sizing: border-box;
						box-sizing: border-box;
		height: 36px;
		padding: 0 17px;

		white-space: nowrap;

		border: 1px solid #e5e5e5;
		background: #f7f7f7;
	}

	input:checked + label {
		color: #fff;
		border-color: #007bad #007bad #007bad;
		background: #0087be;
	}

	li:first-child input:checked[value='off'] + label {
		color: inherit;
		border-color: #d6d6d6 #d6d6d6 #d6d6d6;
		border-right: 0;
		background: #e5e5e5;
	}
}

.cmb-type-textarea-code {
	.cmb-remove-row-button {
		z-index: 1000;
	}

	.cmb-repeat-row {
		.cmb2-textarea-code,
		.cmb-td {
			width: 100%;
		}
	}
}

.cmb2-textarea-code {
	width: 100% !important;
}

// Aweber field.
.aweber-wrapper {
	&.connected {
		.aweber-app-id-step,
		.aweber-auth-code-step {
			display: none;
		}
	}

	&.unconnected {
		.aweber-list-id-step,
		.aweber-auth-code-step {
			display: none;
		}
	}
}

.cmb2-wrap select,
.cmb2-wrap textarea,
.cmb2-wrap .regular-text,
.cmb2-wrap .cmb2-text-small,
.cmb2-wrap .select2-container--default .select2-selection--single {
	width: 100%;
	height: 36px;
	padding: .75em .6em;

	-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
	-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
					transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
					transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
					transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;

	border-color: #e5e5e5;
	border-radius: 3px;
	-webkit-box-shadow: inset 0 1px 6px rgba(0,0,0,.08);
					box-shadow: inset 0 1px 6px rgba(0,0,0,.08);
}

.select2-container--default {
	.select2-selection--multiple {
		height: 42px;
		padding-top: 6px;

		border-color: #e5e5e5 !important;
		border-radius: 3px;
		-webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, .08);
						box-shadow: inset 0 1px 6px rgba(0, 0, 0, .08);

		.select2-selection__choice {
			border: 1px solid #ccc !important;
			background-color: #f1f1f1 !important;
		}

		.select2-selection__rendered li {
			font-size: 13px;

			margin-top: 3px;
			margin-bottom: 0;
			padding: 3px 5px;

			border-radius: 2px;

			input {
				margin-top: 0;
			}

			.select2-selection__choice__remove {
				float: right;

				margin-right: 0;
				margin-left: 2px;
			}
		}
	}
}

.cmb2-wrap select {
	padding-top: 0;
	padding-bottom: 0;
}
