@import '../css/vars.less';


/*---------------------------------------------------------------------------------------------
*
*  Global
*
*---------------------------------------------------------------------------------------------*/

#adv-settings .show-field-keys label {
	padding: 0 5px;
}


#acf-field-group-fields > .inside,
#acf-field-group-locations > .inside,
#acf-field-group-options > .inside {
	padding: 0;
	margin: 0;
}

.acf-field {

	p.description {
		font-style: normal;
		font-size: 12px;
		color: #777777;
	}
	
}


/*---------------------------------------------------------------------------------------------
*
*  Postbox: Publish
*
*---------------------------------------------------------------------------------------------*/

#minor-publishing-actions,
#misc-publishing-actions #visibility {
	display: none;
}

#minor-publishing {
	border-bottom: 0 none;
}

#misc-pub-section {
	border-bottom: 0 none;
}

#misc-publishing-actions .misc-pub-section {
	border-bottom-color: #F5F5F5;
}


/*---------------------------------------------------------------------------------------------
*
*  Postbox: Fields
*
*---------------------------------------------------------------------------------------------*/

#acf-field-group-fields {
	border: 0 none;
    box-shadow: none;
    
    
    /* metabox */
    > .handlediv,
	> .hndle {
		display: none;
	}
	
	
	/* links */
	a {
		text-decoration: none;
		
		&:active,
		&:focus {
			outline: none;
			box-shadow: none;
		}
	}
	
		
	/* no fields */
	.no-fields-message {
		padding: 15px 15px;
		background: #fff;
	}
	
	
	/* table header */
	.li-field-order { width: 20%; }
	.li-field-label { width: 30%; }
	.li-field-name { width: 25%; }
	.li-field-type { width: 25%; }
	.li-field-key { display: none; }
	
	
	/* show keys */
	&.show-field-keys {
		
		.li-field-label,
		.li-field-name,
		.li-field-type,
		.li-field-key { width: 20%; }
		.li-field-key { display: block; }
	}
	
	
	/* fields */
	.acf-field-list-wrap {
		border: #DFDFDF solid 1px;
	}
	
	.acf-field-list {
		background: #F9F9F9;
		margin-top: -1px;
	}
	
}


/* field object */
.acf-field-object {
	border-top: #F0F0F0 solid 1px;
	background: #fff;
	
	/* sortable */
	&.ui-sortable-helper {
		border-top-color: #fff;
		box-shadow: 0 0 0 1px #DFDFDF, 0 1px 4px rgba(0,0,0,0.1);
	}
	
	&.ui-sortable-placeholder {
		box-shadow: 0 -1px 0 0 #DFDFDF;
		visibility: visible !important;
		background: #F9F9F9;
		border-top-color: transparent;
	}
	
	
	/* meta */
	> .meta {
		display: none;
	}
	
	
	/* handle */
	> .handle {
		
		a {
			-webkit-transition: none;
			-moz-transition: none;
			-o-transition: none; 	
			transition: none;
		}
		
		li {
			padding-top: 10px;
			padding-bottom: 10px;
			word-wrap: break-word;
		}
		
		.acf-icon {
			margin: 1px 0 0;
			cursor: move;
			background: transparent;
			float: left;
			
			height: 28px;
		    line-height: 28px;
		    width: 28px;
		    font-size: 13px;
		    color: #444;
		    position: relative;
		    z-index: 1;
		}
		
		strong {
			display: block;
			padding-bottom: 6px;
			font-size: 14px;
			line-height: 14px;
			min-height: 14px;
		}
		
		.row-options {
			visibility: hidden;
			
			a {
				margin-right: 4px;
			}
			
			a.delete-field {
				color: #a00;
				
				&:hover { color: #f00; }
			}
		}

	}
	
	
	/* open */
	&.open {
		
		+ .acf-field-object {
			border-top-color: #E1E1E1;
		}
		
		> .handle {
			background: @acf_blue;
			border: darken(@acf_blue, 2%) solid 1px;
			text-shadow: #268FBB 0 1px 0;
			color: #fff;
			position: relative;
			margin: -1px -1px 0 -1px;
			
			a {
				color: #fff !important;
				
				&:hover {
					text-decoration: underline !important;
				}
			}
			
			.acf-icon {
				border-color: #fff;
				color: #fff;
			}
			
			.acf-required {
				color: #fff;
			}
		}
	}
	
	
	/* hover */
	&:hover {
		
		> .handle {
			
			.row-options {
				visibility: visible;
			}
				
		}
	}
	
	
	/* settings */
	> .settings {
		display: none;
		width: 100%;
		
		> .acf-table {
			border: none;
		}
	}
	
	
	/* conditional logic */
	.rule-groups {
		margin-top: 20px;
	}
	
}


/*---------------------------------------------------------------------------------------------
*
* Postbox: Locations
*
*---------------------------------------------------------------------------------------------*/

.rule-groups h4 {
	margin: 15px 0 5px;
}

.rule-groups .rule-group {
	margin: 0 0 5px;
}

.rule-groups .rule-group h4 {
	margin: 0 0 3px;
}

.rule-groups .rule-group td.param {
	width: 35%;
}

.rule-groups .rule-group td.operator {
	width: 20%;
}

.rule-groups .rule-group td.add {
	width: 40px;
}

.rule-groups .rule-group td.remove {
	width: 28px;
	vertical-align: middle;
	visibility: hidden;
}

.rule-groups .rule-group tr:hover td.remove {
	visibility: visible;
}


/* Don't allow user to delete the first field group */
.rule-groups .rule-group:first-child tr:first-child td.remove {
	visibility: hidden !important;
}


/*---------------------------------------------------------------------------------------------
*
*	Options
*	
*---------------------------------------------------------------------------------------------*/

#acf-field-group-options tr[data-name="hide_on_screen"] li {
	float: left;
	width: 33%;
}

