@import "mixins";
@import "icons.less";

.restaurant-listings-settings-wrap {
	.updated {
		display: none;
	}
	.restaurant-listings-updated {
		display: block;
		margin: 1em 0 0;
	}
}
.widefat {
	td.column-featured_restaurant, td.column-restaurant_status {
		width: 46px;
		text-align: left;
		padding-left: 11px;
	}
	th.column-featured_restaurant, th.column-restaurant_status {
		width: 1em;
		span {
			display: block;
			width: 1em;
			height: 1em;
			line-height: 1em;
			padding: 1px 0 0 0;
			overflow: hidden;
			&:before {
				content: '\e803';
				.jm-icon;
			}
		}
	}
	th.column-restaurant_status {
		span {
			&:before {
				content: '\e828';
			}
		}
	}
	.column-restaurant_posted {
		strong {
			display: block;
			margin-bottom: .2em;
		}
	}
	td.column-restaurant_status {
		span {
			position: relative;
			font-size: 1em;
			line-height: 1.5em;
			width: 1em;
			height: 0;
			padding: 2em 0 0 0;
			overflow: hidden;
			display: block;
		}
		span:before {
			.jm-icon;
			position: absolute;
			top: 0;
			left: 0;
			line-height: 1.5em;
			vertical-align: middle;
			color: #999;
			content: '\e829';
		}
		.status-trash:before {
			content: '\e82b';
			color: #a00;
		}
		.status-pending:before {
			content: '\e82c';
			color: #ffba00;
		}
		.status-publish:before {
			content: '\e82f';
			color: #73a724;
		}
	}
	.column-restaurant_listings_type {
		text-align: left;
		width: 6em;
		word-wrap: normal !important;
		.restaurant-type {
			color: #fff;
			padding: 4px;
			font-size: 11px;
			.border_radius( 2px );
			display:block;
			background-color: @restaurant-type;
			text-align: center;
		}
	}

	.column-restaurant_actions {
		text-align: right;
		width: 128px;
		strong {
			display: block;
			margin-bottom: .2em;
		}
		.actions {
			padding-top: 2px;
		}
		a.button {
			display: inline-block;
			margin: 0 0 2px 4px;
			cursor: pointer;
			padding: 0 6px !important;
			font-size: 1em !important;
			line-height: 2em !important;
			overflow: hidden;
		}
		a.button-icon {
			width: 2em !important;
			padding: 0 !important;
			&:before {
				.jm-icon;
				float: left;
				width: 2em !important;
				line-height: 2em;
			}
		}
		.icon-view:before {
			content: '\e805';
		}
		.icon-edit:before {
			content: '\e804';
		}
		.icon-delete:before {
			content: '\e82b';
		}
		.icon-approve:before {
			content: '\e802';
		}
	}
}
.wp_restaurant_listings_meta_data {
	zoom: 1;
	&:before,
	&:after {
		content: "";
		display: table;
	}
	&:after {
		clear: both;
	}
	.form-field {
		width: 50%;
		line-height: 2em;
		float: left;
		box-sizing: border-box;
		padding: 0 12px 0 0;
		margin: 0 0 12px;
		clear: both;
		&:nth-child(even) {
			float: right;
			padding: 0 0 0 12px;
			clear: right;
		}
		&:nth-last-child(-n+2) {
			margin-bottom: 0;
			padding-bottom: 0;
			border-bottom: 0;
		}
		label {
			vertical-align: middle;
			display: block;
			font-weight: bold;
			margin: 0;
		}
		.tips {
			cursor: help;
			float: right;
			font-weight: normal;
			color: #999;
		}
		input {
			width: 100%;
			margin: 1px 0;
			-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
			-moz-box-sizing: border-box;    /* Firefox, other Gecko */
			box-sizing: border-box;         /* Opera/IE 8+ */
			vertical-align: middle;
		}
		input.checkbox, input.radio {
			width: auto;
			margin: 4px 2px;
			display: inline-block;
		}
		.description {
			display: block;
			color: #999;
		}
		&.form-field-checkbox .description {
			display: inline;
		}
		.file_url {
			input {
				width: 75%;
			}
		}
		.button {
			margin-left: 4px;
		}
		.file_no_url {
			.keyframes(flash; {
				from { background-color: unset; }
				to { background-color: #dc3232; }
			});

			.animation(flash 0.3s linear infinite alternate);
		}
	}
}
#restaurant_listings_images .inside {
	margin: 0;
	padding: 0;

	.add_restaurant_images {
		padding: 0 12px 12px;
	}

	#restaurant_images_container {
		padding: 0 0 0 9px;

		ul {
			.clearfix;
			margin: 0;
			padding: 0;

			li.image,
			li.add,
			li.wc-metabox-sortable-placeholder {
				width: 80px;
				float: left;
				cursor: move;
				border: 1px solid #d5d5d5;
				margin: 9px 9px 0 0;
				background: #f7f7f7;
				.border_radius(2px);
				position: relative;
				box-sizing: border-box;

				img {
					width: 100%;
					height: auto;
					display: block;
				}
			}

			li.wc-metabox-sortable-placeholder {
				border: 3px dashed #dddddd;
				position: relative;

				&::after {
				.icon_dashicons( '\f161' );
					font-size: 2.618em;
					line-height: 72px;
					color: #ddd;
				}
			}

			ul.actions {
				position: absolute;
				top: -8px;
				right: -8px;
				padding: 2px;
				display: none;

				li {
					float: right;
					margin: 0 0 0 2px;

					a {
						width: 1em;
						height: 1em;
						margin: 0;
						height: 0;
						display: block;
						overflow: hidden;

						&.tips {
							cursor: pointer;
						}
					}

					a.delete {
					.ir;
						font-size: 1.4em;

						&::before {
						.icon_dashicons( '\f153' );
							color: #999;
							background: #fff;
							border-radius: 50%;
							height: 1em;
							width: 1em;
							line-height: 1em;
						}

						&:hover::before {
							color: #a00;
						}
					}
				}
			}

			li:hover ul.actions {
				display: block;
			}
		}
	}
}

