/*
	Author: Andreas Älveborn
	URL: https://github.com/aelveborn/Wii-Scale

	This file is part of Wii-Scale
	Copyright (C) 2015 Andreas Älveborn

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License along
	with this program; if not, write to the Free Software Foundation, Inc.,
	51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/


// App
body {
	background-color: #fdfdfd;	
	font-family: 'Open Sans', sans-serif;
	font-weight: lighter;
}

h1.promotion {
	font-size: 5em;
	margin: 80px 0 120px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Open Sans', sans-serif;
	font-weight: lighter;
}

.clearfix {
	&:after {
		content:"";
		display:table;
		clear:both;
	}
}

/* Animations */
.animate-ng-repeat {

	&.ng-enter,
	&.ng-leave,
	&.ng-move {
		-webkit-transition: all linear 0.5s;
		transition: all linear 0.5s;
	}

	&.ng-enter-stagger,
	&.ng-leave-stagger,
	&.ng-move-stagger {
		/* 50ms between each item being animated after the other */
		-webkit-transition-delay:50ms;
		transition-delay:50ms;

		/* this is required here to prevent any CSS inheritance issues */
		-webkit-transition-duration:0;
		transition-duration:0;
	}

	&.ng-enter {
		opacity: 0;

		&.ng-enter-active {
			opacity: 1;
		}
	}

	&.ng-move {
		opacity: 0;

		&.ng-move-active {
			opacity: 1;
		}
	}

	&.ng-leave {
		opacity: 1;

		&.ng-leave-active {
			opacity: 0;
		}
	}
}

.animate-ng-show {
	opacity: 1;
	-webkit-transition: all linear 0.5s;
	transition: all linear 0.5s;

	&.animate-fast {
		-webkit-transition: all linear 0.2s;
		transition: all linear 0.2s;
	}
	
	&.ng-hide-add {
		-webkit-transition: none;
		transition: none;
	}

	&.ng-hide {
		opacity: 0;
	}
}

/* Styles */
.navbar {
	border: 0;
	margin-bottom: 0;
	background: @bg-bar-color;

	.navbar-header {
		float: left;
		margin-left: 0;
		margin-right: 0;

		.navbar-brand:hover {
			color: #fff;
		}
	}

	.navbar-nav.nav-controls {
		margin: 0;
		float: left;

		li {
			float: left;
			a {
				padding: 16px 15px 15px;
			}
		}

		&.navbar-right {
			float: right !important;
			margin-right: -15px;
		}

		a {
			display: block;
			color: #fff !important;

			.fa {
				top: 1px;
				position: relative;
				font-size: 20px;
				margin-right: 5px;
			}

			&.danger {
				background-color: @brand-danger;
				&:hover,
				&:active,
				&:focus,
				&:visited {
					background-color: darken(@brand-danger, 10%) !important;
				}
			}

			&.success {
				background-color: @brand-success;
				&:hover,
				&:active,
				&:focus,
				&:visited {
					background-color: darken(@brand-success, 10%) !important;
				}
			}
		}
	}

	.navbar-nav.nav-users {
		margin: 0;
		float: left;
		display: inline-block;

		.dropdown {
			float: left;

			.dropdown-icon {
				top: 1px;
				position: relative;
				font-size: 17px;
				margin-right: 5px;
			}

			.dropdown-arrow {
				margin-left: 8px;
			}

			.dropdown-toggle {
				color: #fff;
				font-size: 0.9em;
				font-weight: bold;
				padding: 18px 15px 14px;

				@media (max-width: 767px) {
					margin-left: -15px;
				}
			}

			.dropdown-menu {
				li {
					position: relative;

					a {
						span, i {
							padding-top: 13px;
							padding-bottom: 13px;
						}

						span {
							display: block;
							margin-right: 40px;
						}

						i.fa {
							float: right;
							position: absolute;
							right: 0;
							padding-left: 15px;
							padding-right: 15px;

							&:hover {
								color: @link-hover-color;
							}
						}
					}

					&:hover {
						background-color: @bg-complement;
					}

					&:hover.dropdown-header,
					&:hover:last-child {
						background-color: #fff;
					}
				}

				.divider {
					margin-top: 0;
				}

				.input-group {
					padding: 5px 15px 7px;
					.form-control {
						height: auto;
						font-weight: normal;
					}
				}
			}

			&.open {
				.dropdown-toggle {
					background-color: #222;

					@media (max-width: 767px) {
						display: block;
						float: left;
						margin-top: -53px;
						color: #fff;
						background-color: @bg-bar-color;
					}
				}

				.dropdown-menu {
					min-width: 250px;

					@media (max-width: 767px) {
						margin: 0 -15px;
						background-color: @bg-complement;

						a,
						.dropdown-header {
							padding-left: 15px;
						}
					}	
				}
			}
		}
	}
}

.status-bar {
	min-height: 70px;
	padding-top: 30px;
	padding-bottom: 20px;
	margin-bottom: 0;
	text-align: center;
	background-color: @bg-complement;

	.status {
		i, p {
			display: inline-block;
		}

		p {
			margin-left: 5px;
			font-weight: normal;
		}

		&.success {
			color: darken(@brand-success, 20%);
		}

		&.info {
			//color: darken(@brand-primary, 10%);
		}

		&.warning {
			color: darken(@brand-warning, 20%);
		}

		&.danger {
			color: darken(@brand-danger, 10%);
		}
	}
}

.progress {
	height: 2px;
	margin-bottom: 40px;
}

.weight {
	margin-top: 30px;
	text-align: center;

	.value {
		font-size: 92px;

		@media (min-width: 768px) {
			font-size: 120px;
		}

		@media (min-width: 992px) {
			font-size: 140px;
		}
	}

	.unit {
		font-size: 32px;
	}

	@media (min-width: 768px) {
		margin-top: 0;
	}
}

.history {
	@media (min-width: 992px) {
		margin-top: 15px;//45px;
	}

	a.delete {
		float: right;
		color: #777;
		display: inline-block;
		margin-left: 10px;
		padding: 2px 0px 3px 10px;
		line-height: 1;
		vertical-align: middle;
		white-space: nowrap;
		text-align: center;
		border-left: 1px solid #ddd;

		&:focus {
			outline: none;
		}

		&:hover {
			color: @link-hover-color;
		}
	}

	a {
		text-decoration: none;

		&.reset,
		&.show-more {
			text-transform: uppercase;

			.fa {
				padding-right: 5px;
			}
		}

		&.reset {
			//float: right;
			display: block;
		}
	}
}

.icon-heading .fa {
	padding-right: 8px;
}

.label-complement {
	background-color: #777;
}

/* Graph */
.chart-wrapper {
	margin-top: 60px;
}

.ct-chart {
	
	.ct-chart-line {
		padding-top: 20px;
	}

	.ct-label {
		font-size: 12px;
		font-weight: normal;
		fill: rgba(51, 51, 51, 0);

		@media (min-width: 768px) {
			fill: rgba(51, 51, 51, 0.5);
		}
	}

	.ct-label.ct-horizontal.ct-end {
		padding-top: 15px;
		border-top: solid 1px #ddd;
		color: rgba(51, 51, 51, 1);
	}

	.ct-series-a .ct-line, .ct-series-a .ct-point {
		stroke: @brand-success;
	}

	.ct-point {
		cursor: pointer;
		border: solid 10px transparent;

		&:hover {
			stroke: lighten(@brand-success, 10%);
		}
	}

}

.tooltip {
	color: #fff;
	padding: 3px 8px;
	position: absolute;
	background-color: rgba(0,0,0,0.5);
	border-radius: 3px;
}