/* stylelint-disable declaration-property-unit-allowed-list */

.launch-bar-global-styles-button {
	position: relative;
}

.launch-bar-global-styles-popover {
	position: absolute;
	width: 320px;
	top: 48px;
	font-size: 14px;
	left: 50%;
	transform: translateX(-50%);
	background-color: #fff;
	padding: 24px 24px 0;
	line-height: 20px;
	color: #2c3338;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	border: 1px solid #c3c4c7;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;

	&::before {
		content: "";
		width: 0;
		height: 0;
		border-left: 8px solid transparent;
		border-right: 8px solid transparent;
		border-bottom: 8px solid #fff;
		position: absolute;
		top: -8px;
		left: 50%;
		transform: translateX(-50%);
	}

	.launch-bar-global-styles-upgrade,
	.launch-bar-global-styles-reset {
		min-height: 28px;
		box-sizing: border-box;
		width: 100%;
		justify-content: center;
		height: auto;
	}

	.launch-bar-global-styles-upgrade {
		border: 1px solid #0675c4;
		background: #0675c4;
		color: #fff;
		border-radius: 2px;

		&:hover {
			background: #006ba1;
		}
	}

	.launch-bar-global-styles-reset {
		color: inherit;
		font-weight: normal !important;

		svg:first-child {
			margin-right: 4px;
		}

		svg:last-child {
			margin-left: 4px;
			position: relative;
			top: 1px;
		}

		&:hover {
			background: transparent;
			color: #676767;
		}
	}
}

.launch-banner-content .launch-bar-global-styles-preview {
	border-top: 1px solid #c3c4c7;
	width: calc(100% + 48px);
	margin: 0 -24px;
	box-sizing: border-box;
	padding: 12px 24px;
	font-size: 13px;
	line-height: 17px;
	color: inherit;

	&:hover {
		background: none;
	}

	label {
		position: relative;
		display: inline-block;
		width: 36px;
		height: 18px;
		margin-right: 8px;

		span {
			position: absolute;
			cursor: pointer;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			background-color: #ccc;
			transition: 0.4s;
			/* stylelint-disable-next-line scales/radii */
			border-radius: 18px;

			&::before {
				position: absolute;
				content: "";
				height: 12px;
				width: 12px;
				left: 3px;
				bottom: 3px;
				background-color: #fff;
				transition: 0.4s;
				border-radius: 50%;
			}
		}

		input {
			opacity: 0;
			width: 0;
			height: 0;

			&:checked + span {
				background-color: #0675c4;

				&::before {
					transform: translateX(18px);
				}
			}

			&:focus + span {
				box-shadow: 0 0 1px #2196f3;
			}
		}
	}
}

.launch-banner-content .launch-bar-global-styles-popover .launch-bar-global-styles-message a {
	display: inline;
	color: inherit;
	padding: 0;
	font-weight: normal;
	font-size: inherit;
	text-decoration: underline !important;
	background: none;
}

.launch-bar-global-styles-toggle svg {
	margin-right: 4px;
}

.launch-bar-global-styles-close {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 24px;
	height: 24px;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;

	svg {
		fill: #1e1e1e;
		width: 18px;
		height: 18px;
	}
}

@media screen and (max-width: 460px) {
	.launch-bar-global-styles-button {
		position: static;
	}

	.launch-bar-global-styles-popover {
		width: auto;
		left: 20px;
		right: 20px;
		transform: none;
	}
}