/* TipTip CSS - Version 1.2 */
#tiptip_holder {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 99999;
}
#tiptip_holder.tip_top {
	padding-bottom: 5px;
}
#tiptip_holder.tip_bottom {
	padding-top: 5px;
}
#tiptip_holder.tip_right {
	padding-left: 5px;
}
#tiptip_holder.tip_left {
	padding-right: 5px;
}
#tiptip_content {
	font-size: 11px;
	color: #fff;
	padding: 4px 8px;
	background:#464646;
	border-radius: 3px;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	box-shadow: 1px 1px 3px rgba(0,0,0,0.10);
	-webkit-box-shadow: 1px 1px 3px rgba(0,0,0,0.10);
	-moz-box-shadow: 1px 1px 3px rgba(0,0,0,0.10);
	text-align: center;
	code {
    	background: #999;
    	padding: 1px;
    }
}
#tiptip_arrow, #tiptip_arrow_inner {
	position: absolute;
	border-color: transparent;
	border-style: solid;
	border-width: 6px;
	height: 0;
	width: 0;
}
#tiptip_holder.tip_top #tiptip_arrow_inner {
	margin-top: -7px;
	margin-left: -6px;
	border-top-color: #464646;
}

#tiptip_holder.tip_bottom #tiptip_arrow_inner {
	margin-top: -5px;
	margin-left: -6px;
	border-bottom-color: #464646;
}

#tiptip_holder.tip_right #tiptip_arrow_inner {
	margin-top: -6px;
	margin-left: -5px;
	border-right-color: #464646;
}

#tiptip_holder.tip_left #tiptip_arrow_inner {
	margin-top: -6px;
	margin-left: -7px;
	border-left-color: #464646;
}

.rtl {
	.widefat {
		.column-restaurant_actions {
			a.button-icon {
				&:before {
					float: right;
				}
			}
		}
	}
	.wp_restaurant_listings_meta_data {
		p {
			padding: 0 20% 0 0;
		}
		label {
			left: auto;
			right: 0;
		}
	}
}

/**
 * Mobile styles
 */
@media only screen and (max-width: 782px) {
	.widefat {
		.column-title.column-primary{
			display: table-cell !important;
		}
		.toggle-row:before{
			top: 5px;
		}
		.column-restaurant_actions {
			text-align: left;

			a.button-icon {
				&:before {
					float: left;
				}
			}
		}
	}
	.rtl {
		.widefat {
			.column-restaurant_actions {
				text-align: right;

				a.button-icon {
					&:before {
						float: right;
					}
				}
			}
		}
	}
	.wp_restaurant_listings_meta_data {
		.form-field {
			width: 100%;
			padding: 0;

			&:nth-child(even) {
				float: none;
				padding: 0;
				margin-bottom: 12px;
				clear: both;
			}
			&:nth-last-child(-n+2) {
				float: none;
				padding: 0;
				margin-bottom: 12px;
				clear: both;
			}
		}
	}
}
