/**
 * Admin styles
 */
 
/**
 * Fields table
 */
.widefat .field-group-heading {
	background-color: #f9f9f9;
}

.widefat .field-group-heading td {
	padding-bottom: 4px;
	padding-top: 15px;
	border-top: 1px solid #e1e1e1;
	border-bottom: 1px solid #e1e1e1;
}

.widefat .field-group-heading:first-child td {
	border-top: 0;
}

.af-field-group-table {
	margin-bottom: 1em;
}


/**
 * Hide title input on entries
 */
.post-type-af_entry #titlediv {
	display: none;
}

#acf_after_title-sortables #acf-group_entry_data {
	margin-top: 0;
}

/**
 * Form settings
 */

.acf-field-form-shortcode-message code {
	/* Improve selection behaviour of shortcode */
	-webkit-user-select: all;
	user-select: all;
	
	padding: 5px;
}

.acf-field-form-shortcode-message p {
	margin-bottom: 0;
}


/**
 * Make room for the field selector on the email fields
 */
.acf-field .acf-input {
	position: relative;
}

.af-field-dropdown.button {
	position: relative;
	display: none;
}

.acf-field-form-email-content .af-field-dropdown.button,
.acf-field-form-success-message .af-field-dropdown.button {
	display: inline-block;
}

.acf-field .button.floating {
	display: inline-block;
	position: absolute;
	right: 3px;
	top: 50%;
	font-size: 12px;
	line-height: 20px;
	height: 22px;
	margin-top: -11px;
	min-height: initial;
}

.acf-field .button.floating:active {
	z-index: 1000;
}

/* Allow spinners inside buttons */
.acf-field .button .spinner {
	background-position: center top;
	background-size: 18px;
	float: none;
	margin: 0;
}

/* Add padding to inputs to ensure floating button doesn't overlap */
.acf-field input.has-field-inserter {
	padding-right: 90px;
}

.af-field-dropdown .af-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	max-height: 400px;
	overflow-y: scroll;
	background: #f7f7f7;
	border: 1px solid #ccc;
	box-shadow: 0 1px 0 #ccc;
	border-radius: 3px;
	z-index: 100;
}

.af-field-dropdown.floating .af-dropdown {
	left: auto;
	right: 0;
}

.af-field-dropdown.open .af-dropdown {
	display: block;
}

.af-field-dropdown .field-divider {
	background: #fff;
	height: 3px;
	border-bottom: 1px solid #ccc;
}

.af-field-dropdown .af-dropdown .field-option {
	padding: 10px;
	border-bottom: 1px solid #ccc;
	font-weight: 500;
	line-height: 1;
	overflow: auto;
}

.af-field-dropdown .af-dropdown .sub-fields-wrapper {
	border-left: 3px solid #ccc;
	border-bottom: 1px solid #ccc;
}

.af-field-dropdown .af-dropdown .field-option.sub-field {
	border-left: 3px solid #ccc;
}

.af-field-dropdown .af-dropdown .field-option:last-child,
.af-field-dropdown .af-dropdown .sub-fields-wrapper:last-child {
	border-bottom: 0;
}

.af-field-dropdown .af-dropdown .field-option:hover {
	background: #fff;
}

.af-field-dropdown .af-dropdown .field-option .field-name {
	display: block;
	float: left;
}

.af-field-dropdown .af-dropdown .field-option .field-type {
	display: block;
	color: #888;
	float: right;
	font-weight: 400;
}


/**
 * ACF Tabs (spacing, dashicons)
 */
.acf-tab-button .dashicons {
	font-size: 16px;
	height: auto;
	margin-top: -4px;
	margin-right: 5px;
	vertical-align: middle;
}

.acf-tab-button[data-key="field_form_editing_tab"] {
	margin-top: 10px;
}


/**
 * Images in field labels
 */
.acf-field .acf-label img {
	height: 16px;
	vertical-align: middle;
	margin-top: -3px;
	margin-right: 6px;
}


/**
 * Divider field 
 */
.acf-fields > .acf-field.acf-field-divider,
.acf-block-body .acf-fields > .acf-field.acf-field-divider {
	background: #f9f9f9;
	padding: 3px 0;
}

/**
 * Form actions in the publish box
 */
.af-form-actions-wrapper {
	border-bottom: 1px solid #ddd;
	margin: 0 -10px;
	margin-bottom: 10px;
	padding: 0 10px;
	padding-bottom: 10px;
	text-align: right;
}

