@use "@wordpress/base-styles/mixins";

.components-external-link {
	border-radius: var(--wpds-border-radius-sm);
	color: var(--wpds-color-foreground-interactive-brand);
	text-decoration: none;

	&:visited {
		color: var(--wpds-color-foreground-interactive-brand);
	}

	&:hover,
	&:active {
		color: var(--wpds-color-foreground-interactive-brand-active);
	}

	&:focus {
		// Override style from wp-admin common.css.
		box-shadow: none;
		border-radius: var(--wpds-border-radius-sm);

		&:not(:active) {
			@include mixins.outset-ring__focus();
		}
	}
}

.components-external-link__contents {
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-thickness: from-font;
}

.components-external-link__icon {
	line-height: 1;
	display: inline-block;
	margin-inline-start: var(--wpds-dimension-padding-xs);
	font-weight: var(--wpds-typography-font-weight-default);
}
