@component OpalButton {
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
	user-select: none;

	&:not([view_type=clean]) {
		position: relative;
		display: inline-block;
		box-sizing: border-box;
		padding: 7px 23px;
		border-radius: 3px;
		background: hsl(208,18%,40%);
		color: #fff;
		vertical-align: middle;
		text-align: center;
		text-decoration: none;
		text-shadow: none;
		font: 16px/24px Verdana, Geneva, sans-serif;
		font-weight: normal;
		transition: background .1s linear;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		-webkit-text-size-adjust: 100%;
		-ms-text-size-adjust: 100%;
		-webkit-tap-highlight-color: transparent;

		&::-moz-focus-inner {
			padding: 0;
			border: 0;
		}

		@mod size=s {
			padding: 4px 14px;
			font-size: 14px;
			line-height: 21px;
		}

		&:hover {
			background: hsl(208,24%,46%);
		}

		&:focus {
			outline: none;

			body:not(._noFocusHighlight) &::after {
				position: absolute;
				top: 2px;
				right: 2px;
				bottom: 2px;
				left: 2px;
				border: 1px solid rgba(255,255,255,.8);
				border-radius: inherit;
				content: '';
				pointer-events: none;
			}
		}

		&:active,
		&[checked] {
			background: hsl(208,6%,28%);
		}

		@mod loading {
			background-image: linear-gradient(
				135deg,
				rgba(255,255,255,.35) 0, rgba(255,255,255,.35) 25%,
				transparent 25%, transparent 50%,
				rgba(255,255,255,.35) 50%, rgba(255,255,255,.35) 75%,
				transparent 75%, transparent 100%
			);
			background-size: 30px 30px;
			animation: OpalButton__loadingAnimation 3s linear infinite;
		}

		@mod disabled {
			opacity: .5;
			pointer-events: none;
		}

		/* Combinations */

		.OpalGroup > &:not(:first-child),
		.OpalGroup > *:not(:first-child) & {
			border-top-left-radius: 0;
			border-bottom-left-radius: 0;
			box-shadow: inset 1px 0 rgba(0,0,0,.4);
		}

		.OpalGroup > &:not(:last-child),
		.OpalGroup > *:not(:last-child) & {
			border-top-right-radius: 0;
			border-bottom-right-radius: 0;
		}

		.OpalSwitchMenu &:not(:first-child) {
			border-top-left-radius: 0;
			border-bottom-left-radius: 0;
			box-shadow: inset 1px 0 rgba(0,0,0,.4);
		}

		.OpalSwitchMenu &:not(:last-child) {
			border-top-right-radius: 0;
			border-bottom-right-radius: 0;
		}
	}

	@mod viewType=primary {
		background: hsl(208,94%,54%);

		&:hover {
			background-color: hsl(208,100%,60%);
		}

		&:active,
		&[checked] {
			background-color: hsl(208,82%,42%);
		}
	}

	@mod viewType=danger {
		background: hsl(348,92%,58%);

		&:hover {
			background-color: hsl(348,98%,64%);
		}

		&:active,
		&[checked] {
			background-color: hsl(348,80%,46%);
		}
	}
}

@keyframes OpalButton__loadingAnimation {
	0% {
		background-position: 0 0;
	}
	100% {
		background-position: 60px 0;
	}
}