/* General */
@font-face {
	font-family: "affwp-dashicons";
	src: url("../fonts/dashicons.eot");
	src: url("../fonts/dashicons.eot?#iefix") format("embedded-opentype"),
		url("../fonts/dashicons.woff") format("woff"),
		url("../fonts/dashicons.ttf") format("truetype"),
		url("../fonts/dashicons.svg#dashicons") format("svg");
}

#adminmenu #toplevel_page_affiliate-wp div.wp-menu-image:before {
	font-family: "affwp-dashicons" !important;
	content: "\e000";
}

.affwp-ajax-search-wrap {
	position: relative;
}

.affwp-ajax {
	position: absolute;
	right: 8px;
	top: 1px;
}

.affwp-hidden {
	display: none;
}

select.affwp-graphs-date-options {
	vertical-align: top;
	height: 26px;
}

table.affwp_table {
	text-align: left;
	width: 100%;
	border: none;
	margin: 0 0 21px;
	border-collapse: collapse;
	table-layout: fixed;
	word-wrap: break-word;
}
table.affwp_table th,
table.affwp_table td {
	text-align: left;
	border: 1px solid #eee;
	color: #666;
	padding: 0.3em 1em;
	max-width: 100%;
}
table.affwp_table th {
	background: #fafafa;
	font-weight: bold;
}
table.affwp_table td a {
	-ms-word-break: break-all;
	word-break: break-all;
	word-break: break-word;
	-webkit-hyphens: auto;
	-moz-hyphens: auto;
	hyphens: auto;
}
#affwp-dashboard-widgets-wrap .postbox h3 {
	cursor: default;
	font-weight: 600;
	padding-top: 8px;
	padding-bottom: 8px;
}

#affwp-dashboard-widgets-wrap p:last-child:not(.affwp-batch-success) {
	margin-bottom: 0px;
}

#affwp-dashboard-widgets-wrap .muted {
	color: #999;
}

/* Admin Header */
#affwp-header {
	padding: 16px 10px 16px 0;
	margin-left: -20px;
	background: #fff;
	border-bottom: 1px solid #c3c4c7;
	color: #141b38;
}

#affwp-header + #wpbody #screen-meta-links {
	margin-top: -1px;
}

#affwp-header img {
	display: block;
}

#affwp-header-wrapper {
	display: flex;
	justify-content: space-between;
	padding: 0 10px 0 20px;
	align-items: center;
}

button.affwp-round {
	border: none;
}

#affwp-header-actions {
	display: flex;
}

#affwp-header-actions .affwp-round {
	position: relative;
	background-color: #f3f4f5;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-left: 10px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

#affwp-header-actions .affwp-round:hover {
	background-color: #e5e5e5;
}

#affwp-header-actions .affwp-round svg,
#affwp-header-actions .affwp-round a {
	width: 20px;
	height: 20px;
	color: inherit;
	box-shadow: none;
}

#affwp-header .affwp-number {
	position: absolute;
	background-color: #df2a4a;
	width: 16px;
	height: 16px;
	font-weight: 600;
	font-size: 10px;
	color: #fff;
	top: -8px;
	left: 50%;
	transform: translateX(-50%);
	margin: 0;
	-webkit-animation: affwp-bounce 10s 2s infinite;
	animation: affwp-bounce 10s 2s infinite;
}

#affwp-header .affwp-number:hover {
	background-color: #df2a4a;
}

#affwp-header .affwp-number.affwp-hidden {
	display: none !important;
}

/* Notifications */
.affwp-overlay {
	position: fixed;
	z-index: 1052;
	top: 0;
	right: 0;
	bottom: 0;
	left: 160px;
	background-color: #141b38;
	opacity: .5;
	transition: .5s;
}

#affwp-notifications-panel.affwp-slide-in {
	transform: translateX(100%);
	-webkit-transform: translateX(100%);
}

#affwp-notifications-panel {
	background-color: white;
	height: 100%;
	width: 100%;
	max-width: 570px;
	position: fixed;
	z-index: 1053;
	top: 0;
	right: 0;
	bottom: 0;
	overflow-x: hidden;
	transition: .5s;

	transform: translateX(0%);
	-webkit-transform: translateX(0%);
}

body.admin-bar #affwp-notifications-panel {
	top: 32px;
}

#affwp-notifications-header {
	display: flex;
	align-items: center;
	padding: 0 30px;
	color: #fff;
	background-color: #44A2A7;
}

#affwp-notifications-header h3 {
	color: #fff;
	flex: 1;
}

