/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net
 This file is licensed under the Affero General Public License version 3 or later.
 See the COPYING-README file. */

html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section { margin:0; padding:0; border:0; outline:0; font-weight:inherit; font-size:100%; font-family:inherit; vertical-align:baseline; cursor:default; }
html, body { height:100%; }
article, aside, dialog, figure, footer, header, hgroup, nav, section { display:block; }
body { line-height:1.5; }
table { border-collapse:separate; border-spacing:0; white-space:nowrap; }
caption, th, td { text-align:left; font-weight:normal; }
table, td, th { vertical-align:middle; }
a { border:0; color:#000; text-decoration:none;}
a, a *, input, input *, select, .button span, label { cursor:pointer; }
ul { list-style:none; }

body {
	background-color: #ffffff;
	font-weight: 400;
	font-size: .8em;
	line-height: 1.6em;
	font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif;
	color: #000;
	height: auto;
}

#body-login {
	text-align: center;
	background-image: url('../img/background.png');
	background-position: right bottom;
	background-repeat: no-repeat;
	background-size: cover;
}

/* SCROLLING */
::-webkit-scrollbar {
	width: 8px;
}
::-webkit-scrollbar-track-piece {
	background-color: transparent;
}
::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 3px;
}

/* CONTENT ------------------------------------------------------------------ */
#content {
	position: relative;
	height: 100%;
	width: 100%;
}
#content-wrapper {
	position: absolute;
	height: 100%;
	width: 100%;
	overflow-x: hidden; /* prevent horizontal scrollbar */
	/*padding-top: 45px;*/
	box-sizing:border-box;
}
/* allow horizontal scrollbar for personal and admin settings */
#body-settings:not(.snapjs-left) .app-settings {
	overflow-x: auto;
}

#emptycontent,
.emptycontent {
	color: #888;
	text-align: center;
	margin-top: 30vh;
	width: 100%;
}
#emptycontent.emptycontent-search,
.emptycontent.emptycontent-search {
	position: static;
}
#emptycontent h2,
.emptycontent h2 {
	margin-bottom: 10px;
	line-height: 150%;
}
#emptycontent [class^="icon-"],
.emptycontent [class^="icon-"],
#emptycontent [class*=" icon-"],
.emptycontent [class*=" icon-"] {
	background-size: 64px;
	height: 64px;
	width: 64px;
	margin: 0 auto 15px;
	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";
	opacity: .4;
}


/* LOG IN & INSTALLATION ------------------------------------------------------------ */

#body-login {
	background-attachment: fixed; /* fix background gradient */
	height: 101%; /* fix sticky footer */
}

/* Dark subtle label text */
#body-login p.info,
#body-login form legend,
#body-login #datadirContent label,
#body-login form .warning-info,
#body-login form input[type="checkbox"]+label {
	text-align: center;
	color: #fff;
}

#body-login form label {
	color: #fff;
	text-align: left;
	margin-bottom: .5rem;
	font-weight: bold;
}
/* overrides another !important statement that sets this to unreadable black */
#body-login form .warning input[type="checkbox"]:hover+label,
#body-login form .warning input[type="checkbox"]:focus+label,
#body-login form .warning input[type="checkbox"]+label {
	color: #fff !important;
}

#body-login .update h2 {
	margin: 12px 0 20px;
}

#body-login .update a {
	color: #fff;
	border-bottom: 1px solid #aaa;
}

#body-login .infogroup {
	margin-bottom: 15px;
}

#body-login p#message img {
	vertical-align: middle;
	padding: 5px;
}

#body-login p.info {
	margin: 0 auto;
	padding-top: 20px;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
#body-login p.info a {
	font-weight: 600;
	padding: 13px;
	margin: -13px;
}

#body-login form {
	position: relative;
	margin: 32px auto;
	width: 300px;
}

#body-login form fieldset {
	margin-bottom: 20px;
	text-align: left;
}
#body-login form #sqliteInformation {
	margin-top: -20px;
	margin-bottom: 20px;
}
#body-login form #adminaccount {
	margin-bottom: 15px;
}
#body-login form #adminaccount legend{
	margin-bottom: 15px;
}

#body-login #datadirContent {
	display: flex;
	justify-content: center;
	flex-direction: column;
	max-width: 300px;
	margin: 0 auto 1.2rem;
}

