/*
 * Paperboat Issue Tracker — login page theme (+ imports the app theme).
 *
 * Loaded via $g_css_include_file, which REPLACES Mantis' css/default.css,
 * so we import it first. Every rule below is scoped to body.login-layout
 * (login, password, lost-password pages); the rest of the app is untouched.
 *
 * This file is loaded before ace.min.css, so some rules need !important
 * to win over Ace's own !important button colours.
 */
@import url("../css/default.css");
@import url("paperboat-app.css?v=31");   /* logged-in pages */

body.login-layout {
	--pb-blue: #1DA1F2;          /* Paperboat brand blue (logo) */
	--pb-blue-hover: #0F92E3;
	--pb-link: #0B7BC4;          /* same hue, darker: readable small text on white */
	--pb-ink: #0B2545;
	--pb-muted: #5B6B7F;
	--pb-paper: #F5F8FC;
	--pb-line: #D6E2EE;
	--pb-sea-top: #1DA1F2;
	--pb-sea-bottom: #1B9CEE;         /* keeps navy footer text >= 5:1 */
	--pb-on-blue: #0B2545;            /* text on brand blue: 5.4:1 (white is 2.8:1) */
	--pb-btn: #0A78C0;                /* solid buttons: deeper brand blue, white text 4.7:1 */
	--pb-btn-hover: #0966A6;

	min-height: 100vh;
	color: var(--pb-ink);
	background:
		radial-gradient(1200px 600px at 50% -10%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%),
		var(--pb-paper) !important;
	overflow-x: hidden;
}