#affwp-notifications-header .affwp-close {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 0;
}

#affwp-notifications-body {
	padding: 30px;
}

.affwp-notification {
	display: flex;
	gap: 20px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid #E8E8EB;
}

.affwp-notification:last-of-type {
	border-bottom: none;
}

.affwp-notification--icon {
	color: #109365;
}

.affwp-notification--icon.affwp-notification--icon-info {
	color: #44A2A7;
}

.affwp-notification--icon.affwp-notification--icon-warning {
	color: #F29100;
}

.affwp-notification--icon.affwp-notification--icon-error {
	color: #DF2A4A;
}

.affwp-notification--body {
	flex: 1;
}

.affwp-notification--header {
	align-items: start;
	display: flex;
	justify-content: space-between;
	gap: 5px;
	margin-bottom: 7px;
	line-height: 1.3;
}

.affwp-notification--title {
	color: #141b38;
	flex: 1;
	font-size: 16px;
	font-weight: 600;
	margin: 0;
}

.affwp-notification--content {
	max-width: 400px;
}

.affwp-notification--date {
	color: #71747e;
	font-size: 12px;
}

.affwp-notification--actions {
	flex-wrap: wrap;
	display: flex;
	align-items: center;
	gap: 20px;
	margin-top: 10px;
}

.affwp-notification--dismiss {
	background: none;
	border: none;
	box-shadow: none;
	color: #71747e;
	cursor: pointer;
	padding: 0 0px;
	text-decoration: underline;
}

.affwp-notification--dismiss:hover {
	text-decoration: none;
}

/* Affiliate Overview */
#affwp-dashboard-widgets-wrap .postbox {
	margin: 0 8px 20px;
}

/* Affiliates */
table.affiliates #name {
	width: 240px;
}

table.affiliates #rate,
table.affiliates #visits {
	width: 80px;
}

table.affiliates #unpaid {
	width: 150px;
}

/* Consumers */
.row-actions span.revoke a {
	color: #a00;
}

/* Creatives */
#affwp_add_creative table,
#affwp_edit_creative table {
	table-layout: fixed;
}

#preview_image {
	margin: 15px 0;
}

#preview_image img {
	height: auto;
	display: block;
	max-width: 100%;
}

.affiliates_page_affiliate-wp-creatives .widefat tbody th.check-column {
	padding-top: 0;
}

.affiliates_page_affiliate-wp-creatives th.check-column,
.affiliates_page_affiliate-wp-creatives td {
	vertical-align: middle;
}

.affiliates_page_affiliate-wp-creatives .column-image img {
	max-width: 100%;
	height: auto;
}

/* Review page */
#affwp_review_affiliate .button + .button {
	margin-left: 8px;
}

/* Referrals page */
#affwp-referrals-export-form,
#affwp_unpaid_counts,
#affwp_unpaid_earnings,
#affwp_total_earnings,
#affwp_affiliate_stats,
.affwp-gray-form {
	clear: both;
	background: #f5f5f5;
	background-image: -webkit-gradient(
		linear,
		left bottom,
		left top,
		from(#f5f5f5),
		to(#fafafa)
	);
	background-image: -webkit-linear-gradient(bottom, #f5f5f5, #fafafa);
	background-image: -moz-linear-gradient(bottom, #f5f5f5, #fafafa);
	background-image: -o-linear-gradient(bottom, #f5f5f5, #fafafa);
	background-image: linear-gradient(to top, #f5f5f5, #fafafa);
	border-color: #dfdfdf;
	margin: 8px 0;
	padding: 12px 12px 22px;
	border-width: 1px;
	border-style: solid;
	border-radius: 3px;
	font-size: 13px;
	line-height: 2.1em;
}

#affwp-referrals-export-wrap h2 {
	margin-top: 0em;
}

.affwp-required-import-field {
	background-color: #fadedc !important;
}

#affwp-referrals-filter-form select.affwp-referral-type-select {
	float: none;
}

.affwp-status.pending i,
.affwp-status.unpaid i,
.affwp-status.paid i,
.affwp-status.rejected i,
.affwp-status.active i,
.affwp-status.inactive i {
	display: inline-block;
	position: relative;
	top: 2px;
	left: -2px;
}
.affwp-status.pending i:before,
.affwp-status.unpaid i:before,
.affwp-status.paid i:before,
.affwp-status.rejected i:before,
.affwp-status.active i:before,
.affwp-status.inactive i:before {
	font-family: "dashicons";
	font-style: normal;
}
.affwp-status.pending i:before {
	content: "\f159";
	color: #d8ecb4;
}
.affwp-status.unpaid i:before,
.affwp-status.inactive i:before {
	content: "\f159";
	color: #5e95ef;
}
.affwp-status.paid i:before,
.affwp-status.active i:before {
	content: "\f159";
	color: green;
}
.affwp-status.rejected i:before {
	content: "\f159";
	color: #ef6c5e;
}

#affwp_edit_affiliate input:disabled {
	background: rgba(255, 255, 255, 0.3);
}

/* Visits page */
#affwp-visits-filter #url {
	width: 30%;
}

.visit-converted i {
	display: inline-block;
	position: relative;
	top: 2px;
	left: 2px;
}
.visit-converted i:before {
	font-family: "dashicons";
	font-style: normal;
}
.visit-converted.yes i:before {
	content: "\f147";
	color: #5e95ef;
}
.visit-converted.no i:before {
	content: "\f158";
	color: #ef6c5e;
}

/* Reports */
#reports-nav {
	background-color: #fff;
	margin: 20px 0 10px;
	overflow: auto;
	padding: 10px;
	border: 1px solid #ddd;
}

#affwp-reports-widgets-wrap #dashboard-widgets {
	overflow: visible;
}

