/*!
 * Copyright 2024 Adobe. All rights reserved.
 *
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at <http://www.apache.org/licenses/LICENSE-2.0>
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

.spectrum-ContextualHelp {
	position: relative;
	min-inline-size: var(--mod-spectrum-contextual-help-minimum-width, var(--spectrum-contextual-help-minimum-width));
}

.spectrum-ContextualHelp-button {
	display: flex;
}

.spectrum-ContextualHelp-popover {
	padding-block: var(--mod-spectrum-contextual-help-padding, var(--spectrum-spacing-400));
	padding-inline: var(--mod-spectrum-contextual-help-padding, var(--spectrum-spacing-400));
	font-size: var(--mod-spectrum-contextual-help-body-size, var(--spectrum-contextual-help-body-size));
	color: var(--highcontrast-contextual-help-body-color, var(--mod-contextual-help-body-color, var(--spectrum-body-color)));

	max-inline-size: var(--mod-spectrum-contextual-help-popover-maximum-width);

	.spectrum-ContextualHelp-heading,
	.spectrum-ContextualHelp-body {
		margin: 0;
	}

	.spectrum-ContextualHelp-heading {
		margin-block-end: var(--mod-spectrum-contextual-help-content-spacing, var(--spectrum-contextual-help-content-spacing));
		font-size: var(--mod-spectrum-contextual-help-heading-size, var(--spectrum-contextual-help-title-size));
		color: var(--highcontrast-contextual-help-heading-color, var(--mod-contextual-help-heading-color, var(--spectrum-heading-color)));
	}
}

.spectrum-ContextualHelp-link {
	margin-block-start: var(--mod-spectrum-contextual-help-link-spacing, var(--spectrum-spacing-300));
}

@media (forced-colors: active) {
	.spectrum-ContextualHelp {
		--highcontrast-contextual-help-heading-color: CanvasText;
		--highcontrast-contextual-help-body-color: CanvasText;
	}
}
