
/* 
 * Everything related to pages (inside template) goes here 
 * *******************************************************  */
 

/* selectionbar (displaying current selection, e.g. BMW->3er->E46) */

#selectionbar {						/* black overlay, no children (cause they'd inherit opacity) */
	position: absolute;
	top: 0;
	width: 100%;
	height: 70px;
	background-color: black;
	opacity: 0.4;
	border-radius: 10px 10px 0px 0px; 	/* don't overlap parent */
}

#selectionbar-text-container {		/* container where p's and a's which make up selection-navigation */
	z-index: 1;						/* be on top of selectionbar (black-transparent overlay) */
	position: absolute;
	top: 0px;
	left: 0px;					/* space for logo */
	padding-left: 16px;
	width: 100%;
	box-sizing: border-box;
	height: 70px;					/* follows selectionbar's height through media queries */
}

#selectionbar-floatright-container {	/* buttons in there in admin mode */
	padding-right: 20px;
	float: right;
	text-align: right;
	line-height: 70px;				/* follows selectionbar's height through media queries */
}

#selectionbar-text-container > a,
#selectionbar-text-container > p {
	display: inline-block;
	text-decoration: none;
	margin: 0 5px 0 0;
	
	color: #BDBDBD;
	font-family: roboto-regular;
	font-size: 25px;
	text-shadow: 0 0 3px #aaaaaa;	/* glow */
	line-height: 70px;				/* follows selectionbar's height through media queries */
	
	-webkit-transition: color 250ms ease, text-shadow 250ms ease;
    -moz-transition: color 250ms ease, text-shadow 250ms ease;
    -ms-transition: color 250ms ease, text-shadow 250ms ease;
    -o-transition: color 250ms ease, text-shadow 250ms ease;
    transition: color 250ms ease, text-shadow 250ms ease;
}

#selectionbar-text-container > a:hover {
	color: #F2F2F2;
	text-shadow: 0 0 3px #efefef;
}

#selectionbar-text-container > a::selection,
#selectionbar-text-container > p::selection {
  background: rgba(0, 26, 51, 0.5);
  color: white;
}
#selectionbar-text-container > a::-moz-selection,
#selectionbar-text-container > p::-moz-selection {
  background: rgba(0, 26, 51, 0.5);
  color: white;
}

#selectionbar-logo {
	position: absolute;
	display: none;
	top: 8px;
	left: 16px;
	width: 54px;
	height: 54px;
	z-index: 1;					/* be on top of selectionbar */	
}

/* contentcontainer (everything below selectionbar + promptbar) */

#contentcontainer {
	text-align: center;
	width: 100%;
	margin-top: 70px;			/* = selectionbar-height */ 
	padding-bottom: 20px;
}

/* media queries for selectionbar and content-container */

@media (min-width: 550px) {
	#selectionbar-logo {
		display: block;
	}
	#selectionbar-text-container {
		padding-left: 85px;						/* includes space for logo */
	}
}

@media (min-width: 750px) {
	#selectionbar {
		height: 85px;
	}
	#contentcontainer {
		margin-top: 85px;
	}
	#selectionbar-text-container {
		height: 85px;
		padding-left: 110px;
	}
	#selectionbar-logo {
		top: 12px;
		left: 24px;
		width: 61px;
		height: 61px;
	}
	#selectionbar-text-container > a, #selectionbar-text-container > p {
		font-size: 30px;
		line-height: 85px;
	}
	#selectionbar-floatright-container {
		line-height: 85px;
	}
}


/* prompt bar ("Bitte w�hlen Sie..."), goes inside #contentcontainer */

#promptbar {
	height: 100px;
	width: 100%;
	line-height: 100px;		/* vertically center text inside */
	text-align: center;
}

/* selection links */

.selection-link-container {
	display: inline-block;
	width: 90%;
	height: 40px;
	text-align: left;
}

.selection-link {
	line-height: 40px; 	/* = container height to vertically center text */
	font-size: 20px;
	text-decoration: none;
    -webkit-transition: all 250ms ease;
    -moz-transition: all 250ms ease;
    -ms-transition: all 250ms ease;
    -o-transition: all 250ms ease;
    transition: all 250ms ease;
}

.selection-text {
	line-height: 40px; 	/* = container height to vertically center text */
	font-size: 18px;
}

.selection-link:hover, .selection-link:active, .selection-link:focus {
	border: none;
  	outline: none;
}

