/**
 * Common styles that are used on all the WP pages in the backend
 */
@import "modules/media";

.sui-wrap .smush-upsell-link,
.sui-wrap a.smush-upsell-link {
	color: $purple;
	> span:before {
		color: $purple;
	}
	&:hover:not(.sui-button),
	&:focus:not(.sui-button),
	&:active:not(.sui-button) {
		color: #64007e;
		> span:before {
			color: #64007e;
		}
	}
}

/**
 * Media details (grid layout)
 * @since 3.4.0
 */
.attachment-info .smush-stats .value {
	display: flex;
	flex-wrap: wrap;

	.smush-status {
		margin: 0 0 10px;
		flex-basis: 100%;
		font-size: 12px;
		line-height: 1.33333;
	}

	.smush-status-links {
		width: 100%;
	}

	span.sui-tooltip {
		float: none;
	}

	a {
		margin-left: 5px;
	}

	a:first-of-type {
		margin-left: 0;
		margin-right: 5px;
	}
}

.attachment-info .smush-status-links,
.column-smushit .smush-status-links {
	color: #ddd;
}

.column-smushit .smush-status-links > a {
	box-shadow: none;
	outline: none;
}

.wp-smush-progress {
	padding-left: 25px;
	padding-top:0;
	padding-bottom: 0;
	margin: 0;
	background-size: 17px 17px;
	visibility: visible;
	vertical-align: initial !important; /* prevent from jumping on a line */
	display: inline;
	color: #32373c;
	cursor: default;
}

// Fix grid view links.
.attachment-details .setting span.wp-smush-progress {
	width: auto;
	margin-right: 5px;
	padding-top:0;
	padding-bottom: 0;
	display: inline-block;
}

/** Settings Page **/
.smush-status.fail {
	color: #dd3d36;
}

.smush-status.success {
	color: #0074a2;
}

.smush-status.error {
	color: red;
}

#wpbody-content .wp-smush-error {
	color: red;
}

.wp-smush-action[disabled] {
	opacity: 0.6;
}

#post-body-content .smush-status {
	margin: 4px 0;
}

.attachment-info .wp-smush-error-message {
	margin: 0 0 1em;
}

.smush-stats-wrapper .row {
	padding: 8px 0;
}

.smush-stats-wrapper .row:first-child {
	padding-top: 0;
}

.smush-stats-wrapper td, .smush-stats-wrapper th {
	font-size: 11px;
}

.smush-skipped .dashicons-editor-help {
	margin-top: -2px;
	margin-left: 5px;
}

.smush-skipped {
	a:focus { box-shadow: 0 0 black; }
	.sui-tag.sui-tag-purple {
		min-height: 18px;
		padding: 2px 10px;
		font-size: 10px;
		line-height: 12px;
		font-weight: 700;
		background-color: #8d00b1;
		color: #fff;
		border: 2px solid transparent;
		border-radius: 13px;
	}
}

/** Help Tip **/
.ui-tooltip-content {
	font-size: 12px;
}

/** All Smushed **/
.wp-smush-notice {
	background-color: #D1F1EA;
	border-radius: 5px;
	color: #333333;
	font-family: 'Roboto', sans-serif;
	font-size: 15px;
	line-height: 30px;
	margin-bottom: 30px;
	padding: 15px 30px;
	letter-spacing: -0.015em;
}

div.smush-notice-cta a.smush-notice-act.button-primary {
	padding: 3px 23px;
	background-color: #00B0DB;
	box-shadow: none;
	border-radius: 4px;
	border: none;
	text-shadow: none;
	font-weight: normal;
	-webkit-font-smoothing: antialiased;

	&:hover {
		border: none;
	}
}

a.wp-smush-resize-enable:hover,
a.wp-smush-lossy-enable:hover {
	color: #0A9BD6;
}

.wp-smush-bulk-wrapper {
	#wp-smush-bulk-image-count {
		color: #333333;
		font-size: 28px;
		line-height: 40px;
		letter-spacing: -0.5px;
		font-weight: 600;
	}

	#wp-smush-bulk-image-count-description {
		color: #333333;
		font-size: 13px;
		margin-top: 0;
		margin-bottom: 10px;
	}

	.sui-tooltip,
	.sui-tooltip > .sui-icon-info {
		vertical-align: top;
	}
}

/** Image Remaining **/
div.wp-smush-dir-limit,
div.smush-s3-setup-message {
	background-color: #FFF5D5;
	border: none;
	color: #333333;
	line-height: 30px;
	font-size: 15px;
	letter-spacing: -0.015em;
}