#affwp-reports-widgets-wrap #dashboard-widgets .postbox-container {
	width: 33.3%;
}

#affwp-reports-widgets-wrap
	#dashboard-widgets
	.postbox-container
	.empty-container {
	margin-top: 1px;
}

#affwp-reports-widgets-wrap #dashboard-widgets #primary-sortables {
	margin-left: 0;
}

#affwp-reports-widgets-wrap #dashboard-widgets #tertiary-sortables {
	margin-right: 0;
}

#affwp-reports-widgets-wrap .metabox-holder .empty-container {
	height: 127px;
}

#affwp-reports-widgets-wrap #dashboard-widgets .postbox,
#affwp-reports-widgets-wrap #dashboard-widgets .meta-box-sortables {
	min-height: 127px;
}

#affwp-reports-widgets-wrap #dashboard-widgets .postbox.closed {
	min-height: 0;
}

#affwp-reports-widgets-wrap h2.hndle {
	padding: 8px 36px;
	text-align: center;
	font-weight: normal;
	color: #999;
}

#affwp-reports-widgets-wrap .postbox .inside {
	text-align: center;
}

#affwp-reports-widgets-wrap .inside span {
	display: block;
}

#affwp-reports-widgets-wrap .inside .tile-value {
	color: #21759b;
	font-size: 3em;
	line-height: 1;
}

#affwp-reports-widgets-wrap .inside .tile-value.tile-no-data {
	color: #888;
	font-size: 1.5em;
	line-height: 1;
}

#affwp-reports-widgets-wrap .inside .tile-value.tile-url {
	font-size: 1.5em;
}

#affwp-reports-widgets-wrap .inside .tile-compare {
	color: #333;
	padding-top: 10px;
	font-size: 1.1em;
}

.reports-filters {
	padding: 25px 20px;
	background-color: #fff;
	margin-bottom: 10px;
	box-sizing: content-box;
}

.affwp-inline-button {
	position: relative;
	left: 8px;
}

/* WooCommerce Admin Tweaks */
.affwp-woo-coupon-field .affwp-ajax-search-wrap {
	position: relative;
	display: block;
	width: 100%;
}
.affwp-woo-coupon-field input#user_name.affwp-user-search {
	width: 50%;
}
.affwp-woo-coupon-field .affwp-woo-coupon-input-wrap {
	position: relative;
}

.widefat .column-referral {
	width: 110px;
}

/* Tools */

#affwp-system-info-textarea {
	background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
	display: block;
	font-family: Menlo, Monaco, monospace;
	height: 400px;
	overflow: auto;
	white-space: pre;
	width: 800px;
}

/* Batch Processor */