.selection-link:hover, .selection-link:active {
	color: #1414ff;
	text-shadow: 0 0 3px #0000eb;
	/*
    -webkit-transform: scale(1.25);
    -moz-transform: scale(1.25);
    -ms-transform: scale(1.25);
    -o-transform: scale(1.25);
    transform: scale(1.25);
    */
}


/* selectable text buttons/links */

.text-selectable {
	display: inline-block;	
	text-decoration: none;
	width: 140px;
	height: auto;
	padding: 5px;
	margin: 5px;
	
	border: 2px solid #606060;
	background-color: #353535;
	
	-webkit-border-radius: 5px;
	-moz-border-radius: 8px;
	-ms-border-radius: 8px;
	-o-border-radius: 8px;
	border-radius: 8px;
}

.text-selectable,
.text-selectable > p {
	-webkit-transition: all 150ms linear;
	-moz-transition: all 150ms linear;
	-ms-transition: all 150ms linear;
	-o-transition: all 150ms linear;
	transition: all 150ms linear;
}

.text-selectable > p::-moz-selection {
	background: none;
	color: white;
}
.text-selectable > p::selection {
	background: none;
	color: white;
}

.text-selectable:hover {
	border: 2px solid #0000eb;
	-webkit-box-shadow: 0px 0px 4px 1px rgba(0,0,255,0.3);
	-moz-box-shadow: 0px 0px 4px 1px rgba(0,0,255,0.3);
    box-shadow: 0px 0px 4px 1px rgba(0,0,255,0.3);
}

.text-selectable:hover > p {
	color: #1414ff;
}

.text-selectable > p {
	font-family: roboto-regular;
	font-weight: bold;
	color: #BDBDBD;
}

/* ----- brand selection page ----- */

#brand-header-container {	/* "W�hlen Sie eine Marke"-Container */ 
	position: absolute;
	width: 100%;
	height: 90px;
	line-height: 90px;
	text-align: center;
	top: 0;
}

#brand-content-container {
	box-sizing: border-box;
	padding: 0px 30px 30px 30px;
	height: auto;
	margin-top: 90px;
	text-align: center;
}

.brand-logo-selectable {				/* one brand as logo */
	display: inline-block;
	width: 62px;
	height: auto;
	padding: 5px;
}

.brand-logo-selectable > img {
	display: inline-block;
	max-width: 100px;
	width: 100%;
}

@media (min-width: 320px) {
	.brand-logo-selectable {
		width: 70px;
	}
}
@media (min-width: 360px) {
	.brand-logo-selectable {
		width: 80px;
	}
}
@media (min-width: 600px) {
	.brand-logo-selectable {
		width: 85px;
		padding: 8px;
	}
}
@media (min-width: 790px) {
	.brand-logo-selectable {
		width: 90px;
		padding: 10px 12px 10px 12px;
	}
}
@media (min-width: 1000px) {
	.brand-logo-selectable {
		padding: 10px 14px 10px 14px;
	}
}


/* ----- brand selection page for ADMIN MODE ----- */

.admin-brand-logo {
	width: 50px;
}


/* ----- series selection page for ADMIN MODE ----- */

#listtable-series {
	max-width: 650px;
}


/* ----- models page for ADMIN MODE (= model editor) ----- */

#tab-container-editor {			/* container for tabs (which represent tuning stages) */
	display: inline-block;
	width: 90%;
	max-width: 1000px;
	margin-top: 50px;		/* tabs overflow this container to the top */
	margin-bottom: 30px;
}

#general-container-editor {		/* container for general model properties such as fuel type and motor */
	display: inline-block;
	max-width: 1000px;
	margin: 40px 0 30px 0;
	width: 90%;
	
	border: 1px solid rgba(0, 0, 0, 0.5);	
	-webkit-box-shadow: 3px 3px 7px -1px rgba(0,0,0,0.7);
	-moz-box-shadow: 3px 3px 7px -1px rgba(0,0,0,0.7);
	box-shadow: 3px 3px 7px -1px rgba(0,0,0,0.7);
	border-radius: 10px;
}

#specials-page-container {
	display: inline-block;
	max-width: 1000px;
	margin: 30px 0 30px 0;
	width: 90%;
	text-align: left;
	padding: 15px;
	box-sizing: border-box;
	
	border: 1px solid rgba(0, 0, 0, 0.5);	
	-webkit-box-shadow: 3px 3px 7px -1px rgba(0,0,0,0.7);
	-moz-box-shadow: 3px 3px 7px -1px rgba(0,0,0,0.7);
	box-shadow: 3px 3px 7px -1px rgba(0,0,0,0.7);
	border-radius: 10px;
}