div.smush-s3-setup-message {
	background-color: #DFF6FA;
}

div.wp-smush-dir-limit {
	background-color: #dff6fa;
}

.wp-smush-count {
	color: #888888;
	font-size: 13px;
	line-height: 1.5;
	margin-top: 15px;
}

/** Stats Container **/

a.wp-smush-lossy-enable {
	cursor: pointer;
}

/** Re Smush **/
.wp-smush-settings-changed {
	background: #dff6fa;
	border-radius: 5px;
	font-size: 13px;
	line-height: 1.7;
	padding: 20px;
}

.compat-item .compat-field-wp_smush {
	display: table-row;
}

.manage-column.column-smushit {
	width: 265px;
}

.smushit [tooltip],
label.setting.smush-stats [tooltip],
.compat-field-wp_smush [tooltip] {
	position: relative;
	overflow: visible;
}

.smushit [tooltip]:before,
label.setting.smush-stats [tooltip]:before,
.compat-field-wp_smush [tooltip]:before {
	content: '';
	position: absolute;
	border: 5px solid transparent;
	border-top-color: #0B2F3F;
	bottom: 100%;
	left: 50%;
	margin-left: -5px;
	margin-bottom: -5px;
	opacity: 0;
	z-index: -1;
	transition: margin .2s, opacity .2s, z-index .2s linear .2s;
	pointer-events: none;
}

.smushit [tooltip]:after,
label.setting.smush-stats [tooltip]:after,
.compat-field-wp_smush [tooltip]:after {
	background: #0B2F3F;
	border-radius: 4px;
	bottom: 100%;
	color: #FFF;
	content: attr(tooltip);
	font-size: 13px;
	font-weight: 400;
	left: 50%;
	line-height: 20px;
	margin-left: -100px;
	margin-bottom: 5px;
	opacity: 0;
	padding: 5px;
	pointer-events: none;
	position: absolute;
	width: 180px;
	text-align: center;
	transition: margin .2s, opacity .2s, z-index .2s linear .2s;
	white-space: pre-wrap;
	z-index: -1;
}

.smushit .smush-skipped [tooltip]:before,
label.setting.smush-stats .smush-skipped [tooltip]:before,
.compat-field-wp_smush .smush-skipped [tooltip]:before {
	border-top-color: transparent;
	border-left-color: #0B2F3F;
	bottom: 0;
	left: 0;
}

.smushit .smush-skipped [tooltip]:after,
label.setting.smush-stats .smush-skipped [tooltip]:after,
.compat-field-wp_smush .smush-skipped [tooltip]:after {
	margin-left: 0;
	left: -195px;
	top: -35px;
	bottom: inherit;
	margin-bottom: 5px;
}

label.setting.smush-stats .smush-skipped [tooltip]:after {
	top: -98px;
}

div.media-sidebar label.setting.smush-stats .smush-skipped [tooltip]:after {
	left: -188px;
	padding-left: 10px;
	width: 170px;
}

div.media-sidebar label.setting.smush-stats .smush-skipped [tooltip]:before {
	margin-left: -3px;
}

.smushit [tooltip].tooltip-s:after,
label.setting.smush-stats [tooltip].tooltip-s:after,
.compat-field-wp_smush [tooltip].tooltip-s:after {
	width: 150px;
	margin-left: -75px;
}

.smushit [tooltip].tooltip-l:after,
label.setting.smush-stats [tooltip].tooltip-l:after,
.compat-field-wp_smush [tooltip].tooltip-l:after {
	width: 280px;
	margin-left: -140px;
}

.smushit [tooltip].tooltip-right:after, .compat-field-wp_smush [tooltip].tooltip-right:after {
	margin-left: -180px;
}

.smushit [tooltip].tooltip-s.tooltip-right:after, .compat-field-wp_smush [tooltip].tooltip-s.tooltip-right:after {
	margin-left: -130px;
}

.smushit [tooltip].tooltip-l.tooltip-right:after, .compat-field-wp_smush [tooltip].tooltip-l.tooltip-right:after {
	margin-left: -260px;
}

.smushit [tooltip].tooltip-bottom:before, .compat-field-wp_smush [tooltip].tooltip-bottom:before {
	border-color: transparent;
	border-bottom-color: #0B2F3F;
	top: 100%;
	bottom: auto;
	margin-top: -5px;
	margin-bottom: 0;
}

