body {
	color: #222;
	margin: 1em;
	font-family: sans-serif;
	font-size: 0.8em;
}

p {
	margin: 0.5em 0;
}

/* Layout */
.demo {
	max-width: 62.5em;
	margin: 0 auto;
}

.demo-menu {
	margin-bottom: 1em;
}

.demo-menu > .oo-ui-widget {
	display: inline-block;
	vertical-align: middle;
	margin-right: 1em;
	margin-bottom: 1em;
}

.demo-menu .demo-pageDropdown {
	width: 10em;
}

.demo-container {
	/* Needed for applying `padding` further below */
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

/* Console */
/* stylelint-disable selector-pseudo-element-colon-notation */
.demo-console {
	clear: both;
	position: relative;
	border: 1px solid transparent;
	margin-bottom: -2px;
	line-height: 1.4;
	/* @noflip */
	direction: ltr;
}

.demo-console-expanded {
	width: 100%;
	background-color: #fff;
	border-color: #a2a9b1;
	margin: 0.5em 0;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

.demo-console-toggle {
	float: right;
	margin-top: -2em;
	cursor: pointer;
	-webkit-transition: background-color 100ms, color 100ms, transform 100ms;
	-moz-transition: background-color 100ms, color 100ms, transform 100ms;
	transition: background-color 100ms, color 100ms, transform 100ms;
}

.demo-console-expanded .demo-console-toggle {
	margin-top: -2.5em;
}

.demo-console-toggle::after {
	content: '→';
	background-color: #f8f9fa;
	color: #222;
	position: relative;
	display: inline-block;
	width: 1.6em;
	border-radius: 2px;
	line-height: 1.6;
	text-align: center;
	-webkit-transition: background-color 100ms, color 100ms, transform 100ms;
	-moz-transition: background-color 100ms, color 100ms, transform 100ms;
	transition: background-color 100ms, color 100ms, transform 100ms;
}

.demo-console-toggle:hover::after,
.demo-console-expanded .demo-console-toggle::after {
	background: #fff;
	color: #444;
}

.demo-console-expanded .demo-console-toggle::after {
	-webkit-transform: rotate( -90deg );
	-moz-transform: rotate( -90deg );
	-ms-transform: rotate( -90deg );
	transform: rotate( -90deg );
}

.demo-console-collapsed .demo-console-log,
.demo-console-collapsed .demo-console-label,
.demo-console-collapsed .demo-console-submit {
	display: none;
}

/* @noflip */
.demo-console-log {
	border: 1px solid #a2a9b1;
	border-width: 0 0 1px 0;
	max-height: 5em;
	overflow: auto;
}

/* @noflip */
.demo-console-log-line {
	position: relative;
	padding-left: 20px;
}

.demo-console-log-line-input {
	font-style: italic;
	color: #54595d;
}

/* @noflip */
.demo-console-log-line-input::before {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 20px;
	text-align: center;
	bottom: 0;
	content: '→';
}

.demo-console-log-line-error {
	color: #d33;
}

/* @noflip */
.demo-console-label {
	position: relative;
	display: inline-block;
	width: 100%;
	padding-left: 20px;
	padding-right: 20px;
	margin-right: -20px;
	cursor: pointer;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

/* @noflip */
.demo-console-label::before {
	content: '→';
	color: #00f;
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 20px;
	text-align: center;
}

.demo-console-input {
	margin: 0;
	padding: 0;
	border: 0;
	width: 100%;
}

.demo-console-input:focus {
	outline: 0;
}

.demo-console-submit {
	background: #f8f9fa;
	color: #222;
	display: inline-block;
	position: relative;
	width: 20px;
	line-height: 1.6;
	text-align: center;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	cursor: pointer;
	-webkit-transition: background-color 100ms, color 100ms;
	-moz-transition: background-color 100ms, color 100ms;
	transition: background-color 100ms, color 100ms;
}

.demo-console-submit:hover {
	background: #fff;
	color: #444;
}

/* Toolbars demo */

.demo-container.demo-toolbars {
	padding: 0;
	margin-bottom: 2em;
}

.demo-toolbars-contents {
	padding: 2em;
	min-height: 100px;
}

/* Icons demo */

.demo-icons .oo-ui-buttonSelectWidget {
	margin-bottom: 2em;
}

.demo-icons .oo-ui-fieldLayout {
	display: inline-block;
	margin: 1em 1em 1em 0;
	width: 13.75em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.demo-icons .oo-ui-fieldLayout:nth-child( 4n ) {
	margin-right: 0;
}

.demo-icons .oo-ui-fieldLayout .oo-ui-iconElement,
.demo-icons .oo-ui-fieldLayout .oo-ui-indicatorElement {
	opacity: 0.8; /* brings icons/indicators closer to text color */
}

.demo-icons .oo-ui-fieldLayout:hover .oo-ui-labelElement-label {
	color: #000;
}
.demo-icons .oo-ui-fieldLayout:hover .oo-ui-iconElement,
.demo-icons .oo-ui-fieldLayout:hover .oo-ui-indicatorElement {
	opacity: 1;
}

/* Widgets demo */

.oo-ui-horizontalLayout > .oo-ui-textInputWidget,
.oo-ui-horizontalLayout > .oo-ui-dropdownInputWidget {
	max-width: 10em;
}

/* Special cases: ActionFieldLayout top aligned,
FieldLayout left & right aligned */
.oo-ui-fieldLayout-align-left,
.oo-ui-fieldLayout-align-right {
	max-width: 50em;
}

.oo-ui-fieldLayout-align-top.oo-ui-actionFieldLayout .demo-console-toggle,
.oo-ui-fieldLayout-align-left .demo-console-toggle,
.oo-ui-fieldLayout-align-right .demo-console-toggle {
	margin-right: -2em;
}

.oo-ui-fieldLayout-body:after {
	content: ' ';
	clear: both;
	display: block;
}

/* Special case: FieldsetLayout with "Summary" */
.oo-ui-formLayout .oo-ui-fieldsetLayout:last-child {
	background-color: #eaecf0;
	border: 1px solid #c8ccd1;
	padding: 1em 1em 1.5em 1em;
}

/* Media Queries */
@media ( max-width: 750px ) {
	body {
		font-size: 1em;
	}

	.demo-menu > .oo-ui-widget {
		margin-bottom: 1em;
	}

	.demo-container {
		border-radius: 0;
		border-width: 1px 0 0;
		padding: 1.5em 2.5em 1em 0;
	}

	.demo-container.demo-toolbars {
		border-width: 1px;
	}

	.demo-console-toggle {
		margin-right: -2em;
	}
}

@media ( min-width: 751px ) {
	.demo-container {
		padding: 2em;
	}
}

/* stylelint-enable selector-pseudo-element-colon-notation */