#specials-page-container > p {
	margin-bottom: 15px;
}

#specials-page-container > div {
	text-align: center;
}

#specials-page-container > div > div {
	width: 33%;
	min-width: 250px;
	display: inline-block;
}

#general-container-editor > table {
	margin: 20px;
}

.editor-table-inner {
	display: inline-block;
	width: 100%;
}

.editor-table-inner > tbody > tr > td {
	padding-top: 10px;
}
.editor-table-inner > tbody > tr:first-child > td:nth-child(1) {
	width: 20%;
}
.editor-table-inner > tbody > tr:first-child > td:nth-child(2) {
	width: 30%;
}
.editor-table-inner > tbody > tr > td:nth-child(2) > input {
	width: -webkit-calc(100% - 40px);
	width: -moz-calc(100% - 40px);
	width: calc(100% - 40px);
}
.editor-table-inner > tbody > tr:first-child > td:nth-child(3) {
	text-align: center;
	width: 50%;
}

#general-table-editor, #general-table-editor > tbody {
	width: -webkit-calc(100% - 40px);
	width: -moz-calc(100% - 40px);
	width: calc(100% - 40px);
}

#general-table-editor > tbody > tr:first-child > td > * {
	margin-bottom: 10px;
}

#general-table-editor > tbody > tr > td:nth-child(2n+2) > * {
	width: -webkit-calc(100% - 40px);
	width: -moz-calc(100% - 40px);
	width: calc(100% - 40px);
}

#general-table-editor > tbody > tr:first-child > td:nth-child(1),
#general-table-editor > tbody > tr:first-child > td:nth-child(3) {
	width: 15%;
}

#general-table-editor > tbody > tr:first-child > td:nth-child(2),
#general-table-editor > tbody > tr:first-child > td:nth-child(4) {
	width: 35%;
}

.editor-textarea-description {
	padding: 5px;
	margin-top: 8px;
	resize: none;
	width: 90%;
}

.editor-textarea-description::selection {
	background: rgba(0, 26, 51, 0.5);
	color: white;
}
.editor-textarea-description::-moz-selection {
	background: rgba(0, 26, 51, 0.5);
	color: white;
}

.editor-table-values > tbody > tr > td {
	padding: 5px;
}

/* ------ models page ----- */

.model-card {
	display: inline-block;
	padding: 10px;
	box-sizing: border-box;
	width: 100%;
	text-align: center;
	vertical-align: top;
}

@media (min-width: 600px) {
	.model-card {
		width: 50%;
	}
}

@media (min-width: 950px) {
	.model-card {
		width: 33%;
	}
}

.model-card > div {
	width: 100%;
}

#fueltypes-container {
	margin: 0px 20px;
	box-sizing: border-box;
}

.fueltype-element {		/* one list row = one model */
	width: 100%;
}

.fueltype-element-left {	/* left column, motor name */
	text-align: left;
	display: inline-block;
	width: 70%
}

.fueltype-element-left > a {
	margin-left: 12px;
	vertical-align: middle;
}

.fueltype-element-right {	/* right column, ps of series */
	display: inline-block;
	text-align: right;
	width: 30%
}

.fueltype-element-right > p {
	margin-right: 10px;
	vertical-align: middle;
}

.fueltype-table > tbody > tr > td:last-child {		/* column with ps(serie) values */
	text-align: right;
	padding-right: 10px;
}

.fueltype-table > tbody > tr > td:first-child {		/* column with motor names */
	text-align: left;
	padding-left: 12px;
}


/* ------ tuning page ----- */

/* general */

.tuning-row {
	display: inline-block;
	padding-bottom: 20px;
	width: 93%;
}

@media (min-width: 600px) {
	.tuning-row {
		padding-bottom: 30px;
	}
}

@media (min-width: 800px) and (max-width: 899px) {
	.tuning-row {
		width: 88%;
	}
}

/* stage selection */

#stages-selection-container {
	width: 100%;
	height: 45px;
	padding: 20px 0px;
}

/* Original stage text style */

.stage-container-inner {	/* container for each tuning stage */
	vertical-align: top;
	display: inline-block;
	width: 110px;
	height: 45px;
}

.stage-container-inner > button {
	white-space: nowrap;
	height: 100%;
}

.stage-text {
	color: #0000eb;
	font-size: 22px;
	text-shadow: none;
	
	-webkit-transition: all 0.4s ease;
	-moz-transition: all 0.4s ease;
	-ms-transition: all 0.4s ease;
	-o-transition: all 0.4s ease;
	transition: all 0.4s ease;
}