.affwp-batch-progress {
	background: #ddd;
	height: 15px;
}
.affiliates_page_affiliate-wp-referrals .affwp-batch-progress {
	position: relative;
}
.affwp-batch-progress div {
	background: #ccc;
	height: 100%;
	width: 0;
}
.notice-wrap {
	border-style: solid;
	border-width: 1px 0;
	border-color: #eae9e9;
	padding: 12px 12px 12px 0;
	overflow: auto;
}
.notice-wrap #affwp-batch-success {
	margin: 5px 0;
}
form .spinner {
	margin: 4px 10px 8px;
	position: relative;
	float: none;
}
.admin-color-fresh .affwp-batch-progress div {
	background: #0073aa;
}
.admin-color-light .affwp-batch-progress div {
	background: #888;
}
.admin-color-blue .affwp-batch-progress div {
	background: #096484;
}
.admin-color-coffee .affwp-batch-progress div {
	background: #c7a589;
}
.admin-color-ectoplasm .affwp-batch-progress div {
	background: #a3b745;
}
.admin-color-midnight .affwp-batch-progress div {
	background: #e14d43;
}
.admin-color-sunrise .affwp-batch-progress div {
	background: #dd823b;
}
.wc-order-preview-affwp-referral {
	padding: 1em 1.5em;
	text-align: left;
	border-top: 1px solid #eee;
	width: 100%;
	margin: 0;
}
.wc-order-preview-affwp-referral strong {
	display: block;
}

.affwp-dashboard-widget .dataset {
	width: 50%;
	float: left;
	padding: 0 15px;
	box-sizing: border-box;
}

.affwp-textcenter {
	text-align: center;
}

/* Dashboard Widgets */
.affwp-dashboard-widget .dataset-recent-referrals,
.affwp-dashboard-widget table,
.affwp-dashboard-widget dl {
	width: 100%;
	margin-block-start: 0;
	margin-block-end: 0;
}

.affwp-dashboard-widget dd {
	margin-left: 0;
	margin-bottom: 5px;
}

#dashboard-widgets .affwp-dashboard-widget .dataset h4 {
	color: #777;
	border-bottom: 1px solid #ececec;
	font-size: 13px;
	padding: 3px 0;
	margin-bottom: 3px;
	margin-top: 3px;
}

#dashboard-widgets .dataset-referrals-totals {
	margin-bottom: 30px;
}

#dashboard-widgets .affwp-dashboard-widget h3 {
	display: inline;
	margin-left: 10px;
	color: #777;
}

#dashboard-widgets .dataset-title {
	width: 100%;
	border-bottom: 1px solid #ececec;
	padding-bottom: 5px;
	margin-bottom: 5px;
}

#dashboard-widgets .affwp-dashboard-widget dt,
#dashboard-widgets .affwp-dashboard-widget dd {
	width: 50%;
	margin-bottom: 5px;
}

#dashboard-widgets .affwp-dashboard-widget dt {
	float: left;
	clear: left;
	font-size: 12px;
	color: #777;
	margin-bottom: 15px;
}

#dashboard-widgets .affwp-dashboard-widget dd {
	float: right;
	text-align: right;
	font-size: 14px;
	font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
	font-weight: 400;
}

/**
 * Reporting data tooltips
 **/

.affwp-tooltip {
	cursor: help;
	position: relative;
	display: inline-block;
	color: #404040;
	margin-left: 5px;
}

.affwp-tooltip-content {
	z-index: -1;
	opacity: 0;
	position: absolute;
	font-weight: initial;
	font-size: 12px;
	top: -15px;
	left: 6px;
	padding: 5px;
	transform: translate(-50%, -100%);
	min-width: 200px;
	background: #222;
	color: #d8d8d8;
	display: block;
}

.affwp-tooltip-content.active {
	opacity: 1;
	z-index: 100;
}

.affwp-tooltip-content:after {
	content: "";
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 10px solid #111;
	display: block;
	position: absolute;
	left: calc(50% - 2px);
	bottom: 0;
	transform: translateY(100%);
}

/* Modify tooltip to display below ? mark */

.affwp-tooltip-content.overflow-top {
	top: 35px;
	transform: translate(-50%, 0);
}

.affwp-tooltip-content.overflow-top:after {
	border-bottom: 10px solid #111;
	border-top: initial;
	top: 0;
	transform: translateY(-100%);
	bottom: initial;
}

/* Modify tooltip to justify content to the left of the ? mark */

.affwp-tooltip-content.overflow-right {
	right: 0;
	left: initial;
	transform: translate(0, -100%);
}

.affwp-tooltip-content.overflow-right:after {
	right: 3px;
	left: initial;
}

/* Modify tooltip to justify content to both left and under the ? mark */

.affwp-tooltip-content.overflow-right.overflow-top {
	top: 30px;
	transform: none;
}

#affwp-reports-widgets-wrap:after {
	display: block;
	content: "";
	clear: both;
}

.affwp-admin-notice-top-of-page {
	font-size: 15px;
	line-height: 1.5;
	color: #fff;
	margin-left: -20px;
	padding: 13px 20px;
	background: #60b9b3;
	display: none;
	position: relative;
	text-align: center;
}

