@import 'mediawiki.skin.variables.less';

@gutter-action-width: 42px;

.ve-ui-gutterSidebarEditCheckDialog {
	background-color: @background-color-interactive-subtle;
	border-left: @border-width-base solid @border-color-muted;

	.ve-ui-editCheck-gutter-action {
		position: absolute;
		width: @gutter-action-width;
		text-align: center;
		margin-top: -3px;
		min-height: 24px;

		// The icon is in EditCheckGutterSectionIconWidget.less

		&-error {
			border-left: 2px solid @color-error;
		}

		&-warning {
			border-left: 2px solid @color-warning;
		}

		&-progressive {
			border-left: 2px solid @color-progressive;
		}

		&-quickaction {
			border-left: 0;
		}
	}
}

.ve-editcheck-available .mw-mf .ve-ce-surface {
	margin-right: 16px;
}

@media all and ( max-width: 993.4px ) {
	.ve-editcheck-available .mw-mf {
		.ve-init-mw-target-surface {
			margin: 0 0 1em;

			.ve-ce-surface,
			&.ve-ui-surface-placeholder {
				// Stop reflow during the transition
				max-width: calc( 100% - (44px + 16px + 16px) );
				margin: 0 16px 0 32px;
			}
		}

		.ve-ui-editCheck-sidebar-active {
			.ve-init-mw-target-surface {
				margin: 0;

				.ve-ce-surface {
					margin-left: 16px;
				}
			}

			// Continue the rail's separator border up through the toolbar
			.ve-ui-toolbar-group-save {
				box-shadow: -@border-width-base 0 0 0 @border-color-muted;
			}
		}
	}
}

@media all and ( min-width: 993.4px ) and ( max-width: @min-width-breakpoint-desktop ) {
	.mw-mf .ve-ui-editCheck-sidebar-active .ve-ui-sidebarDialogWindowManager {
		margin-right: -44px;
	}
}

@media all and ( min-width: @min-width-breakpoint-desktop ) {
	/* stylelint-disable-next-line wikimedia/selector-class-prefix */
	.mw-mf .ve-ui-editCheck-sidebar-active .overlay-content {
		width: auto;
	}
}