.stage-text::before,
.stage-text-active > p::before {
	content: "STAGE ";
	font-size: 80%;
}

.stage-text-active > p {
	color: #1414ff;
	font-size: 30px;
	text-shadow: 0 0 10px #1414ff;
	
	-webkit-transition: all 0.4s ease;
	-moz-transition: all 0.4s ease;
	-ms-transition: all 0.4s ease;
	-o-transition: all 0.4s ease;
	transition: all 0.4s ease;
}

.stage-text-specialspage::before {
	display: none !important;
}


/* alternative stage text style */

.stage-container2-inner {	/* container for each tuning stage */
	vertical-align: middle;
	display: inline-block;
	width: auto;
	height: 45px;
}

.stage-container2-inner > button {
	white-space: nowrap;
	padding: 0;
	height: 100%;
}

.stage-text2 {
	color: #808080;
	font-size: 22px;
	text-shadow: 0 0 1px #303030;
	width: 50px;
	margin: 0;
}

.stage-text2::before {
	display: none;
	content: "STAGE ";
	font-size: 80%;
}

.stage-text2-active > p {
	color: #1414ff;
	font-size: 22px;
	text-shadow: 0 0 10px #1414ff;
}

@media (min-width: 500px) and (max-width: 649px) {
	.stage-text2::before {
		display: none;
	}
	.stage-text2,
	.stage-text2-active > p {
		font-size: 22px;
		width: 70px;
	}
}

@media (min-width: 650px) and (max-width: 699px) {
	.stage-text2::before {
		display: initial;
	}
	.stage-text2,
	.stage-text2-active > p {
		font-size: 17px;
		width: 120px;
	}
}

@media (min-width: 700px) and (max-width: 859px) {
	.stage-container-inner {
		width: 130px;
	}
	#stages-selection-container,
	.stage-container2-inner,
	.stage-container-inner {
		height: 50px;
	}
	
	.stage-text {
		font-size: 25px;
	}
	.stage-text-active > p {
		font-size: 33px;
	}
	
	.stage-text2::before {
		display: initial;
	}
	.stage-text2,
	.stage-text2-active > p {
		font-size: 20px;
		width: 120px;
	}
}

@media (min-width: 860px) {
	.stage-container-inner {
		width: 150px;
	}
	#stages-selection-container,
	.stage-container2-inner,
	.stage-container-inner {
		height: 60px;
	}
	
	.stage-text {
		font-size: 30px;
	}
	.stage-text-active > p {
		font-size: 38px;
	}
	
	.stage-text2::before {
		display: initial;
	}
	.stage-text2,
	.stage-text2-active > p {
		font-size: 22px;
		width: 140px;
	}
}

@media (min-width: 1200px) {
	.stage-container-inner {
		width: 160px;
	}
}

/* infotable (containing technical tuning data, price and contact) */

/* general */

#card-infotable {
	display: inline-block;
	float: left;
	width: 100%;
	height: 320px;
}

#infotable {
	display: table;
	table-layout: fixed;
	text-align: center;
	height: 100%;
	width: 100%;
}

#infotable > tbody {			/* stay as high as table */
	height: 100%;
	width: 100%;
}

#infotable > tbody > tr {
	display: table-row;
}

#infotable > tbody > tr > td {
	display: table-cell;
	padding: 0;
}

/* Middle part is darker */

#infotable > tbody > tr:nth-child(2) > td:nth-child(n+1),
#infotable > tbody > tr:nth-child(3) > td:nth-child(n+1),
#infotable > tbody > tr:nth-child(4) > td:nth-child(n+1),
#infotable > tbody > tr:nth-child(5) > td:nth-child(n+1),
#infotable > tbody > tr:nth-child(6) > td:nth-child(n+1) {
	background-color: rgba(0, 0, 0, 0.2);
}

/* set row heights */

#infotable > tbody > tr:nth-child(1) > td,
#infotable > tbody > tr:nth-child(3) > td,
#infotable > tbody > tr:nth-child(4) > td,
#infotable > tbody > tr:nth-child(5) > td {
	height: 50px;
}

#infotable > tbody > tr:nth-child(7) > td {
	height: 62px;
}
	
#infotable > tbody > tr:nth-child(2) > td,
#infotable > tbody > tr:nth-child(6) > td {
	height: 4px;
}

