/*
 *
 * Datto Accounts
 * Copyright (C) 2018 Datto Inc.
 *
 * 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.
 */

/*
 * Datto theme for Stanford WebAuth
 * Dan Fuhry <df@datto.com>
 * February 22, 2016
 */

/* Setup - body */
body {
	background-color: #0C4C69;
	background-size: cover;
	background-attachment: fixed;
	background-position: center top;
}

/* copy */
.webauth .signin-copy-initial {
	padding: 10px 0;
}

/* Bootstrap overrides */
.webauth div.well {
	border-radius: 0;
	border-width: 0;
	background-color: rgba(255, 255, 255, 0.65);
}

	.webauth img.sso-logo-sm {
		display: none;
	}

	.webauth div.well.login-form {
		background-image: none;
		position: absolute;
		top: 50%;
		left: 0;
		right: 0;
		margin: auto;
		width: 800px;
		padding: 0.5em 15px;
		transform: translateY(-50%);
	}

.webauth div.loginbox form {
	width: 375px;
	padding-right: 10px;
	margin-top: 0;
	float: left;
}

	.webauth div.loginbox form.wide {
		width: 100%;
	}

		.webauth div.loginbox form.wide .form-group {
			width: 365px;
		}

		.webauth div.loginbox form.wide .form-group.wide {
			width: 100%;
		}

	.webauth .subpage.userpass div.loginbox form {
		margin-top: 20px;

	}

	.webauth div.pwchange div.loginbox form {
		width: 100%;
		float: none;
	}

	.webauth div.pwchange div.loginbox .form-group {
		width: 375px;
	}

	.webauth div.pwchange .form-group.pw-tip {
		float: right;
		padding-left: 20px;
	}

	.webauth div.pwchange .form-group.pw-tip ul {
		list-style: none;
		padding: 0 0 0 5pt;
	}

	.webauth div.pwchange .form-group.pw-tip ul li:before {
		float: left;
		margin: -2pt 0 0 -10pt;
		font-size: 1.2em;
		font-weight: bold;
		content: "\203a";
	}

.webauth .btn span.glyphicon {
	font-size: 10pt;
	position: relative;
	top: -1pt;
}

.input-group-btn > .btn {
	padding-bottom: 8px;
}

.webauth .alert.prominently-displayed-error {
	margin-top: 20px;
}

.webauth div.links {
	float: right;
	width: 375px;
	padding-top: 0;
	border-left: 1px solid #aeb8bc;
	padding-left: 15px;
	min-height: 150px;
}

.webauth div.links ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

.webauth div.links ul li {
	line-height: 240%;
}

.webauth .progress {
	margin-top: 10px;
}

/* Form elements */
button.login-mfa-push {
	background-size: 48px 48px;
	background-position: center center !important;
	background-repeat: no-repeat;
	line-height: 48px;
	padding: 0 !important;
}

button.login-mfa-push span.name {
	visibility: hidden;
	display: block;
	padding: 5px 20px;
	color: #116A91;
	background-color: rgba(255, 255, 255, 0.6);
}

	button.login-mfa-push:hover span.name {
		visibility: visible;
	}

/* Responsive overrides */
@media (max-width: 849px) {
	.webauth img.sso-logo-sm {
		display: inline;
	}

	.webauth img.sso-logo-lg {
		display: none;
	}

	.webauth div.well.login-form {
		position: normal;
		width: 100%;
	}

	.webauth div.loginbox form, .webauth div.links {
		width: auto;
		float: none;
	}

	.webauth div.links {
		border-left-width: 0;
		padding-left: 0;
	}
}

/* Dattoman animation on the SAML interstitial page */
@keyframes dattoshake {
	0% { transform: rotate(0deg); }
	2% { transform: rotate(-15deg); }
	6% { transform: rotate(15deg); }
	10% { transform: rotate(-15deg); }
	14% { transform: rotate(15deg); }
	18% { transform: rotate(-15deg); }
	22% { transform: rotate(15deg); }
	26% { transform: rotate(-15deg); }
	30% { transform: rotate(15deg); }
	32% { transform: rotate(0deg); }
}
@keyframes dattozoom {
	0% { transform: rotate(-1080deg); width: 0px; height: 0px; }
	100% { transform: rotate(0deg); width: 200px; height: 200px; }
}
div.dattoman {
	width: 200px;
	height: 200px;
	margin: 20px auto;
	position: relative;
}
div.dattoman img {
	background-size: contain;
	display: block;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	margin: auto;
	animation-duration: 2s;
	animation-iteration-count: 1;
	animation-name: dattozoom;
	animation-fill-mode: forwards;
}
div.dattoman.wave img {
	width: 200px;
	height: 200px;
	transform: rotate(0deg);
	transition: transform 1s, width 1s, height 1s;
	animation-name: dattoshake;
	animation-duration: 3s;
	animation-delay: 0;
	animation-iteration-count: infinite;
}

/* HiDPI tweaks! */
img.sso-logo-sm {
	background-size: contain;
	background-repeat: no-repeat;
	width: 277px;
	height: 52px;
}
img.sso-logo-lg {
	background-size: contain;
	background-repeat: no-repeat;
	width: 443px;
	height: 52px;
}
@media
	only screen and (min-device-pixel-ratio: 2),
	only screen and (-webkit-min-device-pixel-ratio: 2),
	only screen and (min-resolution: 192dpi),
	only screen and (min-resolution: 2dppx) {
		img.sso-logo-sm {
			/* background-image: url(......); */
		}
		img.sso-logo-lg {
			/* background-image: url((......); */
		}

		div.dattoman img {
			/* background-image: url((......); */
		}
	}