/* ### globals ### */
html, body {
	font-size: @wcfBaseFontSize;
}

body {
	background-color: @wcfPageBackgroundColor;
	color: @wcfColor;
	font-family: @wcfBaseFontFamily;
	line-height: @wcfBaseLineHeight;
	word-wrap: break-word;
}

small {
	font-size: @wcfSmallFontSize;
}

img {
	vertical-align: middle;
	
	&.disabled {
		opacity: .3;
	}
}

a {
	color: @wcfLinkColor;
	cursor: pointer;
	text-decoration: none;
		
	&:hover {
		color: @wcfLinkHoverColor;
		text-decoration: underline;
	}
	
	&.externalURL::after {
		content: "\f08e";
		display: inline-block;
		font-family: FontAwesome !important;
		font-size: 14px !important;
		font-weight: normal !important;
		font-style: normal !important; 
		margin-left: 4px;
		vertical-align: -1px;
	}
}

.footerContent, .logo {
	color: @wcfPageColor;
	
	a {
		color: @wcfPageLinkColor;
		
		&:hover {
			color: @wcfPageLinkHoverColor;
		}
	}
}

.nativeList {
	margin: 1em 0;
	margin-left: 40px;
	
	ul,
	ol {
		margin-bottom: 0;
		margin-top: 0;
	}
	
	li {
		margin: @wcfGapSmall 0;
	}
}

ul.nativeList {
	list-style-type: disc;
}
ol.nativeList {
	list-style-type: decimal;
}

.htmlContent {
	p {
		margin: 1em 0;
	}
	
	h1 {
		font-size: @wcfSubHeadlineFontSize;
	}
	
	h2 {
		font-size: @wcfTitleFontSize;
	}
	
	h1, h2, h3, h4, h5, h6 {
		font-weight: bold;
		margin: 0.5em 0;
	}
	
	ul, ol {
		.nativeList;
	}
	
	ul {
		list-style-type: disc;
	}
	
	ol {
		list-style-type: decimal;
	}
}

/* hide broken reCaptcha iframe */
body > iframe[src="about:blank"] {
	display:none;
}

::selection {
	text-shadow: 0 1px 0 rgba(255, 255, 255, .5) !important;
	color: #300;
	background-color: rgba(255, 170, 34, .7);
}

.invisible {
	display: none;
}

.marginTopLarge {
	margin-top: @wcfGapLarge;
}

.marginTop,
.marginMedium {
	margin-top: @wcfGapMedium;
}

.marginTopSmall {
	margin-top: @wcfGapSmall;
}

.marginTopTiny {
	margin-top: @wcfGapTiny;
}

.center {
	text-align: center;
}

.pointer {
	cursor: pointer;
}

.dimmed {
	color: @wcfDimmedColor;
}

.iconFlag {
	height: 15px;
	width: 24px;
}

.framed {
	> canvas,
	> img,
	> .icon {
		background-color: @wcfContentBackgroundColor;
		border: 1px solid @wcfContainerBorderColor;
		padding: 1px;
	}
}

.highlight {
	background-color: @wcfHighlightBackgroundColor;
}

