/**
 * InlinerWP: marks on the page itself, its two toolbar entries and the font the editor uses.
 *
 * The editor's own interface lives in a Shadow DOM and can't reach the site's markup, so the outlines round
 * editable items are drawn here, in inlinerwp.com's royal blue with the site's focus ring. Outlines take no room, so
 * the site's layout never moves. Fonts declared inside a Shadow DOM don't register, so Inter is declared here under
 * a name of its own, which the site's own fonts can't clash with.
 *
 * @package InlinerWP
 */

@font-face {
	font-family: "InlinerWP Inter";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/inter-400.woff2") format("woff2");
}

@font-face {
	font-family: "InlinerWP Inter";
	font-style: normal;
	font-weight: 500 700;
	font-display: swap;
	src: url("../fonts/inter-600.woff2") format("woff2");
}

/* Editable items while inline editing is on: a light outline under the pointer, a firm one while in use. */
html body.qie-on [data-qie-src]:hover {
	outline: 2px solid rgb(47 84 235 / 0.5);
	outline-offset: 3px;
}

html body [data-qie-src][data-qie-menu],
html body [data-qie-src][data-qie-spot],
html body [data-qie-row][data-qie-menu],
html body [data-qie-row][data-qie-spot],
html body [data-qie-card][data-qie-menu],
html body [data-qie-card][data-qie-spot],
html body [data-qie-row][data-qie-open] {
	outline: 2px solid #2f54eb;
	outline-offset: 3px;
}

/* What the tour points at: an item on the page or a toolbar entry. */
html [data-qie-tour-at] {
	outline: 3px solid #2f54eb !important;
	outline-offset: 3px;
	box-shadow: 0 0 0 4px rgb(47 84 235 / 0.2) !important;
}

/* A list item or card being removed: faded out until Save. */
html body [data-qie-row][data-qie-removing],
html body [data-qie-card][data-qie-removing] {
	opacity: 0.35;
	outline: 2px dashed #2f54eb;
	outline-offset: 3px;
}

/* A new list item or card before it is saved. */
html body [data-qie-new] {
	outline: 2px dashed #2f54eb;
	outline-offset: 5px;
}

html body [data-qie-new] [contenteditable] {
	cursor: text;
	min-height: 1em;
}

html body [data-qie-new] [data-qie-placeholder]:empty::before {
	content: attr(data-qie-placeholder);
	opacity: 0.5;
}

html body [data-qie-new] [contenteditable]:focus {
	outline: 2px solid #2f54eb;
	outline-offset: 3px;
}

/* Pictures standing in until one is chosen. Content that stays empty. */
html body [data-qie-new] [data-qie-blank] {
	opacity: 0.3;
	cursor: pointer;
}

html body.qie-on [data-qie-type="button"]:hover,
html body.qie-on [data-qie-type="image"]:hover {
	cursor: context-menu;
}

html body [data-qie-src][data-qie-busy] {
	cursor: progress;
}

/* Paused while the page is open in Bricks or the block editor. */
html body.qie-on [data-qie-src][data-qie-paused]:hover {
	outline: 2px dashed #535b80;
	cursor: not-allowed;
}

/* Text being typed into: a firm outline with the site's focus ring, so it is clear where the words go. */
html body [data-qie-src][data-qie-editing] {
	outline: 2px solid #2f54eb;
	outline-offset: 3px;
	box-shadow: 0 0 0 7px rgb(47 84 235 / 0.2);
	cursor: text;
	caret-color: #2f54eb;
}

/* ---------- The toolbar: the on and off switch and the panel's entry ---------- */

#wpadminbar #wp-admin-bar-qie-toggle > .ab-item,
#wpadminbar #wp-admin-bar-qie-items > .ab-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* The switch: the words say on or off, the drawing shows it at a glance. The toolbar's own styles allow no
   pictures before an entry, so the track comes before the words and the knob is drawn over it. */
#wpadminbar #wp-admin-bar-qie-toggle > .ab-item {
	position: relative;
	padding-left: 8px;
}

#wpadminbar #wp-admin-bar-qie-toggle > .ab-item::before {
	content: "";
	position: relative;
	top: 0;
	flex: 0 0 auto;
	width: 26px;
	height: 14px;
	margin: 0;
	padding: 0;
	border-radius: 999px;
	background-color: rgba(240, 246, 252, 0.3);
	transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

body.rtl #wpadminbar #wp-admin-bar-qie-toggle > .ab-item {
	padding-right: 8px;
	padding-left: 7px;
}

body.rtl #wpadminbar #wp-admin-bar-qie-toggle > .ab-item::after {
	right: 10px;
	left: auto;
}

body.rtl #wpadminbar #wp-admin-bar-qie-toggle > .ab-item[aria-pressed="true"]::after {
	transform: translateX(-12px);
}

/* The panel's entry, with the site's map icon. */
#wpadminbar #wp-admin-bar-qie-items > .ab-item::before {
	content: "";
	position: relative;
	top: 0;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 0;
	padding: 0;
	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;
}

#wpadminbar #wp-admin-bar-qie-items > .ab-item[aria-expanded="true"] {
	background: #2c3338;
	color: #fff;
}

#wpadminbar #wp-admin-bar-qie-items > .ab-item[aria-expanded="true"]::before {
	background-color: #a6b8ff;
}

@media (prefers-reduced-motion: reduce) {
	#wpadminbar #wp-admin-bar-qie-toggle > .ab-item::before,
	#wpadminbar #wp-admin-bar-qie-toggle > .ab-item::after {
		transition: none;
	}
}

@media (forced-colors: active) {
	#wpadminbar #wp-admin-bar-qie-toggle > .ab-item::before {
		border: 1px solid CanvasText;
		forced-color-adjust: none;
	}
}
