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

.mw-rcfilters-ui-itemMenuOptionWidget {
	padding: 0 0.5em;
	.box-sizing( border-box );

	&:not( :last-child ):not( .mw-rcfilters-ui-itemMenuOptionWidget-identifier-talk ) {
		border-bottom: 1px solid @colorGray14;
	}

	&-view-namespaces {
		border-top: 4px solid @colorGray12;
	}

	// Don't show border for first namespace & hide for every 'talk' option in second selector
	&-view-default + &-view-namespaces,
	&-view-namespaces&.mw-rcfilters-ui-itemMenuOptionWidget-identifier-subject + &-view-namespaces.mw-rcfilters-ui-itemMenuOptionWidget-identifier-talk {
		border-top: 0;
	}

	&:hover {
		background-color: @colorGray15;
	}

	.mw-rcfilters-ui-table {
		padding-top: 6 / @font-size-system-ui / @font-size-vector;
		padding-bottom: 6 / @font-size-system-ui / @font-size-vector;
	}

	&.oo-ui-optionWidget-selected {
		background-color: @background-color-primary;
	}

	&-label {
		&-title {
			font-weight: bold;
			font-size: 1.15em;
			color: @colorGray2;
		}

		&-desc {
			color: @colorGray5;
			white-space: normal;
		}
	}

	&-itemCheckbox {
		.oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header {
			padding-left: 12 / @font-size-system-ui / @font-size-vector;
		}

		.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline {
			// Override margin-top and -bottom rules from FieldLayout
			margin: 0 !important; /* stylelint-disable-line declaration-no-important */

			.oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
				vertical-align: middle;
			}
		}

		.oo-ui-checkboxInputWidget {
			// Workaround for IE11 rendering issues. T162098
			display: block;
		}

		label {
			// Workaround for Chrome browser bug (T199932)
			// Override padding rule from FieldLayout
			padding-left: 0 !important; /* stylelint-disable-line declaration-no-important */
		}
	}

	.mw-rcfilters-ui-cell {
		vertical-align: middle;
	}

	&-excludeLabel {
		width: 5em;
		padding-left: 1em;
		color: @colorGray5;
	}

	&-highlightButton {
		width: 4em;
		padding-left: 1em;
	}
}
