/* Shared "?" tooltips — used on the Drop Stack Builder (admin) and the public demo.
   Colors are explicit so a host theme's button/label styles can't wreck them. */

.sitebyter-ds-tip-wrap {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	line-height: 1;
}

.sitebyter-ds-tip-wrap .sitebyter-ds-tip {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid #8c8f94;
	border-radius: 50%;
	background: #fff;
	color: #50575e;
	font: 700 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	cursor: help;
}

.sitebyter-ds-tip-wrap .sitebyter-ds-tip:hover,
.sitebyter-ds-tip-wrap.is-open .sitebyter-ds-tip {
	border-color: #2271b1;
	background: #2271b1;
	color: #fff;
}

.sitebyter-ds-tip-wrap .sitebyter-ds-tip:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.sitebyter-ds-tip-bubble {
	display: none;
	position: absolute;
	z-index: 100001;
	top: calc(100% + 8px);
	left: -8px;
	box-sizing: border-box;
	width: 280px;
	max-width: calc(100vw - 32px);
	padding: 10px 12px;
	border-radius: 6px;
	background: #1d2327;
	color: #f0f0f1;
	font: 400 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	white-space: normal;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
	/* The bubble is text only. Letting clicks pass through means an open tip
	   never blocks the "?" button of the setting right below it. */
	pointer-events: none;
}

/* Little pointer toward the "?" button. */
.sitebyter-ds-tip-bubble::before {
	content: "";
	position: absolute;
	top: -5px;
	left: 14px;
	width: 10px;
	height: 10px;
	background: #1d2327;
	transform: rotate(45deg);
}

.sitebyter-ds-tip-wrap.is-open .sitebyter-ds-tip-bubble {
	display: block;
}

/* Set by the script when the bubble would run off the right edge of the screen. */
.sitebyter-ds-tip-wrap.is-align-right .sitebyter-ds-tip-bubble {
	left: auto;
	right: -8px;
}

.sitebyter-ds-tip-wrap.is-align-right .sitebyter-ds-tip-bubble::before {
	left: auto;
	right: 14px;
}

/* Set by the script when there's no room below the button. */
.sitebyter-ds-tip-wrap.is-above .sitebyter-ds-tip-bubble {
	top: auto;
	bottom: calc(100% + 8px);
}

.sitebyter-ds-tip-wrap.is-above .sitebyter-ds-tip-bubble::before {
	top: auto;
	bottom: -5px;
}
