/*
 * Login / password recovery pages
 * Split-panel design: colored brand panel + white form panel.
 */

/* ---------- page shell ---------- */

body.task-login {
	background: #ffffff;
	height: 100%;
	width: 100%;
}

body.task-login #layout,
body.task-login #layout-content {
	background: transparent;
}

.auth-page {
	min-height: 100vh;
	height: 100%;
	box-sizing: border-box;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
	box-sizing: border-box;
}

.auth-shell {
	width: 100%;
	background: #fff;
	border: 1px solid #E1E6EE;
	overflow: hidden;
	height: 100%;
	position: absolute;
}

/* ---------- brand panel ---------- */

.auth-panel {
	background: #7E848C;
	padding: 40px 36px;
	height: 100%;
	position: absolute;
	overflow: hidden;
	top: 0;
	left: 0;
	width: 32%;
	display: block;
	/*background-image: url("/skins/mailweb/images/russia.svg");*/
	/*background-position: -50% 80%;*/
	/*background-size: 50%;*/

	background-repeat: no-repeat;
}

.auth-panel-rings span {
	position: absolute;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 50%;
	will-change: transform;
}
.auth-content .input-group-text {
	background-color: transparent;
	border: none;
	color: #cccccc;
	padding: 1.7rem 1rem !important;
}
.auth-panel-rings span:nth-child(1) {
	left: -90px;
	top: -70px;
	width: 260px;
	height: 260px;
	animation: authRingDriftA 7s ease-in-out infinite;
}

.auth-panel-rings span:nth-child(2) {
	right: -110px;
	top: 150px;
	width: 320px;
	height: 320px;
	animation: authRingDriftB 9s ease-in-out -2s infinite;
}

.auth-panel-rings span:nth-child(3) {
	right: -40px;
	bottom: -110px;
	width: 220px;
	height: 220px;
	animation: authRingDriftC 6s ease-in-out -1s infinite;
}

@keyframes authRingDriftA {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(-24px, 28px) scale(1.06); }
}
@keyframes authRingDriftB {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(28px, -22px) scale(.94); }
}
@keyframes authRingDriftC {
	0%, 100% { transform: translate(0, 0); }
	50% { transform: translate(15px, 18px); }
}

@media (prefers-reduced-motion: reduce) {
	.auth-panel-rings span {
		animation: none !important;
	}
}

.auth-panel-compact {
	justify-content: flex-start;
}

.auth-panel-logo {
	position: relative;
	height: 20px;
	width: auto;
	display: block;
	margin-bottom: 30%;
}

.auth-panel-body {
	position: relative;
	display: block;
	margin-bottom: 28px;
}

.auth-panel-body h1 {
	margin: 0 0 14px 0;
	color: #fff;
	letter-spacing: -0.015em;
}

.auth-panel-body p {
	margin: 0;
	color: rgba(255, 255, 255, .75);
	max-width: 280px;
}

.auth-panel-team {
	position: absolute;
	bottom: 40px;
	left: 36px;
	right: 36px;
	display: block;
}
.auth-panel-team a {
	color: #ffffff;
	text-decoration: underline;
}
.auth-panel-team img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 2px solid #7E848C;
	object-fit: cover;
	display: inline-block;
	vertical-align: middle;
	margin-right: -10px;
	position: relative;
	z-index: 1;
}

.auth-panel-team img:first-child {
	margin-right: -10px;
	z-index: 3;
}

.auth-panel-team img:nth-child(2) {
	margin-right: -10px;
	z-index: 2;
}

.auth-panel-team img:nth-child(3) {
	margin-right: 12px;
	z-index: 1;
}

.auth-panel-team span {
	color: rgba(255, 255, 255, .82);
	max-width: 210px;
	display: inline-block;
	vertical-align: middle;
	font-size: 10px;
}

/* ---------- form panel ---------- */

.auth-content {
	padding: 44px 48px;
	display: block;
	height: 100%;
	margin-left: 32%;
	position: relative;
	vertical-align: middle;
}

.auth-form-wrap {
	width: 100%;
	max-width: 60%;
	margin: 15% auto;
}

.auth-back {
	display: inline-block;
	margin-bottom: 18px;
	color: #6B7A94;
}

.auth-back:hover {
	color: #274C77;
	text-decoration: none;
}

.auth-heading {
	margin: 0 0 6px;
	color: #3A3E46;
	letter-spacing: -0.01em;
}