.af-form-actions-wrapper .button {
	margin-left: 5px;
}


/**
 * Form previews
 */

.af-form-preview .af-submit {
	border-top: #EEEEEE solid 1px;
	padding: 15px 12px;
}

.af-form-preview {
	max-width: 763px;
}

.af-form-preview * {
	box-sizing: border-box;
}

.af-form-preview .acf-fields > .acf-field:nth-child(3) {
	border-top-width: 0;
}

.af-form-preview .af-success {
	margin: 15px 12px;
}

/* Paging */
.af-form-preview .af-page-wrap {
	margin-top: 15px;
}

.af-form-preview .af-previous-button {
	margin-right: 10px;
}


/**
 * Add top spacing to page field type.
 * Same as the spacing added for tab fields.
 */
.acf-field-object + .acf-field-object-page:before {
	display: block;
	content: "";
	height: 5px;
	width: 100%;
	background: #f9f9f9;
	border-bottom: #f0f0f0 solid 1px;
}

/* Hide unnecessary settings for the page field type */
.acf-field-object-page .acf-field-setting-name,
.acf-field-object-page .acf-field-setting-instructions,
.acf-field-object-page .acf-field-setting-required,
.acf-field-object-page .acf-field-setting-hide_admin,
.acf-field-object-page .acf-field-setting-conditional_logic,
.acf-field-object-page .acf-field-setting-wrapper {
	display: none;
}


/**
 * Information sidebar on forms page
 */

/* Wraps the posts list and sidebar */
.af-forms-wrapper {
	margin-right: 300px;
	clear: both;
}

.af-forms-list {
	float: left;
	width: 100%;
}

.af-sidebar {
	float: right;
	margin-right: -300px;
	width: 280px;
}

.post-type-af_form .search-box {
	display: none;
}

.post-type-af_form .subsubsub {
	margin-bottom: 3px;
}

.af-sidebar .feature-list {
	padding-left: 20px;
	list-style-type: disc;
}

@media only screen and (max-width: 850px) {
	.af-forms-wrapper {
		margin-right: 0;
	}

	.af-forms-list {
		float: none;
		width: auto;
		margin: 0;
	}

	.af-sidebar {
		margin: 0;
		margin-top: 20px;
		float: none;
		width: auto;
	}
}


/**
 * Form import
 */
.af-form-import .acf-fields {
	border: #ebebeb solid 1px;
	background: #fafafa;
	border-radius: 3px;
	padding: 15px 12px;
}

.af-form-import .acf-label {
	font-weight: bold;
	margin: 0 0 3px;
}

.af-form-import .button {
	margin-top: 1em;
}


/**
 * Form export
 */
.af-form-export #poststuff .inside {
	padding: 20px;
	margin: 0;
}

.af-form-export .inside:first-child {
	border-bottom: 1px solid #e5e5e5;
}

.af-form-export #poststuff .inside h2 {
	padding: 0;
	font-weight: 500;
}

.af-form-export pre {
	background: #f1f1f1;
	padding: 15px;
	-moz-tab-size: 2;
	-o-tab-size: 2;
	tab-size: 2;
}

.af-form-export .copy-button {
	float: right;
}


/**
 * Gutenberg block
 */
.af-block-preview {
	padding: 30px;
	text-align: center;
	background: #f5f5f5;
	border-radius: 5px;
	border: 1px solid #ccc;
}

.af-block-preview .af-block-no-form {
	color: #888;
	font-size: 1.5rem;
}

.af-block-preview .af-block-description {
	margin-bottom: 10px;
	text-transform: uppercase;
	color: #888;
	font-weight: 700;
}

.af-block-preview .af-block-form-name {
	font-size: 2rem;
	font-weight: 700;
}

.af-block-preview .af-block-subtitle {
	margin-top: 15px;
	color: #555;
}

.wp-block-acf-advanced-form .edit-form-link {
	text-decoration: none;
}

.wp-block-acf-advanced-form .edit-form-link:hover {
	text-decoration: underline;
}

.wp-block-acf-advanced-form code {
	padding: 3px 5px;
	background: rgba(0, 0, 0, 0.07);
	font-size: 13px;
}

/**
 * Utility classes
 */
.af-field-hide-label > .acf-label {
	display: none;
}