/* CSS placed here will affect users of the desktop site */

/* Hide main page stuff */
body.page-Main_Page.action-view :is(h1.firstHeading, #contentSub, #siteSub, #catlinks, #lastmod) {
	display: none !important;
}

/* Desktop/mobile classes */
@media all and (max-width: 550px) {
	body:not(.skin-timeless) :is(.nomobile, .desktoponly) {
		display: none !important;
	}
}
@media all and (min-width: 551px) {
	body:not(.skin-timeless) :is(.nodesktop, .mobileonly) {
		display: none !important;
	}
}

/* Table of contents */
body:is(.skin-monobook, .skin-vector, .skin-nimbus) #toc {
	margin-top: 0.7em;
	margin-bottom: 3px;
}

/* New user message box */
.usermessage {
	background: #ffce7b;
	border-color: #ffa500;
	margin-top: 1em;
}

/* Thumbs */
div.tleft, div.tright {
	margin-top: 0.25em;
	margin-bottom: 0.8em;
}
div.thumb.tnone {
	margin-top: 0.5em;
	margin-bottom: 0.8em;
}

/* Galleries */
ul.gallery, li.gallerybox div.thumb {
	margin-bottom: 0;
	padding-bottom: 0;
}
#mw-content-text ul.gallery {
	margin: 2px;
	padding: 2px;
}
li.gallerycaption {
	text-align: unset;
}

/* File pages */
.mw_metadata {
	margin-top: 5px;
}

/* Upload form */
#mw-htmlform-description .mw-editTools {
	display: none;
}

/* Watchlist expiry */
#wpWatchlistExpiry, #wpWatchlistExpiryWidget .oo-ui-dropdownWidget-handle {
	height: auto;
	min-height: 0;
	padding-top: 4px;
	padding-left: 7px;
	padding-bottom: 3px;
}

/* Edit section */
.client-js :is(.mw-content-ltr, .mw-content-rtl) .mw-editsection-bracket:first-of-type,
.client-js :is(.mw-content-ltr, .mw-content-rtl) .mw-editsection-bracket:not(:first-of-type) {
	margin: 0;
	color: unset;
}

/* Edit summary preview */
.mw-summary-preview {
	margin-bottom: 0.5em;
}

/* Diff text */
.diffchange { font-weight: normal; }
.diff-addedline, .diff-deletedline, .diff-context {
	font-size: 92%;
}

/* OOUI fix */
.oo-ui-optionWidget.oo-ui-labelElement > .oo-ui-labelElement-label {
	overflow: visible;
}

/* Dismissable site notice */
.sitedir-ltr .mw-dismissable-notice-body {
	margin: 0 60px 0 0;
}
.sitedir-rtl .mw-dismissable-notice-body {
	margin: 0 0 0 60px;
}

/* Captcha spacing */
#editform #wpCaptchaWord {
	margin-top: 2.5px;
}
#userloginForm label:not([for]) + .mw-input {
	margin-top: 10px;
}
#userloginForm .mw-ui-vform-field:nth-of-type(7) {
	margin-bottom: 5px;
}
.mw-htmlform-field-HTMLReCaptchaNoCaptchaField .mw-input {
	margin-top: 1px;
}
.editOptions .g-recaptcha {
	margin-bottom: 10px;
}
.mw-ui-vform {
	width: 302px;
}

/* References */
ol.references {
	font-size: 90%;
	margin-top: 0;
}
ol.references li {
	break-inside: avoid-column;
}
ol.references div {
	display: inline;
}
ol.references span {
	line-height: 1;
}

/* Popups */
.mwe-popups .mwe-popups-thumbnail {
	outline: none;
	object-fit: contain;
}

/* Multimedia viewer */
.mw-mmv-image img {
	max-height: 100vh;
}
.mw-mmv-filepage-buttons,
.mw-mmv-reuse-pane .oo-ui-widget-disabled {
	display: none !important;
}
.mw-mmv-overlay {
	z-index: 10000000000;
}
.mw-mmv-wrapper {
	z-index: 10000000001;
	font-size: medium;
}

/* Echo extension */
.mw-echo-ui-notificationBadgeButtonPopupWidget-popup {
	font-size: 12px;
}
.mw-echo-ui-notificationsInboxWidget-toolbarWrapper {
	margin-bottom: 10px;
}
.mw-echo-ui-crossWikiUnreadFilterWidget-group {
	display: none;
}
.oo-ui-popupWidget-body-padded {
	margin-top: 8px;
}
.mw-echo-notifications-badge {
	vertical-align: baseline;
}
.oo-ui-popupWidget-head {
	overflow: hidden;
}
.mw-echo-ui-overlay {
	z-index: 100;
}
/* MonoBook */
@media all and (max-width: 550px) {
	body.skin--responsive .mobile-menu-active li {
		white-space: normal;
	}
}

/* Width fixes */
body:not(.skin-vector-2022) #content {
	overflow-x: clip;
}
.mw-parser-output > p > a > img,
.mw-parser-output > p > img, .thumb img {
	max-width: 100% !important;
	height: auto !important;
}
@media all and (min-width: 1251px) {
	body:not(.skin-vector-2022) .nowide {
		display: none !important;
	}
}
@media all and (max-width: 1350px) {
	:not(td) > table:is(.sortable, .wikitable, [border]):not(.mw-collapsed, .sticky-header, [style*="float"]) {
		display: block;
		width: auto !important;
		overflow: auto !important;
	}
	:not(td) > table:is(.sortable, .wikitable, [border]):not(.mw-collapsed, .sticky-header):not([width="99%"], [width="100%"], [style*="99%"], [style*="100%"]) {
		max-width: max-content !important;
		min-width: 150px !important;
	}
	:not(td) > table:is(.sortable, .wikitable, [border]):not(.mw-collapsed, .sticky-header):is([width="99%"], [width="100%"], [style*="99%"], [style*="100%"]) > tbody {
		display: table;
		width: calc(100% - 1px);
	}
	:not(td) > table[border]:not([style*="border-collapse"]):not(.mw-collapsed, .sticky-header):is([width="99%"], [width="100%"], [style*="99%"], [style*="100%"]) > tbody {
		width: 100%;
	}
	:not(td) > table:is(.wikitable, [border][style*="border-collapse"]):not(.mw-collapsed, .sticky-header):not(.wikitable[style*="border-collapse"]) {
		border-width: 0 !important;
	}
}
@media all and (max-width: 1250px) {
	table:is(.sortable, .wikitable, [border]):not(.scrollable) img {
		min-width: 15px !important;
		max-width: 100% !important;
		height: auto !important;
	}
	.mw-parser-output table:not(.mw-collapsed, .sticky-header) {
		min-width: 0 !important;
	}
}
@media all and (max-width: 1025px) {
	.mw-parser-output table img {
		min-width: 15px !important;
	}
	.mw-body-content img {
		max-width: 100% !important;
		height: auto !important;
	}
}