#body-login form fieldset legend, #datadirContent label {
	width: 100%;
}
#body-login #datadirContent label {
	display: block;
	margin-bottom: .5rem;
}
#body-login form #datadirField legend {
	margin-bottom: 15px;
}
#body-login #showAdvanced {
	padding: 13px; /* increase clickable area of Advanced dropdown */
}
#body-login #showAdvanced img {
	vertical-align: bottom; /* adjust position of Advanced dropdown arrow */
	margin-left: -4px;
}
#body-login .icon-info-white {
	padding: 10px;
}

#body-login footer {
	overflow: hidden;
}

#body-login footer * {
	transform: translate(0, 150%);
	transition: all .5s;
}

#body-login footer *.show {
	transform: translate(0, 0);
}

/* strengthify wrapper */
#body-login .strengthify-wrapper {
	display: inline-block;
	position: relative;
	left: 15px;
	bottom: 3px;
	width: 252px;
}

/* tipsy for the strengthify wrapper looks better with following font settings */
#body-login .tipsy-inner {
	font-weight: bold;
	color: #ccc;
}

/* General new input field look */
#body-login input[type="text"],
#body-login input[type="password"],
#body-login input[type="email"] {
	border: none;
	font-weight: 300;
}


/* Nicely grouping input field sets */
.grouptop,
.groupmiddle,
.groupbottom {
	position: relative;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	display: flex;
	justify-content: center;
	flex-direction: column;
	max-width: 300px;
	margin: 0 auto 1.2rem;
}

#body-login .grouptop input,
.grouptop input,
#body-login .groupmiddle input,
.groupmiddle input,
#body-login .groupbottom input,
.groupbottom input {
	box-shadow: 0 1px 0 rgba(0,0,0,.1) inset !important;
}

#body-login .submit-wrap {
	display: flex;
	justify-content: center;
	flex-direction: column;
	max-width: 300px;
	margin: 32px auto 1.2rem;
}

.loading-spinner {
	display: none;
	position: relative;
	width: 40px;
	height: 10px;
	margin: 0 auto;
}

/* Disable old loading spinner icon */
.submit-wrap button#submit.icon-loading-small:after,
.submit-wrap button#submit.icon-loading-small span {
	display: none !important;
}

.submit-wrap button#submit.icon-loading-small {
	background-image: none !important;
}

.submit-wrap .icon-loading-small .loading-spinner {
	display: inline-block;
}

.loading-spinner div {
	position: absolute;
	top: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.loading-spinner div:nth-child(1) {
	left: 4px;
	animation: loading-spinner1 0.6s infinite;
}
.loading-spinner div:nth-child(2) {
	left: 4px;
	animation: loading-spinner2 0.6s infinite;
}
.loading-spinner div:nth-child(3) {
	left: 16px;
	animation: loading-spinner2 0.6s infinite;
}
.loading-spinner div:nth-child(4) {
	left: 28px;
	animation: loading-spinner3 0.6s infinite;
}
@keyframes loading-spinner1 {
	0% {
		transform: scale(0);
	}
	100% {
		transform: scale(1);
	}
}
@keyframes loading-spinner3 {
	0% {
		transform: scale(1);
	}
	100% {
		transform: scale(0);
	}
}
@keyframes loading-spinner2 {
	0% {
		transform: translate(0, 0);
	}
	100% {
		transform: translate(12px, 0);
	}
}

#body-login form input[type="checkbox"]+label {
	position: relative;
	margin: 0;
	padding: 14px;
	padding-left: 28px;
	vertical-align: middle;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

#body-login form .errors { background:#fed7d7; border:1px solid #f00; list-style-position:inside; margin:0 0 2em; padding:1em; }
#body-login .success { background:#d7fed7; border:1px solid #0f0; width: 35%; margin: 30px auto; padding:1em; text-align: center;}

#body-login #showAdvanced > img {
	padding: 4px;
	box-sizing: border-box;
}

#body-login p.info a, #body-login #showAdvanced {
	color: #fff;
}

#body-login #remember_login:hover+label,
#body-login #remember_login:focus+label,
#body-login p.info a:hover,
#body-login p.info a:focus  {
	opacity: .6;
}

#pass2, input[name="personal-password-clone"] {
	padding: .6em 2.5em .4em .4em;
	width: 8em;
}
#personal-show + label {
	height: 14px;
	margin-top: 14px;
	margin-left: -36px;
}
#passwordbutton {
	margin-left: .5em;
}


/* Warnings and errors are the same */
#body-login .warning,
#body-login .update,
#body-login .error {
	display: block;
	padding: 10px;
	color: #fff;
	text-align: center;
	border-radius: 3px;
	cursor: default;
	border: 1px solid rgba(255,255,255,.5);
	margin-bottom: 1rem;
}

