/**
 * InlinerWP Demo: the bar along the top of the demo page, in inlinerwp.com's "ink" scheme.
 *
 * It takes the toolbar's place (32 pixels, 46 on small screens) and the page moves down to make room, as it does for
 * the toolbar. Its switch and its panel button are InlinerWP's own toolbar entries, found by their IDs. Inter is
 * declared by InlinerWP's editor-page.css as "InlinerWP Inter".
 *
 * @package InlinerWP_Demo
 */

html {
	--wp-admin--admin-bar--height: 32px;
	margin-top: 32px !important;
}

.iwd-bar {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 16px;
	height: 32px;
	margin: 0;
	padding: 0 12px;
	background: #0c1230;
	color: #cdd4f2;
	font: 400 13px/32px "InlinerWP Inter", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.iwd-bar *,
.iwd-bar *::before,
.iwd-bar *::after {
	box-sizing: border-box;
}

.iwd-logo {
	display: inline-flex;
	flex: 0 0 auto;
	color: #fff;
}

.iwd-logo svg {
	display: block;
	width: auto;
	height: 14px;
}

.iwd-note {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.iwd-items {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 4px;
	margin: 0 0 0 auto;
	padding: 0;
	list-style: none;
}

.iwd-items li {
	margin: 0;
	padding: 0;
}

.iwd-items a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 32px;
	padding: 0 10px;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.iwd-items a:hover {
	background: #151d45;
	color: #a6b8ff;
}

.iwd-items a:focus-visible,
.iwd-reset:focus-visible {
	outline: 3px solid #a6b8ff;
	outline-offset: -3px;
}

/* InlinerWP's switch, as in the toolbar: the track before the words and the knob over it. */
#wp-admin-bar-qie-toggle > a {
	position: relative;
}

#wp-admin-bar-qie-toggle > a::before {
	content: "";
	flex: 0 0 auto;
	width: 26px;
	height: 14px;
	border-radius: 999px;
	background-color: #535b80;
	transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

#wp-admin-bar-qie-toggle > a::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 12px;
	width: 10px;
	height: 10px;
	margin-top: -5px;
	border-radius: 50%;
	background-color: #fff;
	transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

#wp-admin-bar-qie-toggle > a[aria-pressed="true"]::before {
	background-color: #2f54eb;
}

#wp-admin-bar-qie-toggle > a[aria-pressed="true"]::after {
	transform: translateX(12px);
}

/* The panel's button, with inlinerwp.com's map icon. */
#wp-admin-bar-qie-items > a::before {
	content: "";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='M14 4v16'/%3E%3Cpath d='M6 8h5M6 11h4M17 8h1.5M17 11h1.5M17 14h1.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='M14 4v16'/%3E%3Cpath d='M6 8h5M6 11h4M17 8h1.5M17 11h1.5M17 14h1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

#wp-admin-bar-qie-items > a[aria-expanded="true"] {
	background: #151d45;
	color: #a6b8ff;
}

.iwd-count {
	flex: 0 0 auto;
	color: #a3acd4;
	white-space: nowrap;
}

/* Reset: the site's secondary button on ink. */
.iwd-reset {
	flex: 0 0 auto;
	height: 24px;
	margin: 0;
	padding: 0 12px;
	border: 2px solid #2c3668;
	border-radius: 0.75rem;
	background: transparent;
	color: #fff;
	font: 600 12px/20px "InlinerWP Inter", "Inter", system-ui, sans-serif;
	cursor: pointer;
	transition: border-color 160ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.iwd-reset:hover:not(:disabled) {
	border-color: #a6b8ff;
	color: #a6b8ff;
}

.iwd-reset:disabled {
	opacity: 0.45;
	cursor: default;
}

@media screen and (max-width: 1100px) {
	.iwd-note {
		display: none;
	}
}

@media screen and (max-width: 782px) {
	html {
		--wp-admin--admin-bar--height: 46px;
		margin-top: 46px !important;
	}

	.iwd-bar {
		gap: 8px;
		height: 46px;
		padding: 0 8px;
		line-height: 46px;
	}

	.iwd-logo,
	.iwd-count {
		display: none;
	}

	.iwd-items {
		margin-left: 0;
	}

	.iwd-items a {
		height: 46px;
		padding: 0 8px;
		font-size: 12px;
	}

	.iwd-reset {
		margin-left: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iwd-bar *,
	.iwd-bar *::before,
	.iwd-bar *::after {
		transition: none !important;
	}
}
