/* import the base */
@import 'base/_colors';
@import 'base/_sizes';
@import 'base/_fonts';

/* The animation for the spinner */
@keyframes rotate {
	to {
		transform: rotate(360deg);
	}
}

html, body {
	height: 100%;
	font-family: arial, tahoma, helvetica, sans-serif;
	font-size: 13px;
}
body.login,
#loading-mask,
#bg,
body.zarafa-welcome {
	margin: 0;
	padding: 0;
	background: url(../../images/loginbg_daybreak.jpg) no-repeat center center;
	background-size: cover;
}

body.login.theme-basic:after,
body.theme-basic #loading-mask:after,
body.theme-basic #bg:after,
body.theme-basic.zarafa-welcome:after,
body.login.theme-highcontrast:after,
body.theme-highcontrast #loading-mask:after,
body.theme-highcontrast #bg:after,
body.theme-highcontrast.zarafa-welcome:after,
body.login.theme-dark:after,
body.theme-dark #loading-mask:after,
body.theme-dark #bg:after,
body.theme-dark.zarafa-welcome:after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0;
	padding: 0;
	background: url(../../images/background.svg) center/cover no-repeat;
	z-index: -1;
}

#loading-mask {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/** ExtJS uses 20001 as z-index for its loading mask, so we need to use values higher then this **/
	z-index: 20002;
}

body.login,
#loading-mask {
	#form-container {
		display: inline-block;
		visibility: hidden;
		top: 0;
		position: relative;
		overflow: hidden;
		z-index: 20010;
		color: $dark-grey2;

		#bg {
			position: absolute;
			left: 0;
			top: 0;
			-webkit-filter: blur(10px);
			filter: blur(10px);
		}

		#content {
			width: 560px;
			padding: 50px 60px 60px;
			background: rgba(255, 255, 255, 0.5);
			position: relative;
		}
		/* clearfix */
		#content:after {
    		content: " ";
    		display: block;
			clear: both;
		}

		.left {
			float: left;
			width: 220px;
			height: 220px;
			padding-right: 60px;
		}
		.right {
			float: left;
			width: 245px;
			padding-left: 35px;
			min-height: 220px;
			position: relative;
		}

		h1 {
			font-size: 36px !important;
			line-height: 36px;
			font-weight: normal;
			margin: 0 0 30px;
		}
		h2 {
			font-size: 13px;
			font-weight: normal;
			text-align: right;
		}

		#logo {
			background: url(../../images/kopano-logo.svg) no-repeat right center;
			background-size: 220px 52px;
			width: 100%;
			height: 61px;
			margin: 71px 0 15px;
		}
	}

	#form-container.loading {
		visibility: visible;
		.right {
			h1, form{
				display: none;
			}

			background: url(../../images/loading_m.png) no-repeat center center;
			animation: rotate 1.3s 0s infinite ease;
		}
	}
}


body.login > #form-container {
	label {
		display: block;
		margin-bottom: 0.5em;
	}
	input[type="text"],
	input[type="password"] {
		display: block;
		width: 245 - 2* $padding-medium - 2;
		background: $white !important;
		border: 1px solid $grey;
		padding: 0 $padding-medium;
		margin-bottom: 15px;
		height: 24px;
	}

	input:-webkit-autofill {
		-webkit-box-shadow: 0 0 0px 1000px $white inset;
	}

	input:focus {
		outline:0;
		border-color: $sky-blue;
	}

	#password {
		margin-bottom: 8px;
	}

	#error {
		color: #e40023;
	}

	#submitbutton {
		background: $kopano-blue;
		color: $white;
		height: 24px;
		line-height: 24px;
		border: 1px solid transparent;
		padding: 0 $padding-large;
		min-width: 84px;
		margin: 12px 0 0;
		box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.35);
	}
	#submitbutton:hover {
		background-color: $kopano-blue-hover;
	}
	#submitbutton:click {
		background-color: $kopano-blue-active;
	}
	#submitbutton:focus {
		box-shadow: 0 0 0 1px $white inset;
	}
}

// Interactive login page.
body.login > .container {
	height: inherit;
	display: flex;
	justify-content: center;
	align-items: center;

	.form-container{
		background-color: $white;
		padding: 20px;
		width: 400px;
		height: 350px;
		box-shadow: #000 1px 7px 14px 0px;
		border-radius: 3px;
		display: flex;
		justify-content: space-evenly;
		align-items: center;
		flex-flow: column;

		#logo {
			background: url(../../images/kopano-webapp-icon.svg) no-repeat center;
			width: 100%;
			height: 150px;
		}

		#signin-btn{
			padding: 10px;
			outline: none;
			border: 1px solid $grey5;
			border-radius: 3px;
			background-color: $white;
			font-size: 14px;
			font-family: sans-serif;
			cursor: pointer;
		}

		#signin-btn:hover{
			box-shadow: 1px 3px 7px -1px $grey6;
		}
	}

}

#oidc-error-msgBox {
  margin: 0px auto;
  width: 30%;
  background-color: #FFFFFF;
  border-radius: 3px;
  position: relative;
  top: 10px;
  font-size: 14px;
  box-shadow: 0px 0px 10px 1px #9f9f9f;

  .oidc-msg-container {
    .title {
      font-size: $font-size-extra-large;
      font-weight: bold;
      padding: $padding-extra-large;
    }

    .body {
      padding: $padding-extra-large;
    }

    .button-container {
      padding: 5px;
      display: flex;
      justify-content: flex-end;

      .btn {
        background: $kopano-blue;
        color: $white;
        line-height: $button-small-height;
        border: 1px solid transparent;
        padding: 0 $padding-large;
        margin: 5px;
        cursor: pointer;
        box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.35);
      }
      .btn:hover {
        background-color: $kopano-blue-hover;
      }
      .btn:click {
        background-color: $kopano-blue-active;
      }
      .btn:focus {
        box-shadow: 0 0 0 1px $white inset;
      }
    }
  }
}

/* IE10 and IE11 don't support filters, so we load a blurred copy of the background image
 * and use that  */
body.login.MSIE10 #bg,
body.login.MSIE11 #bg{
	background-image: url(../../images/loginbg_daybreak_blurred.jpg);
}