#body-login .update {
	width: inherit;
	text-align: center;
}

#body-login .update .appList {
	list-style: disc;
	text-align: left;
	margin-left: 25px;
	margin-right: 25px;
}

#body-login .update img.float-spinner {
	float: left;
}

#body-user .warning, #body-settings .warning {
	margin-top: 8px;
	padding: 5px;
	background: #fdd;
	border-radius: 3px;
}

.warning legend,
.warning a,
.error a {
	color: #fff !important;
	font-weight: 600 !important;
}
.error a.button {
	color: #555 !important;
	display: inline-block;
	text-align: center;
}
.error pre {
	white-space: pre-wrap;
	text-align: left;
}

.error-wide .button {
	color: black !important;
}

.warning-input {
	border-color: #ce3702 !important;
}

/* Fixes for log in page, TODO should be removed some time */
/* 2021/04: lol */
#body-login .warning {
	text-align: center;
}
#body-login .warning legend {
	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
	opacity: 1;
}
#body-login a.warning {
	cursor: pointer;
}

/* fixes for update page TODO should be fixed some time in a proper way */
/* this is just for an error while updating the ownCloud instance */
#body-login .updateProgress .error {
	margin-top: 10px;
	margin-bottom: 10px;
}

/* Alternative Logins */
form#alternative-logins {
	border-top: 1px solid rgba(255,255,255,0.8);
	padding-top: 16px;
}
#alternative-logins ul {text-align: center;}
#alternative-logins legend { margin-bottom:16px; }
#alternative-logins li {
	height:40px;
	display:inline-block;
	white-space:nowrap;
	width: 100%;
	margin-top: 1.2em;
}

#alternative-logins li:first-child {
	margin-top: 0;
}

#alternative-logins li a.button,
html #body-login input[type="submit"],
html #body-login button[type="submit"] {
	display: block;
	color: #ffffff;
	border-width: 1px;
	border-color: rgba(0,0,0,0);
	font-size: 1rem;
	font-weight: 600;
	background-color: #4e85c8;
	transition: all 300ms ease 0ms;
	padding: 0.65rem;
	text-align: center;
	margin: 0;
	cursor: pointer;
}

#alternative-logins li a.button span,
html #body-login input[type="submit"] span,
html #body-login button[type="submit"] span {
	cursor: pointer;
}

#alternative-logins li a.button:hover,
html #body-login input[type="submit"]:hover,
html #body-login button[type="submit"]:hover {
	color: #ffffff;
	border-color: rgb(66, 116, 176);
	border-width: 1px;
	background-image: initial;
	background-color: rgb(66, 116, 176);
}

/* Log in and install button */
#body-login input {
	font-size: 1rem;
	margin: 0px;
	padding: 0.65rem;
	width: calc(100% - 1.3rem);
}

#remember_login {
	margin: 18px 5px 0 16px !important;
}
#body-login .remember-login-container {
	margin: 16px 0;
	text-align: center;
}

#body-login .v-align {
	padding: 2rem;
	border-radius: 5px;
	margin: 0 auto;
	background-color: rgba(4,30,66,0.83);
	display: none;
}

#body-login.has-theme .v-align {
	background-color: unset;
}

/* Force constant vertical height for login box over all devices */
#body-login .wrapper {
	margin: 0 auto -70px;
	width: 100%;
	min-height: 100vh; /* fix IE11 */
	-ms-flex-direction: row !important;
	-ms-flex-pack: center !important;
	-ms-flex-align: center !important;
	display: flex !important;
	flex-direction: row !important;
	align-self: center !important;
	align-items: center !important;
}

@media all and (min-width: 600px) {
	#body-login .wrapper {
		min-width: calc(700px + 4rem);
		max-width: calc(700px + 4rem);
	}
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
	#body-login .wrapper {
		display: block !important;
	}
}

code { font-family:"Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", monospace; }


/* public footer */
#body-public footer {
	position: relative;
	text-align: center;
}

#body-public footer .info {
	color: #777;
	text-align: center;
	margin: 0 auto;
}

#body-public footer .info a {
	color: #777;
	font-weight: 600;
	padding: 13px;
	margin: -13px;
	display: inline;
}

footer .info a {
	display: inline-block;
}

/* for IE10 */
@-ms-viewport {
	width: device-width;
}

/* hidden input type=file field */
.hiddenuploadfield {
	width: 0;
	height: 0;
	opacity: 0;
	-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
}

@media only screen and (max-width: 1030px) {
	#body-login p.info {
		margin: 0 auto;
		padding-top: 35px;
	}
}