/* ---------- Sea: two drifting wave layers along the bottom ---------- */
body.login-layout::before,
body.login-layout::after {
	content: "";
	clip-path: inset(2px 0 0 0);   /* hide Chrome's 1px top-edge sliver on masked boxes */
	position: fixed;
	left: -80px;
	right: -80px;
	bottom: 0;
	pointer-events: none;
	/* smooth wave crest (inline SVG, allowed by the img-src data: CSP) + solid water below */
	-webkit-mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 Q150 2 300 20 T600 20 T900 20 T1200 20 V40 H0Z'/%3E%3C/svg%3E") 0 0 / 640px 30px repeat-x,
		linear-gradient(#000, #000) 0 29px / 100% 100% no-repeat;
	        mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20 Q150 2 300 20 T600 20 T900 20 T1200 20 V40 H0Z'/%3E%3C/svg%3E") 0 0 / 640px 30px repeat-x,
		linear-gradient(#000, #000) 0 29px / 100% 100% no-repeat;
}
body.login-layout::after {                       /* back wave */
	height: 24vh;
	background: linear-gradient(180deg, #A5DAFB 0%, #6CC3F7 100%);
	opacity: .55;
	-webkit-mask-position: 220px 0, 0 29px;
	        mask-position: 220px 0, 0 29px;
	animation: pb-drift-back 18s linear infinite;
}
body.login-layout::before {                      /* front wave */
	height: 19vh;
	z-index: 1;
	background: linear-gradient(180deg, var(--pb-sea-top) 0%, var(--pb-sea-bottom) 100%);
	animation: pb-drift 12s linear infinite;
}

/* ---------- Faint origami lattice, fading out towards the edges ---------- */
body.login-layout .main-container {
	position: relative;
	z-index: 2;
	background: transparent;
}
body.login-layout .main-container::before {
	display: block !important;
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		repeating-linear-gradient(60deg,  rgba(29, 161, 242, .07) 0 1px, transparent 1px 46px),
		repeating-linear-gradient(-60deg, rgba(29, 161, 242, .07) 0 1px, transparent 1px 46px),
		repeating-linear-gradient(0deg,   rgba(29, 161, 242, .05) 0 1px, transparent 1px 40px);
	-webkit-mask: radial-gradient(ellipse 70% 60% at 50% 38%, #000 0%, transparent 75%);
	        mask: radial-gradient(ellipse 70% 60% at 50% 38%, #000 0%, transparent 75%);
}

/* ---------- Layout: one centred column ---------- */
body.login-layout .main-content {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 16px 22vh !important;
	background: transparent;
}
body.login-layout .main-content > .row {
	width: 100%;
	margin: 0;
}
body.login-layout .main-content > .row > [class*="col-"] {
	float: none;
	width: 100%;
	margin: 0;
	padding: 0;
}
body.login-layout .login-container {
	width: 400px;
	max-width: 100%;
	margin: 0 auto;
}
body.login-layout .login-container .space-12,
body.login-layout .login-container .space-24 {
	display: none;
}

/* ---------- Brand block: bobbing boat + title ---------- */
body.login-layout .login-logo {
	text-align: center;
	margin-bottom: 28px;
	animation: pb-rise .7s cubic-bezier(.2, .7, .2, 1) both;
}
body.login-layout .login-logo img {
	width: 84px;
	height: 84px;
	border-radius: 50%;
	box-shadow: 0 14px 30px -12px rgba(29, 161, 242, .55);
	animation: pb-bob 5s ease-in-out infinite;
}
body.login-layout .login-logo::after {
	content: "Paperboat Client Portal";
	display: block;
	margin-top: 18px;
	font-family: 'Poppins', 'Open Sans', sans-serif;
	font-size: 24px;
	letter-spacing: -.01em;
	color: var(--pb-ink);
}

/* ---------- Card ---------- */
body.login-layout .widget-box,
body.login-layout.light-login .widget-box {
	padding: 0 !important;
	border: 0 !important;
	border-radius: 18px;
	background: #FFFFFF !important;
	box-shadow:
		0 1px 2px rgba(11, 37, 69, .06),
		0 30px 60px -24px rgba(11, 37, 69, .30) !important;
	overflow: hidden;
	animation: pb-rise .7s .12s cubic-bezier(.2, .7, .2, 1) both;
}
body.login-layout .widget-box .widget-body {
	position: relative;
	background: #FFFFFF;
}
/* folded paper corner */
body.login-layout .widget-box .widget-body::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 34px;
	height: 34px;
	background: linear-gradient(225deg, var(--pb-paper) 50%, #DCEBF8 50%);
	border-bottom-left-radius: 8px;
	box-shadow: -3px 3px 6px -2px rgba(11, 37, 69, .12);
}
body.login-layout .widget-box .widget-main {
	padding: 34px 38px 32px !important;
	background: #FFFFFF !important;
}

body.login-layout .widget-main h4.header {
	margin: 0 0 4px;
	padding: 0;
	border: 0;
	font-family: 'Poppins', 'Open Sans', sans-serif;
	font-size: 20px;
	color: var(--pb-ink) !important;
}
body.login-layout .widget-main h4.header .ace-icon {
	display: none;
}
body.login-layout .widget-main:has(#login-form[action="login_password_page.php"]) h4.header::after {
	content: "Sign in to follow and discuss your project.";
	display: block;
	margin-top: 6px;
	font-family: 'Open Sans', sans-serif;
	font-size: 13.5px;
	color: var(--pb-muted);
}
body.login-layout .widget-main > .space-10:first-of-type {
	height: 22px;
}

/* "Enter password for 'x'" line on step two */
body.login-layout #login-form fieldset {
	color: var(--pb-muted);
	font-size: 13.5px;
}

/* ---------- Inputs ---------- */
body.login-layout .widget-main label.block {
	margin-bottom: 14px;
}
body.login-layout .widget-main .form-control {
	height: 50px;
	padding: 0 44px 0 16px;
	font-size: 15px;
	color: var(--pb-ink);
	background: #F8FBFE;
	border: 1.5px solid var(--pb-line);
	border-radius: 11px !important;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
body.login-layout .widget-main .form-control::placeholder {
	color: #93A3B5;
}
body.login-layout .widget-main .form-control:focus {
	background: #FFFFFF;
	border-color: var(--pb-blue);
	box-shadow: 0 0 0 4px rgba(29, 161, 242, .18);
	outline: none;
}
body.login-layout .widget-main .input-icon > .ace-icon {
	line-height: 50px;
	right: 6px;
	color: #9AAABB;
	transition: color .15s;
}
body.login-layout .widget-main .input-icon > .form-control:focus + .ace-icon {
	color: var(--pb-blue);
}

/* ---------- Checkboxes (remember me / secure session) ---------- */
body.login-layout .widget-main label.inline {
	margin: 2px 0 6px;
	color: var(--pb-ink);
	font-size: 13.5px;
}
body.login-layout input.ace[type="checkbox"]:checked + .lbl::before {
	color: var(--pb-on-blue);
	background-color: var(--pb-blue);
	border-color: var(--pb-blue);
}
body.login-layout input.ace[type="checkbox"]:focus + .lbl::before,
body.login-layout input.ace[type="checkbox"] + .lbl:hover::before {
	border-color: var(--pb-blue);
}

/* ---------- Primary button ---------- */
body.login-layout .widget-main input[type="submit"].btn {
	float: none !important;
	display: block;
	width: 100% !important;
	height: 50px;
	margin-top: 6px;
	border: 0 !important;
	border-radius: 11px;
	background: var(--pb-btn) !important;
	color: #FFFFFF !important;
	font-family: 'Poppins', 'Open Sans', sans-serif;
	font-size: 15.5px !important;
	letter-spacing: .02em;
	text-shadow: none !important;
	box-shadow: 0 10px 22px -10px rgba(10, 120, 192, .7);
	transition: background-color .15s, transform .15s, box-shadow .15s;
}
body.login-layout .widget-main input[type="submit"].btn:hover {
	background: var(--pb-btn-hover) !important;
	transform: translateY(-1px);
	box-shadow: 0 14px 26px -10px rgba(10, 120, 192, .8);
}
body.login-layout .widget-main input[type="submit"].btn:active {
	transform: translateY(0);
	box-shadow: 0 6px 14px -8px rgba(29, 161, 242, .8);
}
body.login-layout .widget-main input[type="submit"].btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px rgba(29, 161, 242, .35);
}

/* ---------- Links ("Lost your password?" etc.) ---------- */
body.login-layout .widget-main a {
	color: var(--pb-link);
}
body.login-layout .widget-main #login-form a.pull-right {
	float: none !important;
	display: block;
	margin-top: 16px;
	text-align: center;
	font-size: 13px;
}

/* ---------- Alerts (errors, admin warnings) ---------- */
body.login-layout .alert {
	margin: 18px 0 0;
	border: 0;
	border-radius: 11px;
	font-size: 13px;
}
body.login-layout .login-container > .alert {
	margin: 0 0 16px;
}

/* ---------- Footer, sitting on the water ---------- */
body.login-layout .main-content::after {
	content: "Need access? Email hello@paperboat.io";
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
	bottom: 4.5vh;
	z-index: 3;
	text-align: center;
	font-size: 13px;
	letter-spacing: .02em;
	color: var(--pb-on-blue);
	animation: pb-fade .8s .35s both;
}

/* ---------- A little paper boat riding the front wave ---------- */
body.login-layout .main-content::before {
	content: "";
	display: block;
	position: fixed;
	left: 14%;
	bottom: calc(19vh - 38px);
	z-index: 3;
	width: 62px;
	height: 46px;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cg fill='%23FFFFFF'%3E%3Cpath d='M32 3 L44.5 22.5 H19.5 Z'/%3E%3Cpath d='M5 25 H30 L17.5 45 Z'/%3E%3Cpath d='M34 25 H59 L46.5 45 Z'/%3E%3C/g%3E%3Cpath d='M20 45 L32 26 L44 45 Z' fill='%23E3F3FD'/%3E%3C/svg%3E") center / contain no-repeat;
	filter: drop-shadow(0 4px 4px rgba(8, 80, 140, .28));
	transform-origin: 50% 90%;
	animation: pb-sail 6s ease-in-out infinite, pb-fade .8s .5s both;
}

body.login-layout #btn-scroll-up {
	display: none !important;
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
	/* the card spans the full width here, so there's no open water for the boat */
	body.login-layout .main-content::before {
		display: none;
	}
}
@media (max-width: 480px) {
	body.login-layout .widget-box .widget-main {
		padding: 28px 22px 24px !important;
	}
	body.login-layout .login-logo::after {
		font-size: 21px;
	}
	body.login-layout .login-logo img {
		width: 72px;
		height: 72px;
	}
}
@media (max-height: 640px) {
	body.login-layout::before,
	body.login-layout::after,
	body.login-layout .main-content::before,
	body.login-layout .main-content::after {
		display: none;
	}
	body.login-layout .main-content {
		padding-bottom: 48px !important;
	}
}

/* ---------- Motion ---------- */
@keyframes pb-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}
@keyframes pb-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes pb-bob {
	0%, 100% { transform: translateY(0) rotate(-2deg); }
	50%      { transform: translateY(-6px) rotate(2deg); }
}
@keyframes pb-sail {
	0%, 100% { transform: translate(0, 0) rotate(-4deg); }
	25%      { transform: translate(6px, -4px) rotate(2deg); }
	50%      { transform: translate(12px, 0) rotate(5deg); }
	75%      { transform: translate(6px, -3px) rotate(-1deg); }
}
@keyframes pb-drift {
	from { -webkit-mask-position: 0 0, 0 29px;     mask-position: 0 0, 0 29px; }
	to   { -webkit-mask-position: 640px 0, 0 29px; mask-position: 640px 0, 0 29px; }
}
@keyframes pb-drift-back {
	from { -webkit-mask-position: 220px 0, 0 29px;  mask-position: 220px 0, 0 29px; }
	to   { -webkit-mask-position: -420px 0, 0 29px; mask-position: -420px 0, 0 29px; }
}
@media (prefers-reduced-motion: reduce) {
	body.login-layout *,
	body.login-layout::before,
	body.login-layout::after,
	body.login-layout .main-content::before,
	body.login-layout .main-content::after {
		animation: none !important;
		transition: none !important;
	}
}