.grayscale {
	filter: url(../images/grayscale-filter.svg#grayscale);
	filter: gray;
	-webkit-filter: grayscale(1);
}

/* fixes fieldset overflow issues */
/* webkit */
fieldset {
	min-width: 0; 
}
/* firefox */
@-moz-document url-prefix() {
	fieldset {
		display: table-column;
	}
}

/* balloon tooltips */
.balloonTooltip {
	background-color: @wcfTooltipBackgroundColor;
	border-radius: 6px;
	color: @wcfTooltipColor;
	font-size: @wcfSmallFontSize;
	max-width: 300px;
	padding: 5px 10px 7px;
	position: absolute;
	z-index: 800;
	
	.pointer {
		border-color: @wcfTooltipBackgroundColor transparent;
		border-style: solid;
		border-width: 0 5px 5px;
		left: 50%;
		position: absolute;
		top: -5px;
	}
	
	.boxShadow(0, 3px, rgba(0, 0, 0, .3), 7px);
	
	&.inverse {
		.pointer {
			border-width: 5px 5px 0;
		}
	}
}

/* popover */
.popover {
	background-color: rgba(0, 0, 0, .4);
	border-radius: 6px;
	padding: @wcfGapSmall;
	position: absolute;
	vertical-align: middle;
	width: 400px !important;
	z-index: 500;
	
	.boxShadow(0, 1px, rgba(0, 0, 0, .3), 7px);
	
	> .icon-spinner {
		color: white;
		left: 50%;
		margin-left: -21px;
		margin-top: -21px;
		position: absolute;
		top: 50%;
		
		.textShadow(black);
	}
	
	> .popoverContent {
		background-color: @wcfContainerBackgroundColor;
		border-radius: 6px;
		color: @wcfColor;
		max-height: 300px;
		min-height: 32px;
		opacity: 0;
		overflow: hidden;
		padding: @wcfGapSmall @wcfGapMedium;
	}
	
	&::after {
		border: 10px solid transparent;
		content: "";
		display: inline-block;
		position: absolute;
		z-index: 100;
	}
	
	&.top::after {
		border-bottom-width: 0;
		border-top-color: rgba(0, 0, 0, .3);
		bottom: -10px;
	}
	
	&.bottom::after {
		border-bottom-color: rgba(0, 0, 0, .3);
		border-top-width: 0;
		top: -10px;
	}
	
	&.right::after {
		left: 10px;
	}
	
	&.left::after {
		right: 10px;
	}
}


/* ### badges ### */
/* default values */
.badge {
	background-color: @wcfColor;
	border-radius: 9px;
	color: @wcfContentBackgroundColor;
	display: inline-block;
	font-size: @wcfSmallFontSize;
	font-weight: bold;
	padding: 1px 6px 1px;
	position: relative;
	text-shadow: none !important; /* necessary to avoid ugly text shadows in comment lists; @todo: better solution without "!important" */
	vertical-align: middle;
	white-space: nowrap;
	word-wrap: normal;
	
	&.label	{
		border-radius: 4px;
		font-weight: normal;
	}
	
	/* colors */
	&.badgeUpdate {
		background-color: @wcfTabularBoxBackgroundColor;
		color: @wcfTabularBoxColor;
	}
	
	&.badgeInverse {
		background-color: @wcfTabularBoxColor;
		color: @wcfTabularBoxBackgroundColor;
	}
	
	/* default label colors */
	&.green {
		background-color: rgba(0, 153, 0, 1);
		color: rgba(238, 255, 238, 1);
	}
	
	&.red {
		background-color: rgba(204, 0, 0, 1);
		color: rgba(255, 238, 238, 1);
	}
	
	&.black {
		background-color: #333;
		color: #fff;
	}
	
	&.brown {
		background-color: #c63;
		color: #fff;
	}
	
	&.orange {
		background-color: #f90;
		color: #fff;
	}
	
	&.yellow {
		background-color: #ff0;
		color: #333;
	}
	
	&.blue {
		background-color: #369;
		color: #fff;
	}
	
	&.purple {
		background-color: #c0f;
		color: #fff;
	}
	
	&.pink {
		background-color: #f0c;
		color: #fff;
	}
}

a.badge:hover {
	color: @wcfContentBackgroundColor;
	text-decoration: none;
	
	&.black {
		background-color: #000;
	}
	
	&.brown {
		background-color: #930;
	}
	
	&.red {
		background-color: #900;
	}
	
	&.orange {
		background-color: #f60;
	}
	
	&.yellow {
		background-color: #cc0;
	}
	
	&.green {
		background-color: #060;
	}
	
	&.blue {
		background-color: #036;
	}
	
	&.purple {
		background-color: #90c;
	}
	
	&.pink {
		background-color: #c09;
	}
}

/* the CSS below can be detected through JavaScript and works better than matchMedia-API (not supported by IE9) */
@media only screen and (max-width: 800px) {
	html {
		caption-side: bottom;
	}
	
	body {
		caption-side: top;
	}
}

@media only screen and (max-width: 800px) and (-webkit-min-device-pixel-ratio: 2) {
	// Preserve HTML font-size when iPhone orientation changes from portrait to landscape
	html {
		-webkit-text-size-adjust: 100%;
	}
	
	// Fixes zoom when iPhone orientation changes from portrait to landscape
	html.iOS,
	html.iOS > body {
		width: 100%;
		overflow: hidden;
	}
}