.smushit [tooltip].tooltip-bottom:after, .compat-field-wp_smush [tooltip].tooltip-bottom:after {
	bottom: auto;
	top: 100%;
	margin-top: 5px;
	margin-bottom: 0;
}

.smushit [tooltip]:hover:before,
label.setting.smush-stats [tooltip]:hover:before,
.compat-field-wp_smush [tooltip]:hover:before {
	z-index: 1;
	margin-bottom: 0;
	opacity: 1;
	transition: margin .2s, opacity .2s;
}

.smushit [tooltip]:hover:after,
label.setting.smush-stats [tooltip]:hover:after,
.compat-field-wp_smush [tooltip]:hover:after {
	opacity: 1;
	z-index: 1;
	margin-bottom: 10px;
	transition: margin .2s, opacity .2s;
}

.smushit .disabled[tooltip]:before,
.smushit .disabled[tooltip]:after,
label.setting.smush-stats .disabled[tooltip]:before,
label.setting.smush-stats .disabled[tooltip]:after,
.compat-field-wp_smush .disabled[tooltip]:before,
.compat-field-wp_smush .disabled[tooltip]:after {
	display: none;
}

/** Image List **/
div.wp-smush-scan-result {
	background: white;

	div.wp-smush-notice {
		margin-top: 14px;
		padding: 15px 30px;
	}

	div.content {
		overflow: hidden;
		width: 100%;
	}
}

div.wp-smush-info.notice {
	font-size: 15px;
	letter-spacing: -0.015em;
	margin: 0 0 30px;
	padding: 15px;
}

/** Media Queries **/

@media screen and (max-width: 1024px) and (min-width: 800px) {
	/** Stats Section **/
	.smush-stats-wrapper h3 {
		padding: 6px 0;
	}
}

/** Media Queries for resolution below 782px **/
@media only screen and (max-width: 800px) {
	.dev-box.bulk-smush-wrapper.wp-smush-container {
		padding: 20px 10px;
	}
}

/**
 * CSS styles used Admin notice
 */
.smush-notice.notice {
	padding: 0;
	margin: 5px 0 10px;
	border: 1px solid #E5E5E5;
	background: #FFF;
	overflow: hidden;
	-webkit-border-radius: 6px;
	border-radius: 6px;
	-webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05);
	box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05);
	position: relative;
	z-index: 1;
	min-height: 80px;
	display: table; /* The magic ingredient! */
	font: 13px "Roboto", sans-serif;
}

.smush-notice.notice.loading:before {
	content: attr(data-message);
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.7);
	z-index: 5;
	text-align: center;
	line-height: 80px;
	font-size: 22px;
	font-weight: bold;
}

.smush-notice > div {
	display: table-cell; /* The magic ingredient! */
	vertical-align: middle;
	cursor: default;
	line-height: 1.5;
}

.smush-notice.notice.loading > div {
	-webkit-filter: blur(2px);
	-moz-filter: blur(2px);
	-o-filter: blur(2px);
	-ms-filter: blur(2px);
	filter: blur(2px);
}

.smush-notice-logo {
	padding-left: 30px;
}

.smush-notice-message {
	color: #23282D;
	font-size: 13px;
	font-weight: normal;
	line-height: 20px;
	padding: 20px;
	-webkit-font-smoothing: antialiased;
	width: 100%;
}

.smush-notice-cta {
	background: #F8F8F8;
	padding: 0 30px;
	position: relative;
	white-space: nowrap;
}

.wp-core-ui .smush-notice-cta button,
.wp-core-ui .smush-notice-cta .button-primary:active {
	vertical-align: middle;
}

.wp-core-ui .smush-notice-cta input[type="email"] {
	vertical-align: middle;
	line-height: 20px;
	margin: 0;
	min-width: 50px;
	max-width: 320px;
	text-align: center;
	padding-left: 0;
	padding-right: 0;
}

/**
 * Upsell lists.
 * @since 3.9.1
 */
#smush-box-cdn-upsell,
#smush-box-webp-wizard {
	.sui-upsell-list {
		max-width: 495px;
		text-align: left;
		margin: 0 auto;
		li {
			font-size:12px;
			border-bottom:1px solid #f2f2f2;
			padding-bottom: 10px;
			margin-bottom: 15px;
			letter-spacing: -0.23px;
			&:last-child {
				border-bottom: none;
			}
		}
	}
}

#smush-box-cdn-upsell .sui-upsell-list {
	max-width:350px;
}