.auth-subheading {
	margin: 0 0 22px;
	color: #6B7A94;
}

/* roundcube renders the login/recovery form fields as a two-column table
   (label | input); collapse it into stacked labeled fields to match design */
#login-form,
#recovery-password-form,
#new-password-form {
	display: block;
	width: 100%;
}

#login-form table,
#recovery-password-form table,
#new-password-form table {
	display: block;
	width: 100%;
	border-collapse: collapse;
}

#login-form tbody,
#recovery-password-form tbody,
#new-password-form tbody {
	display: block;
	width: 100%;
}

#login-form tr,
#recovery-password-form tr,
#new-password-form tr {
	display: block;
	width: 100%;
	margin-bottom: 14px;
}

#login-form tr.form-group,
#recovery-password-form tr.form-group,
#new-password-form tr.form-group {
	margin-bottom: 14px;
}

#login-form td,
#recovery-password-form td,
#new-password-form td {
	display: block;
	padding: 0;
	margin-bottom: 6px;
}

#login-form td.input,
#recovery-password-form td.input,
#new-password-form td.input {
	margin-bottom: 0;
}

#login-form td.title label,
#recovery-password-form td.title label,
#new-password-form td.title label {
	color: #6B7A94;
}
#recovery-password-form .submit {
	font-size: 12px;
}
/* the theme's own ui.js hides the label and turns the username/password
   row into a placeholder + icon input-group (see ui.js "Make logon form
   prettier") — style that combo as a single bordered field */
#login-form td.input.input-group {
	display: block;
	width: 100%;
	height: 46px;
	background: #fff;
	border: 1px solid #DDE3EC;
	border-radius: 6px;
	position: relative;
	padding-left: 43px;
	padding-right: 40px;
	box-sizing: border-box;
}

#login-form td.input.input-group:focus-within {
	border-color: #bac0c8;
}

#login-form td.input.input-group .input-group-prepend {
	display: block;
	position: absolute;
	left: 0;
	top: 0;
	width: 43px;
	height: 46px;
	line-height: 46px;
	color: #9AA6BA;
	text-align: center;
	z-index: 1;
}

#login-form td.input.input-group input.form-control {
	display: block;
	width: 100%;
	height: 46px;
	padding: 0;
	border: none;
	background: transparent;
	outline: none;
	color: #3A3E46;
	box-sizing: border-box;
	position: relative;
}

#login-form td.input.input-group input.form-control.error {
	color: #C0392B;
}

.password-toggle-btn {
	position: absolute;
	right: 0;
	top: 0;
	width: 40px;
	height: 46px;
	padding: 0;
	border: none;
	background: transparent;
	color: #9AA6BA;
	cursor: pointer;
	text-align: center;
	line-height: 46px;
	font-weight: 500;
	font-size: 14px;
	transition: color 0.15s ease;
	z-index: 2;
}

.password-toggle-btn:hover {
	color: #274C77;
}

.password-toggle-btn.active {
	color: #274C77;
}

/* plain (non roundcube:object) forms: recovery + new-password screens */
.auth-form-wrap form {
	display: block;
	width: 100%;
}

.auth-field {
	display: block;
	width: 100%;
	margin-bottom: 14px;
}

.auth-field label {
	color: #6B7A94;
	display: block;
	margin-bottom: 6px;
}

.auth-form-wrap input[type="text"],
.auth-form-wrap input[type="email"],
.auth-form-wrap input[type="password"] {
	width: 100%;
	height: 46px;
	padding: 0 13px;
	background: #fff;
	border: 1px solid #DDE3EC;
	border-radius: 6px;
	color: #3A3E46;
	outline: none;
	transition: border-color .15s ease;
}

.auth-form-wrap input[type="text"]:focus,
.auth-form-wrap input[type="email"]:focus,
.auth-form-wrap input[type="password"]:focus {
	border-color: #DDE3EC;
}

.auth-form-wrap input.error {
	border-color: #C0392B;
}

.auth-form-wrap ::placeholder {
	color: #9AA6BA;
}

/* "Forgot password?" link injected by the password_recovery plugin
   (appended as the form's last child) — reorder it above the submit button */
#login-form #password_forgot {
	display: block;
	text-align: right;
	margin-top: 15px;
	color: #3667AF;
	margin-bottom: 14px;
}

#login-form #password_forgot:hover {
	color: #26497A;
	text-decoration: underline;
}

