/**
 * Centralized help UI: plain-sight descriptions, "?" tooltips, and
 * multi-control callouts, rendered by `Vincent42_Help` (includes/class-vincent42-help.php).
 *
 * Colors use `var(--wp--preset--color--*)`; spacing/radius use `--v42-*`
 * aliases, matching the rest of the app shell — no hex fallbacks on those vars.
 */

.v42-help-description {
	margin: var(--v42-space-sm) 0 var(--v42-space-md);
	font-size: 0.8125rem;
	color: var(--wp--preset--color--on-surface-variant);
}

.v42-help-tooltip {
	position: relative;
	display: inline-flex;
	vertical-align: middle;
	margin-left: 0.35rem;
	text-transform: none;
	font-weight: 400;
	letter-spacing: normal;
}

.v42-help-tooltip__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	padding: 0.6rem;
	margin: -0.6rem;
	border: 1px solid var(--wp--preset--color--outline);
	border-radius: 50%;
	background: var(--wp--preset--color--surface-container);
	color: var(--wp--preset--color--on-surface-variant);
	font-size: 0.75rem;
	line-height: 1;
	cursor: pointer;
}

.v42-help-tooltip__trigger:hover,
.v42-help-tooltip__trigger:focus-visible,
.v42-help-tooltip__trigger[aria-expanded="true"] {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.v42-help-tooltip__icon {
	pointer-events: none;
}

.v42-help-tooltip__panel {
	position: absolute;
	z-index: 20;
	top: calc(100% + 0.4rem);
	left: 0;
	width: max-content;
	max-width: 18rem;
	padding: var(--v42-space-sm) var(--v42-space-md);
	border-radius: var(--v42-radius-lg);
	border: 1px solid var(--wp--preset--color--outline);
	background: var(--wp--preset--color--surface-container);
	color: var(--wp--preset--color--on-surface);
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.4;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* Opt-in for triggers near a right-hand edge (e.g. dense table columns) so the panel doesn't overflow off-screen. */
.v42-help-tooltip--align-end .v42-help-tooltip__panel {
	left: auto;
	right: 0;
}

/* Progressive enhancement: desktop hover reveals the panel without waiting for the JS toggle.
   Only ever *adds* visibility on top of the `hidden` attribute the JS also drives — never fights it. */
@media (hover: hover) {
	.v42-help-tooltip:hover .v42-help-tooltip__panel[hidden] {
		display: block;
	}
}

.v42-help-tooltip__link {
	display: inline-block;
	margin-top: 0.35rem;
	font-weight: 600;
}

.v42-help-callout {
	margin: var(--v42-space-md) 0;
	padding: var(--v42-space-sm) var(--v42-space-md);
	border-left: 3px solid var(--wp--preset--color--primary);
	border-radius: 0 var(--v42-radius-lg) var(--v42-radius-lg) 0;
	background: color-mix(in srgb, var(--wp--preset--color--primary) 6%, var(--wp--preset--color--surface-container));
}

#v42-credit-transfer-step-help-source,
#v42-credit-transfer-step-help-dest {
	margin-left: 0.35rem;
}

.v42-help-callout__text {
	margin: 0;
	font-size: 0.875rem;
	color: var(--wp--preset--color--on-surface-variant);
}
