/**
 * MediaWiki style sheet for styles relating to thumbnails.
 * For legacy reasons this also contains the floatleft, tleft, tright and floatright classes.
 *
 * CSS that does not relate to styling thumbnails generated by the parser in a vanilla
 * MediaWiki install do not belong here.
 */

/* stylelint-disable selector-class-pattern */
@import 'variables';
@import 'content.thumbnails-layout.less';

/* Images */
/* @noflip */
div.floatright,
table.floatright {
	margin: @margin-floatright;
}

/* @noflip */
div.floatleft,
table.floatleft {
	margin: @margin-floatleft;
}

/* Thumbnails */
div.thumb {
	margin-bottom: @margin-bottom-thumb;
	width: auto;
	background-color: transparent;
}

div.thumbinner {
	border: @border-thumbinner;
	padding: 3px;
	background-color: @background-color-thumbinner;
	font-size: @font-size-thumbinner;
	text-align: center;
	/* new block formatting context,
	 * to clear background from floating content */
	overflow: hidden;
}

.thumbimage {
	background-color: @background-color-thumbimage;
	border: @border-thumbimage;
}

.thumbcaption {
	border: 0;
	line-height: @line-height-thumbcaption;
	padding: 3px;
	font-size: @font-size-thumbcaption;
	/* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
	text-align: left;
}

.magnify {
	/* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
	float: right;
	margin-left: 3px;

	a {
		display: block;
		/* Hide the text… */
		text-indent: 15px;
		white-space: nowrap;
		overflow: hidden;
		/* …and replace it with the image */
		width: 15px;
		height: 11px;
		/* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */

		/* Use same SVG support hack as mediawiki.legacy's shared.css */
		background-image: url( images/magnify-clip-ltr.png );
		background-image: linear-gradient( transparent, transparent ), url( images/magnify-clip-ltr.svg );
		/* Don't annoy people who copy-paste everything too much */
		-moz-user-select: none;
		-webkit-user-select: none;
		-ms-user-select: none;
		user-select: none;
	}
}

.thumbborder {
	border: @border-thumbborder;
}

/* Directionality-specific styles for thumbnails - their positioning depends on content language */

/* @noflip */
.mw-content-ltr .magnify {
	margin-left: 3px;
	margin-right: 0;
}

/* @noflip */
.mw-content-ltr .magnify a {
	/* Use same SVG support hack as mediawiki.legacy's shared.css */
	background-image: @background-image-magnify-ltr-1;
	background-image: @background-image-magnify-ltr-2;
}

/* @noflip */
.mw-content-rtl .magnify {
	margin-left: 0;
	margin-right: 3px;
}

/* @noflip */
.mw-content-rtl .magnify a {
	/* Use same SVG support hack as mediawiki.legacy's shared.css */
	background-image: @background-image-magnify-rtl-1;
	background-image: @background-image-magnify-rtl-2;
}

/* @noflip */
div.tright {
	margin: @margin-tright;
}

/* @noflip */
div.tleft {
	margin: @margin-tleft;
}