.affwp-admin-notice-top-of-page a {
	color: #fff;
	font-weight: bold;
}

.affwp-admin-notice-top-of-page a:hover {
	text-decoration: none;
}

.affwp-admin-notice-top-of-page .button-link {
	position: absolute;
	top: calc(50% - 18px);
	right: 0;
	font-size: 20px;
	color: #fff;
	font-weight: bold;
	text-decoration: none;
	margin-left: 5px;
	padding: 8px 12px;
	line-height: 1;
}

.affwp-admin-notice-top-of-page .button-link:hover,
.affwp-admin-notice-top-of-page .button-link:active,
.affwp-admin-notice-top-of-page .button-link:focus {
	color: #fff;
	text-decoration: none;
}

/* Terms of Use Generator */

.wp-create-terms-of-use-page {
	max-width: 640px;
}

.wp-create-terms-of-use-page label,
.wp-create-terms-of-use-page .description {
	display: block;
}

.wp-create-terms-of-use-page .description {
	margin-bottom: 8px;
}

.wp-create-terms-of-use-page label {
	font-weight: bold;
	margin-bottom: 4px;
	font-weight: 600;
}

#terms-of-use-preview {
	max-height: 400px;
	overflow-y: scroll;
	padding: 1rem;
	margin-bottom: 1.5rem;
	background: #f0f0f1;
	border: 1px solid #8c8f94;
}

#terms-of-use-preview ul {
	list-style-type: disc;
	padding-left: 1rem;
}

#terms-of-use-preview li {
	margin-bottom: 1rem;
}

#terms-of-use-preview p {
	margin: 0 0 1.5rem 0;
}

#terms-of-use-preview h1,
#terms-of-use-preview h2 {
	margin: 0 0 1rem 0;
	padding: 0;
}

/* Media Queries */
@media screen and (max-width: 1024px) {
	#affwp-reports-widgets-wrap #dashboard-widgets .postbox-container {
		width: 50%;
	}

	#affwp-reports-widgets-wrap
		#dashboard-widgets
		.postbox-container:last-child {
		width: 99%;
	}

	#affwp-reports-widgets-wrap #dashboard-widgets #tertiary-sortables {
		margin-left: 0;
	}

	#affwp-reports-widgets-wrap #dashboard-widgets .postbox {
		min-height: 0;
	}

	.affwp-admin-notice-top-of-page {
		text-align: center;
	}

	.affwp-admin-notice-top-of-page {
		padding: 10px 46px 10px 22px;
	}
}
@media screen and (max-width: 960px) {
	.affwp-overlay {
		left: 36px;
	}
}
@media screen and (max-width: 782px) {
	#affwp-affiliates-filter .column-affiliate_id,
	#affwp-affiliates-filter .column-rate,
	#affwp-affiliates-filter .column-referrals,
	#affwp-affiliates-filter .column-visits {
		display: none;
	}

	#affwp-affiliates-filter .column-actions span {
		display: block;
	}

	#affwp-reports-widgets-wrap #dashboard-widgets .postbox-container {
		width: 99%;
	}

	#affwp-reports-widgets-wrap #dashboard-widgets #primary-sortables,
	#affwp-reports-widgets-wrap #dashboard-widgets #secondary-sortables,
	#affwp-reports-widgets-wrap #dashboard-widgets #tertiary-sortables {
		margin-left: 0;
		margin-right: 0;
	}
	.affwp-overlay {
		left: 0;
	}
	body.admin-bar #affwp-notifications-panel {
		top: 46px;
	}
}
@media screen and (max-width: 600px) {
	#affwp-header {
		position: relative;
		top: 46px;
	}
	body.admin-bar #affwp-notifications-panel {
		top: 46px;
	}
}

@media screen and (min-width: 1025px) {
	#affwp-affiliates-filter .column-actions {
		width: 20%;
	}
	#affwp-payouts-filter .column-payout_id {
		width: 8%;
	}
	#affwp-payouts-filter .column-status {
		width: 10%;
	}
}

@media screen and (min-width: 680px) {
	#affwp-referrals-filter-form .column-actions {
		width: 24%;
	}
}

@media screen and (min-width: 782px) {
	.affwp-admin-notice-top-of-page .button-link {
		right: 8px;
	}
}

/* Keyframes for animation */
@keyframes affwp-bounce {
	/* These percentages cause the animation to occur for 1s, followed by 9s pause. */
	0%, 5%, 9% { transform: translateX(-50%) translateY(0); }
	2%, 7%  { transform: translateX(-50%) translateY(-3px); }
}
