/**
 * 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 */
		background-image: @background-image-magnify-ltr;
		/* Don't annoy people who copy-paste everything too much */
		-webkit-user-select: none;
		-moz-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 {
	background-image: @background-image-magnify-ltr;
}

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

/* @noflip */
.mw-content-rtl .magnify a {
	background-image: @background-image-magnify-rtl;
}

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

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