﻿/* Use border-box sizing instead of the default (content-box)
   This makes it so the width of an element includes its padding, instead of adding the padding on top of the element.
   More information on box-sizing here: https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing */
* {
	box-sizing: border-box;
}

/* Basic html elements styling */
body {
	margin: 0;
	padding-bottom: 60px;

	background: #1F2539;
	color: white;

	font-size: 16px;
	font-weight: 400;
	font-family: 'Open Sans', sans-serif;
}

strong {
	font-weight: 600;
}

h1,
h2,
h3,
h4 {
	text-align: center;
	font-family: 'Patua One', sans-serif;
	font-weight: 400;
}

h1 {
	margin-bottom: 30px;
}

a {
	display: inline-block;
	color: #2980b9;
	text-decoration: none;
}

a:hover,
a:focus {
	color: #3498db;
}



/* Basic elements */
#body-container {
	position: fixed;
	height: 100%;
	width: 100%;
	overflow: auto;
}

.container {
	width: 100%;
	max-width: 960px;
	margin: auto;
}

.panel {
	display: block;
	padding: 50px 10px;

	background: white;
	color: #333;

	opacity: 0;
	transform: translateY(-20px);
	transition: all 320ms ease-out;
}
body.loaded .panel {
	opacity: 1;
	transform: translateY(0);
}



/* Header */
header {
	height: 100px;
	background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%,rgba(0,0,0,0) 100%);
}

header .container {
	display: flex;
	align-items: flex-start;
}

header .fill {
	flex-grow: 1;
}

header nav {
	display: flex;
	align-items: center;
}

header a {
	display: block;
	padding: 15px 10px;
	color: rgba(255, 255, 255, 0.75);
}
header a:hover,
header a:focus {
	color: white;
}

header a svg {
	display: block;
	height: 24px;
	width: 24px;
}
header a path {
	fill: rgba(255, 255, 255, 0.75);
	transition: all 80ms ease-in-out;
}
header a:hover path {
	fill: white;
}
header .logo path {
	fill: white;
}



/* Sidebar menu */
#sidebar-toggle {
	display: none;
}
#sidebar {
	position: fixed;
	right: -400px;
	top: 0;
	z-index: 0;
	transition: right 320ms ease-out, z-index 320ms step-end;

	width: 100%;
	max-width: 400px;
	height: 100%;
	height: 100vh;
	overflow-y: auto;

	background: #141825;
}
#sidebar.open {
	right: 0;
	z-index: 100;
	transition: right 320ms ease-out, z-index 320ms step-start;
}

#sidebar-close {
	display: block;
	float: right;
	padding: 15px;
}
#sidebar-close svg {
	display: block;
	width: 24px;
	height: 24px;
}
#sidebar-close path {
	fill: rgba(255, 255, 255, 0.75);
}
#sidebar-close:hover path, #sidebar-close:active path {
	fill: white;
}

#sidebar nav,
#sidebar .info {
	width: 90%;
	margin: auto;
	margin-top: 72px;
	margin-bottom: 24px;

}

#sidebar nav{
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar .info{
	padding-left:0px;
    -webkit-padding-start: 0px;
}

#sidebar nav a,
#sidebar .info li{
	display: block;
	padding: 12px;
	color: rgba(255, 255, 255, 0.6);
	text-align: center;
}

#sidebar nav a{
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


#sidebar nav a:hover, #sidebar nav a:focus {
	color: white;
}

#sidebar-overlay {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 0;
	opacity: 0;
	transition: opacity 320ms ease-out, z-index 320ms step-end;

	width: 100%;
	height: 100%;
	background: rgba(31, 37, 57, 0.6);
}
#sidebar-overlay.open {
	opacity: 1;
	z-index: 90;
	transition: opacity 320ms ease-out, z-index 320ms step-start;
}

#body-container {
	transition: all 280ms ease-out;
}
#body-container.sidebar-open {
	transform: translateX(-72px);
	overflow-y: hidden;
}


/* PR counter */
#pr-counter {
	position: relative;

	display: flex;
	flex-direction: column;
	justify-content: center;

	width: 220px;
	height: 220px;
	margin: auto;
	margin-bottom: 50px;
	padding-bottom: 20px;
}

#pr-counter h1 {
	text-align: center;
}

#loader {
	position: absolute;
	top: 0;
	left: 0;

	width: 100%;
	height: 100%;
}

#pr-counter .info {
	opacity: 0;
	transform: scale(0.8);
	transition: all 240ms ease-out;
}
body.loaded #pr-counter .info {
	opacity: 1;
	transform: scale(1);
}

#pr-count {
	font-size: 4em;
	text-align: center;
}
#pr-counter .label {
	margin-top: -12px;

	color: rgba(255, 255, 255, 0.8);

	font-size: 0.8em;
	text-align: center;
}

