/* Shared, progressively enhanced information buttons and floating text. */
.ds-tooltip {
	display: inline-flex;
	flex: 0 0 auto;
	vertical-align: middle;
}

.ds-tooltip[hidden],
.ds-tooltip__panel[hidden] {
	display: none !important;
}

.ds-tooltip .ds-tooltip__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	min-width: 24px;
	min-height: 24px;
	margin: 0;
	padding: 4px;
	color: inherit;
	font: inherit;
	line-height: 1;
	background: transparent;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
	touch-action: manipulation;
}

.ds-tooltip__trigger svg {
	display: block;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

.ds-tooltip .ds-tooltip__trigger:hover,
.ds-tooltip .ds-tooltip__trigger[aria-expanded="true"] {
	color: var(--ds-color-text-primary);
	background: var(--ds-surface-muted, #f3f6fb);
}

.ds-tooltip .ds-tooltip__trigger:focus-visible {
	outline: 2px solid var(--ds-brand-color, #3675b6);
	outline-offset: 2px;
}

/* Mounted under body while open so a card's overflow/transform cannot clip it. */
.ds-tooltip__panel {
	position: fixed;
	z-index: 10050;
	box-sizing: border-box;
	width: min(300px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	margin: 0;
	padding: 12px 14px;
	overflow: auto;
	color: var(--ds-color-text-primary);
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	overflow-wrap: break-word;
	background: var(--ds-surface-color, #fff);
	border: 1px solid var(--ds-border-color, #ddd);
	border-radius: 8px;
	box-shadow: 0 6px 24px rgb(23 25 28 / 18%);
}
