/* stylelint-disable selector-class-pattern */

@import 'mediawiki.skin.variables.less';
@import 'mediawiki.mixins.less';

/**
 * Helper classes to provide styles for classes provided by functions of Linker class or Changes class.
 * Also used for CommentFormatter class, which was previous in Linker.
 * LogEventsList also seems to be here.
 */

/** Class is added by ChangesList::flag */
.unpatrolled {
	font-weight: bold;
	color: @color-destructive;
}

/** Class is added by ChangesList::flag */
.newpage,
.minoredit,
.botedit {
	font-weight: bold;
}

/** Class is added by UserLinkRenderer::userLink */
.mw-userlink {
	// Word-break overlong user names, see T237230.
	// FIXME: This property is introduced now, but will be separated in a follow-up
	// caring about 'i18n-directionality', see T247033.
	.hyphens( auto );
	unicode-bidi: embed;
}

/** Class is added by UserLinkRenderer::userLink */
.mw-tempuserlink {
	background-color: @background-color-interactive;
	padding: 2px 8px;
	border-radius: @border-radius-base;
}

/** Class is added by UserLinkRenderer::userLink */
.mw-tempuserlink-expired {
	text-decoration: line-through 0.075em;
	position: relative;

	/** Class is added by UserLinkRenderer::userLink */
	&--tooltip {
		display: none;
		pointer-events: none;
		top: 100%;
		left: 0;
	}

	&:hover &--tooltip,
	&:focus &--tooltip {
		display: block;
	}
}

a.mw-tempuserlink-expired:hover {
	text-decoration: line-through underline 0.075em;
}

/* Comment portions of RC entries, also used by MediaWiki\CommentFormatter\CommentFormatter::formatBlock */
span.comment {
	font-style: italic;
	unicode-bidi: -moz-isolate;
	unicode-bidi: isolate;
	// Covering several contexts for breaking up long comments, see T158725.
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-word;
}

/* The auto-generated edit comments */
.autocomment,
.autocomment a,
.autocomment a:visited {
	color: @color-subtle;
}

/** rev_deleted stuff */
li span.deleted,
span.history-deleted {
	text-decoration: line-through;
	color: @color-subtle;
	font-style: italic;
}

span.mw-history-suppressed {
	/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
	text-decoration-style: double;
	color: @color-base;
}

/* (show/hide) revision deletion links */
span.mw-revdelundel-link,
strong.mw-revdelundel-link {
	font-size: 90%;
}

// Historically this has been styled red, but should be distinguished from
// normal red links as the contributions page does exist. To be revisited later.
// More context: T303571#7781282
.mw-usertoollinks-contribs-no-edits {
	color: @color-link-new;

	&:visited {
		color: @color-link-new--visited;
	}
}

.mw-logevent-actionlink,
.mw-logevent-tool,
.mw-diff-tool,
.mw-pager-tools {
	a {
		.cdx-mixin-link-base();
	}
}

ul.mw-logevent-footer {
	margin: 0;
	padding-top: 0.5em;

	li {
		display: inline list-item;
		padding: 0 0.3em;
		list-style: disc;
	}

	li:first-child {
		padding-left: 0;
		list-style: none;
	}
}