/* Last PR */
#last-pr {
	opacity: 0;
	transition: all 320ms ease-out;

	min-height: 100px;
	padding: 10px;
	padding-top: 40px;

	background: linear-gradient(to top, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 100%);
	text-align: center;
}
body.loaded #last-pr {
	opacity: 1;
}

#last-pr.error {
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.9em;
	font-style: italic;
}

#last-pr p {
	margin: 5px;
	color: rgba(255, 255, 255, 0.6);
}

#last-pr span {
	white-space: nowrap;
}

/* Intro */
#intro {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: stretch;

	padding: 10px;
	padding-bottom: 25px;
	text-align: center;
}

#intro p {
	width: 100%;
}

#intro .block {
	flex-basis: 250px;
	flex-grow: 1;

	margin: 0 10px;
	margin-top: 28px;
	padding: 0 10px;

	border: 2px solid rgba(128, 128, 128, 0.2);
	border-radius: 6px;

	text-align: left;
}

#intro ul {
	padding-left: 25px;
}

#intro .icon {
	display: block;
	width: 60px;
	height: 38px;
	margin: auto;
	margin-bottom: -20px;

	position: relative;
	top: -20px;

	padding: 0 8px;
	background: white;
}

#intro .icon path {
	fill: rgb(128, 128, 128);
}




/* Repository info & stats */
#repo-info {
	opacity: 0;
	transition: all 480ms ease-out;

	display: flex;
	justify-content: center;
	flex-wrap: wrap;

	padding: 40px 10px;
}
body.loaded #repo-info {
	opacity: 1;
}

#repo-info h2 {
	width: 80%;
	margin-top: 30px;
	padding-top: 40px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#contributors {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;

	width: 100%;
}

#contributors a {
	display: inline-block;
	margin: 2px 0;
}

#contributors img {
	height: 42px;
	width: 42px;
	margin: 5px;
	border-radius: 50%;
	transition: all 80ms ease-in-out;
}

#contributors a:hover img, #contributors a:focus img {
	transform: scale(1.1);
}


#repo-info .block {
	flex-basis: 100%;
	flex-grow: 1;

	display: flex;
	align-items: center;
	justify-content: center;

	padding: 5px;
}

#repo-info svg {
	display: inline-block;
	width: 24px;
	height: 24px;
	margin-right: 8px;
}
#repo-info path {
	fill: rgba(255, 255, 255, 0.6);
}

#stars .data::after {
	content: ' stars';
}
#issues .data::after {
	content: ' issues';
}
#forks .data::after {
	content: ' forks';
}


/* Pull Request Voting elements */
#pull-requests-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: stretch;

	padding: 10px;
	padding-top: 15px;
}

#pull-requests-container p {
	width: 100%;
	margin: 0;
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}
#pull-requests-container p:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}



/* Games list */
#games {
	opacity: 0;
	transition: all 480ms ease-out;

	padding: 40px 0;
	text-align: center;
}
body.loaded #games {
	opacity: 1;
}

#games a {
	display: inline-block;
	padding: 12px 22px;
	margin: 0 4px;

	background: rgba(255, 255, 255, 0.8);
	border-radius: 6px;
	color: #333;
}
#games a:hover, #games a:focus {
	background: white;
	color: #333;
}

#migration-container>div>div{
	margin-bottom: 25px;
}

#migration-container div span{
	margin: 10px;
	display: block;
}

#migration-container div span:first-child{
	font-weight: bold;
}

/* It is recommended to always work mobile-first (i.e. design the base css for mobile), and use 'min-width' media queries to adapt the display for larger monitors */
@media all and (min-width: 480px) {

	.container {
		width: 90%;
	}

	header {
		padding-top: 10px;
	}

	#pr-counter {
		margin-top: 25px;
		margin-bottom: 75px;
	}

	#repo-info .block {
		flex-basis: 30%;
	}

	#sidebar {
		width: 90%;
	}
	#sidebar nav {
		width: 80%;
	}
	#sidebar-close {
		margin: 5px;
	}


	#migration-container div span:not(:last-child){
		display: inline;
	}

}

@media all and (min-width: 720px) {

	.container {
		width: 85%;
	}

	#pr-counter {
		margin-top: 50px;
		margin-bottom: 100px;
	}

	#pull-requests-container p {
		width: 46%;
	}

}

/*
	Utility for quickly showing and hiding via javascript
	Last in the document and !important so it can override
	existing styles regardless of specificity
*/
.hidden{
	/*
		Temporarily allow !important because this is a valid
	 	use case (unless someone can suggest a better approach)
	*/
	/* csslint ignore:start */
	display:none!important;
	/* csslint ignore:end */
}

