// sass-lint:disable class-name-format no-qualifying-elements id-name-format
.post-type-ctct_forms {

	.misc-pub-section {

		&.misc-pub-visibility,
		&.misc-pub-curtime {
			display: none;
		}
	}
}

body.post-type-ctct_lists .misc-pub-post-status {
	display: none;
}

body.post-type-ctct_forms #titlediv #title {
	height: 2.7em;
}

.ctct-admin-title-details {
	display: block;
	font-size: 0.6rem;
	line-height: 2rem;
}

#cmb2-metabox-ctct_1_optin_metabox {

	.cmb2-id--ctct-opt-in-instructions,
	.cmb2-id--ctct-opt-in {
		display: none;
	}
}

#ctct_0_list_metabox,
#ctct_1_custom_form_css_metabox,
#ctct_1_custom_input_css_metabox {

	.cmb-row {
		padding-bottom: 0;
	}
}

#cmb2-metabox-ctct_2_fields_metabox {

	.cmb2-id--ctct-title {
		padding: 0.8rem 0 1rem;
	}
}

#ctct_1_custom_form_css_metabox {

	.cmb2-id-form-title-title {
		padding: 0.8rem 0 1rem;
	}
}

#ctct_0_description_metabox,
#ctct_1_optin_metabox,
#ctct_2_fields_metabox {

	#custom_fields_group_repeat {

		.cmb-field-list .cmb-row:not(:last-of-type) {
			border-bottom: none;
			padding-bottom: 0.1em;
		}

		.required {
			padding-bottom: 0.1em;
			padding-top: 0.1em;
		}
	}

	#default_fields_group_repeat {

		.cmb-field-list {

			& > .cmb-row {
				padding-top: 0.5em;

				&:not(:last-of-type)  {
					border-bottom: 1px solid $color-light-gray;
					padding-bottom: 0.1rem;
				}
			}
		}
	}

	.cmb-repeat-group-wrap {
		padding: 0;

		.cmb-repeatable-grouping {
			margin: 0 0 1.5rem 0;

			.cmb-row {
				margin: 0 0 0 0.3rem;
			}
		}

		.cmb-repeat-group-field {
			padding-top: 0.2em;
		}
	}

	.postbox-container .cmb-remove-field-row {
		padding-bottom: 0.8em;
		padding-top: 0.8em;
	}

	button {

		&.cmb-add-group-row {
			background: $color-cmb-button-light-blue !important;
			border-color: $color-cmb-button-blue !important;
			color: $color-white !important;
		}

		&.cmb-remove-group-row {
			background: $color-cmb-button-pale-yellow !important;
			display: none;
		}
	}

	.cmb2-metabox button.dashicons-before.dashicons-no-alt.cmb-remove-group-row {
		top: 0.3rem;
	}

	h3.cmb-group-title.cmbhandle-title {
		padding-left: 1em;
	}
}

#ctct_1_optin_metabox {

	.cmb-row {
		border-bottom: none;
		padding: 0.5rem 0;
	}

	.cmb2-id--ctct-list {
		padding-bottom: 0.5em;
	}

	.cmb-th {
		width: 25%;
	}

	.cmb-th + .cmb-td {
		width: 70%;
	}
}

#ctct_option_metabox_settings {

	span.cmb2-metabox-description {
		color: $color-cmb-description-text;
	}
}

#cmb2-metabox-email_settings,
#cmb2-metabox-ctct_2_generated_metabox,
#cmb2-metabox-ctct_1_custom_input_css_metabox {

	.cmb-row {
		padding-bottom: 0 !important;
	}
}

#side-sortables {

	#ctct_1_custom_form_css_metabox {

		.cmb-row {
			padding: 0.5rem 0 0 0;
		}

		.cmb-th {
			padding-bottom: 0;
		}

		.cmb-type-title {
			border-bottom: none;
		}

		.cmb2-id--ctct-form-title-font-size,
		.cmb2-id--ctct-form-description-font-size {
			border-bottom: none;
			margin-bottom: 0;
		}

	}

	#ctct_1_custom_input_css_metabox {

		.cmb2-id-form-padding-title {
			border-bottom: 0;
			padding-bottom: 0;
		}

		.cmb2-id--ctct-input-margin-top,
		.cmb2-id--ctct-input-margin-right {
			margin-bottom: 0;
			margin-top: 0;
			padding-bottom: 0;
			padding-top: 0;
		}

		.cmb2-id--ctct-form-label-placement {
			margin-bottom: 0;
			padding-bottom: 0;
		}

		.cmb-type-text-small {
			border-bottom: none;
			float: left;
			width: 50%;

			.cmb-th {
				padding-bottom: 0;
			}
		}
	}

	.cmb2-id--ctct-generated-shortcode {

		> .cmb-th {
			display: none;
		}
	}
}

.cmb2-id--ctct-list {

	.cmb2-list {
		background:
			linear-gradient($color-white 33%, transparent),
			linear-gradient(transparent, $color-white 66%) 0 100%,
			radial-gradient(farthest-side at 50% 0, $color-black-translucent, transparent),
			radial-gradient(farthest-side at 50% 100%, $color-black-translucent, transparent) 0 100%;
		background-attachment: local, local, scroll, scroll;
		background-color: $color-white;
		background-repeat: no-repeat;
		background-size: 100% 30px, 100% 30px, 100% 10px, 100% 10px;
		max-height: 10rem;
		overflow-y: auto;
	}
}

//--------------------------------------------------------------
// TinyMCE Tweaks
//--------------------------------------------------------------
.ui-dialog .cmb-type-checkbox {

	&.cmb2-id--ctct-show-title {

		.cmb-th {
			width: 90px;
		}
	}
}