@media only all and (max-width: 1000px) {
	.smush-notice.notice {
		display: block;
		font-size: 13px;
	}

	.smush-notice > .smush-notice-logo {
		float: left;
		display: inline-block;
		height: 80px;
		margin: 10px;
		border-radius: 4px;
	}

	.smush-notice > .smush-notice-message {
		width: auto;
		display: block;
		min-height: 80px;
	}

	.smush-notice > .smush-notice-cta {
		display: block;
		border-top: 1px solid #E5E5E5;
		border-left: 0;
		text-align: center;
		white-space: normal;
		line-height: 30px;
		padding: 10px 20px;
	}

	.wp-core-ui .smush-notice > .smush-notice-cta > input[type="email"],
	.smush-notice > .smush-notice-cta > button {
		font-size: 14px;
	}
}

@media only all and (max-width: 500px) {
	.wp-core-ui .smush-notice > .smush-notice-cta > input[type="email"],
	.smush-notice > .smush-notice-cta > button {
		display: block;
		width: 100% !important;
		max-width: none;
		margin-bottom: 4px;
		font-size: 16px;
		height: 34px;
	}
}

.wp-has-current-submenu.toplevel_page_smush {
	.wp-menu-name {
		background :#4763e4;
	}
}

#adminmenu #toplevel_page_smush .wp-submenu a[href*="smush_new-submenu_upsell"] {
	background: #571EE7 !important;
	color: #fff !important;
	display: flex !important;
	align-items: center;
	gap: 5px;
	font-size: 14px;
	font-weight: 400;

	.smush-admin-menu-upgrade-pro-tag {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		font-weight: var(--wpmudev-badge-font-weight, var(--wpmudev-font-normal, 400));
		white-space: nowrap;
		color: #fff;
		border-radius: 20px;
		height: 18px;
		padding: 0;
		width: 30px;
		border: 1px solid #fff;
		font-size: 12px;
		line-height:2;
	}

	.smush-admin-menu-upgrade-icon {
		margin-left: auto;
		flex-shrink: 0;

		&::after {
			content: '';
			display: inline-block;
			width: 16px;
			height: 16px;
			background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.72844 12.2749C3.59094 12.1416 3.51594 11.9833 3.50344 11.7999C3.4951 11.6166 3.5701 11.4437 3.72844 11.2812L9.36594 5.63742L10.6659 4.44367C10.8159 4.302 10.9743 4.23534 11.1409 4.24367C11.3076 4.252 11.4514 4.31659 11.5722 4.43742C11.693 4.55825 11.7534 4.702 11.7534 4.86867C11.7576 5.03534 11.6909 5.1895 11.5534 5.33117L10.3534 6.63117L4.71594 12.2624C4.56177 12.4166 4.39302 12.4916 4.20969 12.4874C4.03052 12.4874 3.8701 12.4166 3.72844 12.2749ZM11.1222 7.97492L11.2659 4.75617L7.93469 4.87492H5.80969C5.61802 4.87492 5.45135 4.81034 5.30969 4.68117C5.16802 4.54784 5.09719 4.38742 5.09719 4.19992C5.09719 4.01242 5.16385 3.852 5.29719 3.71867C5.43469 3.58117 5.60969 3.51242 5.82219 3.51242H11.7597C11.9847 3.51242 12.1639 3.58117 12.2972 3.71867C12.4305 3.85617 12.4972 4.03325 12.4972 4.24992V10.1812C12.4972 10.3853 12.4284 10.5583 12.2909 10.6999C12.1534 10.8374 11.9909 10.9062 11.8034 10.9062C11.6118 10.9062 11.4493 10.8374 11.3159 10.6999C11.1868 10.5583 11.1222 10.3895 11.1222 10.1937V7.97492Z' fill='white'/%3E%3C/svg%3E");
			background-size: contain;
			background-repeat: no-repeat;
			vertical-align: middle;
		}
	}
}

.smush-plugin-conflict-notice {
	border-left-width: 2px;
	box-shadow: inset 2px 0 0 0 #17a8e3, inset 0 0 0 1px #e6e6e6;
	border: none;

	.smush-plugin-conflict-manage-button {
		background-color: #007cba;
		color: #ffffff;
		font:500 12px / 16px "Roboto", Arial, sans-serif;
		text-transform: inherit;
		width: auto;
		min-width: 80px;
		padding: 5px 14px;
		letter-spacing: -0.25px;
		font-size:13px
	}

	.smush-dismiss-notice-button {
		text-decoration: none;
		font-size: 13px;
		color: #007cba;
	}
}
