@mixin md-down() {
	@media only screen and (max-width: 900px) { @content }
}

body[class^='emojics_'],
body[class*='emojics_'] {

	.update-nag,
	.notice {
		margin-left: 2px;

		/**
		 * Hide All Nags Notifications and remove top margin of the emojics wrapper
		 */
		display: none;
		// &+.emojics-wrap {
		// 	margin-top: 25px;
		// }
	}

	#wpbody-content {
		padding-bottom: 0;
	}

	/**
	 * Floating notification
	 */
	.emojics-favor-message {
		display: block;
		background-color: transparent;
		border: none;
		box-shadow: none;
		padding: 0;
		height: 0;
		margin: 0;

		.emojics-favor-message__content {
			position: absolute;
			top: 30px;
			left: 50%;
			transform: translateX(-50%);
			display: block;
			max-width: 500px;
			width: 100%;
			z-index: 1000000;

			background-color: #FFF;
			padding: 20px;
			border-radius: 5px;
			box-shadow: 0 5px 15px -2px rgba(0,0,0,.25), 0 5px 200px 100px rgba(0,0,0,.1);

			@include md-down {
				max-width: 90%;
			}
		}
	}

}

.wp-admin {

	.emojics-left {
		text-align: left;
	}

	.emojics-center {
		text-align: center;
	}

	.emojics-right {
		text-align: right;
	}

	.emojics-logo {
		max-width: 180px;
	}

	.emojics-wrap {
		box-sizing: border-box;

		* {
			box-sizing: border-box;
		}
	}

	.emojics-header {
		background-color: #3a96ed;
		background-image: linear-gradient(190deg, #4ea8fd, #217bd0 100%);
		margin-left: -20px;
		padding: 20px 35px;

		.emojics-logo {
			margin: 10px 0;
		}

		.emojics-btn {
			display: inline-block;
			margin: 20px 0;
		}

		&.welcome {
			padding-bottom: 70px;
		}
	}

	.emojics-container {
		margin: 20px 0;
		max-width: 800px;
		padding-left: 15px;
		padding-right: 15px;

		margin-left: -20px;
		box-sizing: content-box;

		&.fullwidth {
			max-width: 100%;
		}
	}

	.emojics-row {
		margin-left: -15px;
		margin-right: -15px;
		margin-bottom: 15px;
		min-height: 1px;

		&:after {
			display: block;
			content: "";
			clear: both;
		}

		&:last-child {
			margin-bottom: 0;
		}

		.col {
			padding-left: 15px;
			padding-right: 15px;
			float: left;
			box-sizing: border-box;

			&.m4 {
				width: 33.3333333333%;

				@include md-down {
					width: 100%;
				}
			}

			&.m6 {
				width: 50%;

				@include md-down {
					width: 100%;
				}
			}

			&.m8 {
				width: 66.6666666667%;

				@include md-down {
					width: 100%;
				}
			}

			&.m12 {
				width: 100%;
			}
		}
	}

	.emojics-card {
		background-color: #FFF;
		border-radius: 3px;
		box-shadow: 0 2px 2px 0 #eee;
		min-height: 100px;
		margin-bottom: 20px;
		padding: 20px;
		box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);

		hr {
			margin: 20px -20px;
		}
	}

	.emojics-field {
		width: 100%;
		line-height: 28px;
		font-size: 16px;
		margin-bottom: 15px;

		&.error {
			border-color: red;
		}
	}

	.emojics-label {
		display: inline-block;
		font-weight: 600;
		margin-bottom: 5px;
	}

	.emojics-block {
		display: block;
		margin: 2px 0;
	}

	.emojics-btn {
		display: inline-block;
		border: none;
		background-color: #3a96ed;
		height: auto;
		font-size: 14px;
		line-height: 120%;
		border-radius: 3px;
		padding: 10px 15px;
		text-transform: uppercase;
		-webkit-box-shadow: none;
		box-shadow: none;
		color: #FFF;
		cursor: pointer;
		margin: 0;
		transition: all 0.2s;
		text-decoration: none;

		&:hover {
			background-color: lighten(#3a96ed, 5%);
		}

		&.white {
			background-color: #FFF;
			color: #3a96ed;

			&:hover {
				background-color: darken(#FFF, 5%);
			}
		}
	}

	input[type="submit"] {
		&.emojics-btn {
			&:hover {
				color: #FFF;
				background-color: lighten(#3a96ed, 5%);
			}
		}
	}

	.emojics-error-message {
		color: red;
		margin-bottom: 15px;
	}

	/* Fix wp menu icon position */
	#adminmenu .toplevel_page_emojics_settings {
		.wp-menu-image.dashicons-before img {
			padding-top: 7px;
		}
	}
}

.emojics-wrap {

	.emojics-frame-wrap {
		margin-left: -20px;

		&__frame {
			width: 100%;
			min-height: 350px;
			box-sizing: border-box;
		}
	}

	.form-table {

		th {

			p {
				font-weight: normal;
				font-size: 90%;
			}
		}
	}
}

#emojics-registration,
#emojics-authenticate {
	display: none;
	margin-top: -80px;

	& > * {
		max-width: 600px;

		margin: 0 auto;
		float: none;
	}

	&.active {
		display: block;
	}
}

.emojics-switch-signup-signin {
	display: block;
	margin: 0 auto;
	text-align: center;
}

#emojics-dashboard {

	.emojics-logo {
		max-width: 140px;
	}

	.emojics-header {
		padding: 0 15px;

		.emojics-btn {
			margin: 15px 0;
		}
	}
}

.emojics-favor-message {
	display: block;
	position: relative;

	&__reward {
		position: relative;
		margin: 20px auto;
		box-sizing: border-box;
		padding: 15px;
		text-align: center;

		width: 100%;
		max-width: 380px;

		border: 1px solid #CCC;
		border-radius: 5px;

		&>* {
			box-sizing: border-box;
			// padding: 0 20px;
			width: 48%;
			display: inline-block;

			small {
				display: block;
				line-height: 120%;
			}
		}

		.review {
			line-height: 0;
		}

		.reward {
			strong {
				display: block;
				font-size: 18px;
				text-transform: uppercase;
			}
		}

		&:before,
		&:after {
			position: absolute;
			content: "";
			display: block;
			width: 1px;
			height: 25px;
			border-right: 1px solid #CCC;

			top: 50%;
			left: 49%;
			transform: translate(-50%);
		}

		&:before {
			margin-top: -25px;
			transform: translate(-50%) rotate(-15deg);
		}

		&:after {
			margin-top: -1px;
			transform: translate(-50%) rotate(15deg);
		}
	}

	&__ok {}
	&__later {}
	&__already {}

	&__close {
		position: absolute;
		top: 15px;
		right: 15px;

		width: 20px;
		height: 20px;
		line-height: 20px;
		font-size: 14px;
		text-align: center;

		text-decoration: none;
		font-weight: 700;
		color: #AAA;
		border-radius: 25px;
		z-index: 5000;
		box-shadow: 0 0 0 2px #AAA;

		&:hover,
		&:active,
		&:focus {
			color: #AAA;
			opacity: 0.8;
		}
	}
}