@media (min-width: 600px) {
	#card-infotable {
		height: 370px;
	}
	
	#infotable > tbody > tr:nth-child(1) > td {
		height: 55px;
	}
	
	#infotable > tbody > tr:nth-child(3) > td,
	#infotable > tbody > tr:nth-child(4) > td,
	#infotable > tbody > tr:nth-child(5) > td {
		height: 60px;
	}
	
	#infotable > tbody > tr:nth-child(7) > td {
		height: 70px;
	}
		
	#infotable > tbody > tr:nth-child(2) > td,
	#infotable > tbody > tr:nth-child(6) > td {
		height: 6px;
	}
}


/* set column widths */

#infotable-tr-head > td:nth-child(1) {		/* define width of left column */
	width: 19%;
}

#infotable-tr-head > td:nth-child(n+2) {	/* define witht of other columns */
	width: 27%;
}


/* header units */

#infotable > tbody > tr:nth-child(1) > td:nth-child(2)::after {
	content: " (PS)";
	font-size: 15px;
}

#infotable > tbody > tr:nth-child(1) > td:nth-child(3)::after {
	content: " (nm)";
	font-size: 15px;
}

#infotable > tbody > tr:nth-child(1) > td:nth-child(4)::after {
	content: " (km/h)";
	font-size: 15px;
}


/* dotted separator line to bottom row */

#infotable > tbody > tr:nth-child(2) > td,
#infotable > tbody > tr:nth-child(6) > td {
	box-sizing: border-box;
	white-space: nowrap;
	background-image: url("../images/dotted.png");
  	background-repeat: repeat-x;
}

#infotable > tbody > tr:nth-child(2) > td {
	background-position: center top;
}

#infotable > tbody > tr:nth-child(6) > td {
  	background-position: center bottom;
}

/* price is bold */

.infotable-bottom-row > td > p {
	font-weight: bold;
}

/* for toogling of currently displayed tuning stage */

.hidden {
	display: none;
}

.visible {
	display: block;
}


/* styling: numbers and contact */

.infotable-tr-delta {	/* numbers in row which shows performance gain delta */
	color: #0000ff;
}

.infotable-tr-delta::before {
	content: "+";
	margin-right: 3px;
	font-size: 22px;	
}

.infotable-number {	
	font-size: 22px;
	margin: 10px;
}

#infotable-contact-link {
	display: none;
	text-decoration: none;
	color: #BDBDBD;
}

#infotable-contact-button::after {
	content: "";
}

@media (min-width: 410px) {
	#infotable-contact-button::after {
		content: " aufnehmen";
	}
}

.infotable-contact {
	font-size: 17px;
}

@media (min-width: 600px) {
	.infotable-number {
		font-size: 28px;
	}
	.infotable-contact {
		font-size: 20px;
	}
}


/* price */

.price-normal {
	vertical-align: middle;
}

.price-discount {
	vertical-align: bottom;
	color: #0000eb;
}

.price-old {
	vertical-align: top;
	font-size: 15px;
	text-decoration: line-through;
}

.infotable-bottom-row > td > p {
	margin: 0;						/* prices have no margin */
}


/* Description */

#card-description {
	float: right;
	margin-top: 20px;
	width: 100%;
	height: 240px;
	text-align: left;
}

#card-description > div.card-content-container {
	text-align: left;
	padding: 15px;
	width: auto;		/* TODO: why?? */
}


/* pictures */

#card-pictures {
	width: 100%;
	max-width: 900px;
}

#pictures-slider {
	position: relative;
	top: 10px;
	margin: 10px 10px 20px 10px;
	height: 220px !important;
}

@media (min-width: 550px) {
	#pictures-slider {
		margin: 15px;
		height: 270px !important;
		top: 15px;
	}
	#card-pictures > .card-content-container {
		height: 300px;
	}
}

@media (min-width: 650px) {
	#pictures-slider {
		margin: 20px;
		height: 330px !important;
		top: 20px;
	}
	#card-pictures > .card-content-container {
		height: 370px;
	}
}

@media (min-width: 800px) {
	#pictures-slider {
		margin: 25px;
		height: 380px !important;
		top: 25px;
	}
	#card-pictures > .card-content-container {
		height: 430px;
	}
}

#pictures-slider > a {
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	-ms-border-radius: 10px;
	-o-border-radius: 10px;
	border-radius: 10px;
}

/* Media queries */

@media (min-width: 800px) {
	#card-infotable {
		height: 380px;		/* = height of description box */
	}
}

@media (min-width: 900px) {		/* get tuning table and description box in one row */
	#card-infotable {
		width: 65%;
	}
	#infotable-tr-head > td {
		height: 50px;
	}
	#card-description {
		width: 32%;
		margin-top: 0px;
		height: 380px;
	}
}