/* "Send a new code" link injected by the password_recovery plugin into
   the new-password form (appended as the form's last child) */
#new-password-form #renew_confirm_code {
	align-self: flex-end;
	color: #3667AF;
}

#new-password-form #renew_confirm_code:hover {
	color: #26497A;
	text-decoration: underline;
}

.auth-form-wrap .formbuttons,
#login-form .formbuttons {
	margin: 0;
	display: block;
	margin-top: 14px;
}

/*.auth-form-wrap button.button,*/
/*.auth-form-wrap button.mainaction,*/
/*#rcmloginsubmit {*/
/*	width: 100%;*/
/*	height: 46px;*/
/*	border: none;*/
/*	border-radius: 6px;*/
/*	background-color: #45515C;*/
/*	color: #fff;*/
/*	cursor: pointer;*/
/*	!* ui.js adds bootstrap's .text-uppercase (!important) to the login*/
/*	   submit button; the design calls for normal-case labels *!*/
/*	text-transform: none !important;*/
/*}*/

/*.auth-form-wrap button.button:hover,*/
/*.auth-form-wrap button.mainaction:hover,*/
/*#rcmloginsubmit:hover {*/
/*	background-color: #333D46;*/
/*}*/

.auth-form-wrap button.btn-empty {
	width: 100%;
	height: 46px;
	border: 1px solid #DDE3EC;
	border-radius: 6px;
	background: #fff;
	color: #45515C;
	cursor: pointer;
}

.auth-divider {
	display: block;
	margin: 20px 0;
	text-align: center;
	position: relative;
	height: 20px;
	line-height: 20px;
}

.auth-divider span {
	color: #9AA6BA;
	position: relative;
	background: #fff;
	padding: 0 12px;
	z-index: 1;
	display: inline-block;
}

.auth-divider::before,
.auth-divider::after {
	content: "";
	display: block;
	height: 1px;
	background: #EBEFF6;
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	z-index: 0;
}

.auth-register-link {
	display: block;
	text-align: center;
	color: #3667AF;
}

.auth-register-link:hover {
	color: #26497A;
	text-decoration: underline;
}

.auth-hint {
	margin: 18px 0 0;
	color: #9AA6BA;
}

/* ---------- remembered user ---------- */

.auth-remembered {
	display: block;
	margin-bottom: 22px;
	padding: 14px;
	border: 1px solid #E1E6EE;
	border-radius: 8px;
	position: relative;
	min-height: 50px;
}

.auth-remembered-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #EEF1F6;
	color: #6B7A94;
	display: inline-block;
	vertical-align: middle;
	font-size: 18px;
	line-height: 40px;
	text-align: center;
	margin-right: 14px;
}

.auth-remembered-info {
	display: inline-block;
	vertical-align: middle;
	width: calc(100% - 100px);
}

.auth-remembered-name {
	color: #3A3E46;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
}

.auth-remembered-email {
	color: #6B7A94;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
}

.auth-remembered-change {
	display: inline-block;
	vertical-align: middle;
	color: #9AA6BA;
	font-size: 18px;
	line-height: 1;
	position: absolute;
	right: 14px;
	top: 50%;
	margin-top: -9px;
}

.auth-remembered-change:hover {
	color: #274C77;
}
@media (max-width: 1024px) {
	.auth-shell {
		max-width: 100%;
	}
	.auth-panel {
		width: 50%;
	}
	.auth-content {
		margin-left: 50%;
	}
	.auth-form-wrap {
		max-width: 100%;
	}
}
/* ---------- responsive ---------- */

@media (max-width: 860px) {
	.auth-shell {
		max-width: 100%;
		position: static;
	}

	.auth-panel {
		position: static;
		width: 100%;
		padding: 28px 26px 26px;
		height: 100px;
		margin-bottom: 20px;
	}

	.auth-panel-body p {
		max-width: none;
	}

	.auth-content {
		padding: 32px 26px;
		display: block;
		margin-left: 0;
		height: auto;
	}
	.auth-form-wrap {
		max-width: 100%;
	}
}

@media (max-width: 480px) {
	.auth-page {
		padding: 0;
	}

	.auth-shell {
		max-width: none;
		min-height: 100vh;
		border: none;
		border-radius: 0;
		position: static;
	}

	.auth-panel {
		position: static;
		width: 100%;
		height: auto;
		margin-bottom: 20px;
	}

	.auth-content {
		margin-left: 0;
		height: auto;
	}
}
