.omb-chart-tool {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 100000;
	display: none;
	width: min(24rem, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	overflow: auto;
	padding: 1rem;
	border: 1px solid rgba(15, 61, 76, 0.16);
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 1.25rem 3rem rgba(15, 61, 76, 0.22);
	color: #0f3d4c;
	font-family: "Source Sans 3", sans-serif;
	font-size: 0.875rem;
	line-height: 1.35;
}

.omb-chart-tool-enabled .omb-chart-tool {
	display: block;
}

.omb-chart-tool-enabled img[data-omb-chart-tool-ready="true"] {
	cursor: crosshair;
}

.omb-chart-tool-selection {
	outline: 3px solid #169bff !important;
	outline-offset: 5px !important;
}

.omb-chart-tool__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.omb-chart-tool--minimized {
	width: min(18rem, calc(100vw - 2rem));
	padding: 0.75rem;
}

.omb-chart-tool--minimized .omb-chart-tool__header {
	margin-bottom: 0;
}

.omb-chart-tool--minimized .omb-chart-tool__body {
	display: none;
}

.omb-chart-tool__title {
	margin: 0;
	color: #0f3d4c;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.omb-chart-tool__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	padding: 0.35rem 0.65rem;
	border: 1px solid rgba(15, 61, 76, 0.2);
	border-radius: 0.25rem;
	background: #0f3d4c;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.omb-chart-tool__button:hover,
.omb-chart-tool__button:focus-visible {
	background: #195a70;
}

.omb-chart-tool__button--secondary {
	background: #eef5f7;
	color: #0f3d4c;
}

.omb-chart-tool__button--secondary:hover,
.omb-chart-tool__button--secondary:focus-visible {
	background: #d9e9ee;
}

.omb-chart-tool__button--cta {
	flex: 1 1 100%;
	min-height: 2.35rem;
	background: #1f8f5f;
	border-color: #1f8f5f;
	color: #fff;
}

.omb-chart-tool__button--cta:hover,
.omb-chart-tool__button--cta:focus-visible {
	background: #17794f;
	border-color: #17794f;
}

.omb-chart-tool__button--active {
	background: #d8b26e;
	border-color: #d8b26e;
	color: #0f3d4c;
}

.omb-chart-tool__button--active:hover,
.omb-chart-tool__button--active:focus-visible {
	background: #cba45f;
}

.omb-chart-tool__meta {
	display: grid;
	gap: 0.35rem;
	margin-bottom: 0.75rem;
}

.omb-chart-tool__meta-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	border-bottom: 1px solid rgba(15, 61, 76, 0.1);
	padding-bottom: 0.35rem;
}

.omb-chart-tool__label {
	color: rgba(15, 61, 76, 0.72);
	font-weight: 700;
}

.omb-chart-tool__value {
	min-width: 0;
	text-align: right;
	word-break: break-word;
}

.omb-chart-tool__control {
	display: grid;
	gap: 0.45rem;
	margin: 0.9rem 0;
}

.omb-chart-tool__control label {
	margin: 0;
	color: #0f3d4c;
	font-weight: 700;
}

.omb-chart-tool__range-row {
	display: grid;
	grid-template-columns: 1fr 5rem;
	gap: 0.5rem;
	align-items: center;
}

.omb-chart-tool__range {
	width: 100%;
	accent-color: #0f3d4c;
}

.omb-chart-tool__input {
	width: 100%;
	min-height: 2rem;
	padding: 0.3rem 0.45rem;
	border: 1px solid rgba(15, 61, 76, 0.25);
	border-radius: 0.25rem;
	color: #0f3d4c;
	font: inherit;
}

.omb-chart-tool__actions,
.omb-chart-tool__step-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.omb-chart-tool__legend {
	display: grid;
	gap: 0.3rem;
	margin-top: 0.7rem;
	padding: 0.55rem 0.65rem;
	border: 1px solid rgba(15, 61, 76, 0.12);
	border-radius: 0.35rem;
	background: #f7fbfc;
	color: rgba(15, 61, 76, 0.82);
	font-size: 0.78rem;
	font-weight: 700;
}

.omb-chart-tool__legend span {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.omb-chart-tool__legend-swatch {
	display: inline-block;
	width: 1.65rem;
	height: 0;
	border-top: 2px solid rgba(22, 155, 255, 0.78);
}

.omb-chart-tool__legend-swatch--center {
	border-top-color: rgba(216, 178, 110, 0.95);
	border-top-style: dashed;
}

.omb-chart-tool__data-label {
	margin: 0.75rem 0 0.35rem;
	color: #0f3d4c;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.omb-chart-tool__output {
	display: block;
	width: 100%;
	min-height: 9rem;
	margin-top: 0.75rem;
	padding: 0.65rem;
	border: 1px solid rgba(15, 61, 76, 0.18);
	border-radius: 0.35rem;
	background: #f4f8f9;
	color: #0f3d4c;
	font: 0.75rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	resize: vertical;
}

.omb-chart-tool__status {
	margin: 0.65rem 0 0;
	color: rgba(15, 61, 76, 0.78);
	font-size: 0.78rem;
}

.omb-chart-tool-guides {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	pointer-events: none;
}

.omb-chart-tool-enabled.omb-chart-tool-guides-on .omb-chart-tool-guides {
	display: block;
}

.omb-chart-tool-guide {
	position: absolute;
	pointer-events: none;
}

.omb-chart-tool-guide--vertical {
	top: 0;
	bottom: 0;
	width: 1px;
	background: rgba(22, 155, 255, 0.78);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.omb-chart-tool-guide--horizontal {
	left: 0;
	right: 0;
	height: 1px;
	background: rgba(22, 155, 255, 0.78);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.omb-chart-tool-guide[data-chart-tool-guide="center-x"] {
	width: 2px;
	background: repeating-linear-gradient(
		to bottom,
		rgba(216, 178, 110, 0.95) 0,
		rgba(216, 178, 110, 0.95) 0.7rem,
		transparent 0.7rem,
		transparent 1.15rem
	);
}

.omb-chart-tool-guide[data-chart-tool-guide="center-y"] {
	height: 2px;
	background: repeating-linear-gradient(
		to right,
		rgba(216, 178, 110, 0.95) 0,
		rgba(216, 178, 110, 0.95) 0.7rem,
		transparent 0.7rem,
		transparent 1.15rem
	);
}

@media (max-width: 640px) {
	.omb-chart-tool {
		right: 0.75rem;
		bottom: 0.75rem;
		width: calc(100vw - 1.5rem);
	}
}
