@import 'mediawiki.mixins.less';
@import 'mediawiki.ui/variables.less';
@import 'mw.rcfilters.variables.less';

.mw-rcfilters-ui-filterMenuOptionWidget {
	.mw-rcfilters-ui-filterMenuSectionOptionWidget ~ & {
		padding-left: 12 / @font-size-system-ui / @font-size-vector;
		padding-right: 12 / @font-size-system-ui / @font-size-vector;
	}

	&.oo-ui-flaggedElement-muted {
		&:not( .oo-ui-optionWidget-selected ) {
			// Namespaces are muted 'the other way around' when they
			// are also inverted, so if they are also selected, we
			// should make sure the selected background is shown rather
			// than the muted one
			background-color: @colorGray15;
		}

		.mw-rcfilters-ui-itemMenuOptionWidget-label-title,
		.mw-rcfilters-ui-itemMenuOptionWidget-label-desc {
			color: @colorGray5;
		}

		&.oo-ui-optionWidget-highlighted {
			// Copying over styles from OOUI, since it must
			// override our 'muted' state
			background-color: @colorGray14;
			color: @colorGray1;
		}
	}

	// Override OOUI's pretty specific
	// `.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header`
	// selector
	.mw-rcfilters-ui-itemMenuOptionWidget-itemCheckbox > .oo-ui-fieldLayout > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header {
		padding-top: 0;
		padding-bottom: 0;
		padding-left: 12 / @font-size-system-ui / @font-size-vector;
	}
}