@media (max-width: 1100px) {
	
	#acf-field-group-options tr[data-name="hide_on_screen"] li {
		width: 50%;
	}
	
}


/*---------------------------------------------------------------------------------------------
*
*	Conditional Logic
*	
*---------------------------------------------------------------------------------------------*/

table.conditional-logic-rules {
	background: transparent;
	border: 0 none;
	border-radius: 0;
}

table.conditional-logic-rules tbody td {
	background: transparent;
	border: 0 none !important;
	padding: 5px 2px !important;
}


/*---------------------------------------------------------------------------------------------
*
*	Field: Tab
*	
*---------------------------------------------------------------------------------------------*/

.acf-field-object-tab tr[data-name="name"],
.acf-field-object-tab tr[data-name="instructions"],
.acf-field-object-tab tr[data-name="required"],
.acf-field-object-tab tr[data-name="warning"],
.acf-field-object-tab tr[data-name="wrapper"] {
	display: none !important;
}

.acf-field-object-tab .li-field-name {
	visibility: hidden;
}


.acf-field-object-tab .acf-error-message {
	display: none;
}

.acf-field-list[data-layout="table"] .acf-field-object-tab .acf-error-message {
	display: block;
}

.acf-field-object + .acf-field-object-tab {
	margin-top: 6px;
}

.acf-field-object + .acf-field-object-tab:before {
	display: block;
	content: "";
	height: 1px;
	background: #F0F0F0;
	margin-top: -7px;
	width: 100%;
	position: absolute;
}

.acf-field-object + .acf-field-object-tab.ui-sortable-placeholder {
	margin-top: 0;
	padding-top: 6px;
}

.acf-field-object-tab.ui-sortable-helper:before,
.ui-sortable-placeholder + .acf-field-object-tab:before  {
	display: none;
}


/*---------------------------------------------------------------------------------------------
*
*	Field: Message
*	
*---------------------------------------------------------------------------------------------*/

.acf-field-object-message tr[data-name="name"],
.acf-field-object-message tr[data-name="instructions"],
.acf-field-object-message tr[data-name="required"] {
	display: none !important;
}

.acf-field-object-message .li-field-name {
	visibility: hidden;
}

.acf-field-object-message textarea {
	height: 175px !important;
}


/*---------------------------------------------------------------------------------------------
*
*	Field: Separator
*	
*---------------------------------------------------------------------------------------------*/

.acf-field-object-separator tr[data-name="name"],
.acf-field-object-separator tr[data-name="instructions"],
.acf-field-object-separator tr[data-name="required"] {
	display: none !important;
}


/*---------------------------------------------------------------------------------------------
*
*	Field: Date Picker
*	
*---------------------------------------------------------------------------------------------*/

.acf-field-object-date-picker,
.acf-field-object-time-picker,
.acf-field-object-date-time-picker {
	
	.acf-radio-list {
		
		li {
			line-height: 25px;
		}
		
		span {
			display: inline-block;
			min-width: 10em;
		}
		
		input[type="text"] {
			width: 100px;
		}
	}

}

.acf-field-object-date-time-picker {
	
	.acf-radio-list {
		
		span {
			min-width: 15em;
		}
		
		input[type="text"] {
			width: 200px;
		}
	}
	
}

/*--------------------------------------------------------------------------------------------
*
*	RTL
*
*--------------------------------------------------------------------------------------------*/

html[dir="rtl"] .acf-field-object.open > .handle {
	margin: -1px -1px 0;
}

html[dir="rtl"] .acf-field-object.open > .handle .acf-icon {
	float: right;
}

html[dir="rtl"] .acf-field-object.open > .handle .li-field-order {
    padding-left: 0 !important;
    padding-right: 15px !important;
}


/*---------------------------------------------------------------------------------------------
*
*  Device
*
*---------------------------------------------------------------------------------------------*/

@media only screen and (max-width: 850px) {
	
	tr.acf-field,
	td.acf-label,
	td.acf-input {
		display: block !important;
		width: auto !important;
		border: 0 none !important;
	}
	
	tr.acf-field {
		border-top: #ededed solid 1px !important;
		margin-bottom: 0 !important;
	}
	
	td.acf-label {
		background: transparent !important;
		padding-bottom: 0 !important;

	}
	
}

