/* Popeye 3.0 — the login screen, in the same look as the backend:
   light grey surface, the Popeye wordmark, white rounded card, dark button, small sans-serif type. */

body.login.p3-login {
	-webkit-font-smoothing: antialiased;
	background: #f1f1f1;
	color: #3e3e3e;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 13px;
	letter-spacing: 0.01em;
}

/* The form stands in the vertical middle of the screen; the wordmark sits centred at the bottom. */
body.login.p3-login {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: auto;
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 32px 0 156px;
	position: relative;
}

body.login.p3-login #login {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: 100%;
	padding: 0;
	width: 348px;
}

/* The WordPress logo makes room for the Popeye wordmark. */
body.login.p3-login #login > h1,
body.login.p3-login .wp-login-logo {
	display: none;
}

body.login.p3-login .p3-login-logo {
	bottom: 72px;
	color: #3e3e3e;
	display: block;
	left: 50%;
	margin: 0;
	outline-offset: 6px;
	position: absolute;
	text-decoration: none;
	transform: translateX(-50%);
	width: 150px;
}

body.login.p3-login .p3-login-logo svg,
body.login.p3-login .p3-login-logo img {
	display: block;
	height: auto;
	width: 100%;
}

/* The card */
body.login.p3-login #login form {
	background: #fff;
	border: 0;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	margin: 0;
	overflow: visible;
	padding: 28px 28px 30px;
}

body.login.p3-login #login form p {
	margin-bottom: 0;
}

body.login.p3-login label {
	color: #6e6e6e;
	display: inline-block;
	font-size: 12px;
	letter-spacing: 0.03em;
	margin-bottom: 7px;
}

/* Fields: white, rounded like the search field in the sidebar */
body.login.p3-login #login form .input,
body.login.p3-login #login form input[type="text"],
body.login.p3-login #login form input[type="password"],
body.login.p3-login #login form input[type="email"],
body.login.p3-login #login form input[type="number"],
body.login.p3-login #login form input[type="tel"] {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-shadow: none;
	box-sizing: border-box;
	color: #3e3e3e;
	font-family: inherit;
	font-size: 14px;
	height: 42px;
	line-height: normal;
	margin: 0 0 18px;
	min-height: 42px;
	padding: 0 12px;
	width: 100%;
}

body.login.p3-login #login form input:focus {
	border-color: #3e3e3e;
	box-shadow: 0 0 0 1px #3e3e3e;
	outline: 0;
}

body.login.p3-login .wp-pwd {
	position: relative;
}

body.login.p3-login .wp-pwd .button.wp-hide-pw {
	background: transparent;
	border: 0;
	box-shadow: none;
	align-items: center;
	color: #6e6e6e;
	display: flex;
	height: 42px;
	justify-content: center;
	line-height: 1;
	margin: 0 !important;
	min-height: 42px;
	padding: 0;
	right: 0;
	top: 0;
	width: 42px;
}

body.login.p3-login .wp-pwd .button.wp-hide-pw:hover,
body.login.p3-login .wp-pwd .button.wp-hide-pw:focus {
	background: transparent;
	border: 0;
	box-shadow: none;
	color: #000;
	outline: 0;
}

/* Show/hide password: a thin padlock instead of the eye. Closed = hidden, open = visible. */
body.login.p3-login .wp-pwd .button.wp-hide-pw .dashicons {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z'/%3E%3Cpath d='M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0'/%3E%3Cpath d='M8 11v-4a4 4 0 1 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
	background-color: currentColor;
	font-size: 0;
	height: 18px;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z'/%3E%3Cpath d='M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0'/%3E%3Cpath d='M8 11v-4a4 4 0 1 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
	top: 0;
	width: 18px;
}

body.login.p3-login .wp-pwd .button.wp-hide-pw .dashicons::before {
	content: none;
}

body.login.p3-login .wp-pwd .button.wp-hide-pw .dashicons.dashicons-hidden {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z'/%3E%3Cpath d='M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0'/%3E%3Cpath d='M8 11v-5a4 4 0 0 1 8 0'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z'/%3E%3Cpath d='M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0'/%3E%3Cpath d='M8 11v-5a4 4 0 0 1 8 0'/%3E%3C/svg%3E");
}

/* Remember me above a full-width button */
body.login.p3-login .forgetmenot {
	align-items: center;
	display: flex;
	float: none;
	gap: 8px;
	margin: 0 0 20px;
}

/* Same type as the labels above the fields */
body.login.p3-login .forgetmenot label {
	color: #6e6e6e;
	font-size: 12px;
	letter-spacing: 0.03em;
	margin: 0;
}

body.login.p3-login input[type="checkbox"] {
	accent-color: #3e3e3e;
	border: 1px solid #cfcfcf;
	border-radius: 4px;
	box-shadow: none;
	height: 16px;
	margin: 0;
	min-height: 16px;
	min-width: 16px;
	width: 16px;
}

body.login.p3-login input[type="checkbox"]:checked {
	background: #3e3e3e;
	border-color: #3e3e3e;
}

body.login.p3-login input[type="checkbox"]:checked::before {
	background: none;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	content: "";
	display: block;
	height: 8px;
	margin: 1px 0 0 5px;
	transform: rotate(45deg);
	width: 4px;
}

body.login.p3-login input[type="checkbox"]:focus {
	border-color: #3e3e3e;
	box-shadow: 0 0 0 1px #3e3e3e;
}

body.login.p3-login #login form p.submit {
	float: none;
	margin: 0;
	padding: 0;
}

body.login.p3-login #login .button-primary,
body.login.p3-login #login .button.button-large,
body.login.p3-login #login .button.button-primary.button-large {
	align-items: center;
	background: #3e3e3e;
	border: 1px solid #3e3e3e;
	border-radius: 8px;
	box-shadow: none;
	box-sizing: border-box;
	color: #fff;
	display: flex;
	float: none;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	height: 42px;
	justify-content: center;
	letter-spacing: 0.02em;
	line-height: normal;
	margin: 0;
	min-height: 42px;
	padding: 0 16px;
	text-shadow: none;
	width: 100%;
}

body.login.p3-login #login .button-primary:hover,
body.login.p3-login #login .button-primary:focus {
	background: #2a2a2a;
	border-color: #2a2a2a;
	box-shadow: none;
	color: #fff;
	outline: 0;
}

body.login.p3-login #login .button-primary:focus-visible {
	box-shadow: 0 0 0 2px #f1f1f1, 0 0 0 4px #3e3e3e;
}

/* The secondary button on the "generate password" screens */
body.login.p3-login #login .button:not(.button-primary):not(.wp-hide-pw) {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-shadow: none;
	color: #3e3e3e;
	font-family: inherit;
	font-size: 12.5px;
	min-height: 34px;
	text-shadow: none;
}

/* Links under the card: small, never blue */
body.login.p3-login #nav,
body.login.p3-login #backtoblog {
	font-size: 9px;
	letter-spacing: 0.03em;
	margin: 16px 0 0;
	text-transform: uppercase;
	opacity: 0.5;
	transition: opacity 0.15s ease;
	padding: 0;
	text-align: center;
}

/* The "Go to <site>" link is not shown: the wordmark at the bottom already leads to the site. */
body.login.p3-login #backtoblog {
	display: none;
}

body.login.p3-login a,
body.login.p3-login #nav a,
body.login.p3-login #backtoblog a,
body.login.p3-login .privacy-policy-page-link a {
	color: #6e6e6e;
	text-decoration: none;
}

body.login.p3-login a:hover,
body.login.p3-login a:focus,
body.login.p3-login #nav a:hover,
body.login.p3-login #backtoblog a:hover {
	box-shadow: none;
	color: #000;
	outline: 0;
	text-decoration: underline;
	text-decoration-color: currentColor;
}

body.login.p3-login .privacy-policy-page-link {
	font-size: 12px;
	margin: 22px 0 0;
}

/* Messages: a white rounded note with a thin bar, no WordPress blue */
body.login.p3-login #login .message,
body.login.p3-login #login .notice,
body.login.p3-login #login .success,
body.login.p3-login #login #login_error {
	background: #fff;
	border: 0;
	border-left: 0;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	color: #3e3e3e;
	font-size: 12.5px;
	line-height: 1.5;
	margin: 0 0 14px;
	padding: 12px 14px;
}

body.login.p3-login #login #login_error,
body.login.p3-login #login .notice-error {
	border-left: 3px solid #a4281e;
}

body.login.p3-login #login .message a,
body.login.p3-login #login .notice a,
body.login.p3-login #login #login_error a {
	color: #3e3e3e;
	text-decoration: underline;
}

body.login.p3-login #login .message p,
body.login.p3-login #login .notice p {
	margin: 0;
}

/* Password strength and hints */
body.login.p3-login #pass-strength-result {
	border: 0;
	border-radius: 8px;
	font-size: 12px;
	margin: -8px 0 16px;
	opacity: 1;
	padding: 8px 12px;
}

body.login.p3-login .description,
body.login.p3-login .indicator-hint,
body.login.p3-login #reg_passmail {
	color: #6e6e6e;
	font-size: 12px;
	line-height: 1.5;
}

/* Language switcher */
body.login.p3-login .language-switcher {
	margin: 24px auto 0;
	padding: 0;
}

body.login.p3-login .language-switcher form,
body.login.p3-login #login + .language-switcher form {
	background: transparent;
	box-shadow: none;
	padding: 0;
}

body.login.p3-login .language-switcher select,
body.login.p3-login .language-switcher .button {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-shadow: none;
	color: #3e3e3e;
	font-family: inherit;
	font-size: 12px;
	min-height: 32px;
}

body.login.p3-login .language-switcher label .dashicons {
	color: #6e6e6e;
}

/* The pop-up that asks to log in again when a session has expired */
body.login.p3-login.interim-login {
	min-height: 0;
	padding: 24px 0 84px;
}

body.login.p3-login.interim-login .p3-login-logo {
	bottom: 24px;
	width: 108px;
}

@media (max-width: 400px) {
	body.login.p3-login #login {
		padding: 0 20px;
		width: 100%;
	}

	body.login.p3-login #login form {
		padding: 24px 20px 26px;
	}
}

body.login.p3-login #nav:hover,
body.login.p3-login #nav:focus-within {
	opacity: 1;
}

/* No help question mark after "Remember me" (newer WordPress versions add one). */
body.login.p3-login .forgetmenot .wp-tooltip {
	display: none;
}

/* On a phone, text in a field smaller than 16px makes iOS zoom in on the page as soon as the field
   is tapped. With 16px the screen stays as it is. */
@media (max-width: 782px), (pointer: coarse) {
	body.login.p3-login #login form .input,
	body.login.p3-login #login form input[type="text"],
	body.login.p3-login #login form input[type="password"],
	body.login.p3-login #login form input[type="email"],
	body.login.p3-login #login form input[type="number"],
	body.login.p3-login #login form input[type="tel"],
	body.login.p3-login select {
		font-size: 16px;
	}
}

/* Phones: the screen is exactly as tall as the visible area (100dvh above), so it does not scroll or bounce. */
html:has(> body.login.p3-login) {
	height: auto;
	min-height: 0;
	overscroll-behavior: none;
}

/* Login screen: a note (such as "You are now logged out") floats above the form, so the form
   stands where it always stands, and fades away after 3 seconds. Errors stay.
   No offsets: the note keeps its place in the page and is only lifted by its own height. */
body.login.p3-login.login-action-login #login .message,
body.login.p3-login.login-action-login #login .success,
body.login.p3-login.login-action-login #login .notice:not(.notice-error) {
	animation: p3-login-note-out 0.4s ease 3s forwards;
	box-sizing: border-box;
	margin: 0;
	position: absolute;
	transform: translateY(calc(-100% - 14px));
	width: 348px;
}

@media (max-width: 400px) {
	body.login.p3-login.login-action-login #login .message,
	body.login.p3-login.login-action-login #login .success,
	body.login.p3-login.login-action-login #login .notice:not(.notice-error) {
		width: calc(100vw - 40px);
	}
}

@keyframes p3-login-note-out {
	to {
		opacity: 0;
		visibility: hidden;
	}
}

/* Lost password: no instruction note above the form. Errors stay. */
body.login.p3-login.login-action-lostpassword #login .message,
body.login.p3-login.login-action-lostpassword #login .notice:not(.notice-error) {
	display: none;
}

/* Other plugins (login security, Branda) may position #login themselves; the wordmark is placed
   against the page, not against the form, so #login must stay unpositioned. */
body.login.p3-login #login {
	position: static !important;
	transform: none !important;
}

/* Background layers of other login plugins (Ultimate Dashboard, Branda) lie over the links
   below the form and make them flicker; this screen has its own plain background. */
body.login.p3-login .udb-bg-overlay,
body.login.p3-login .branda-background-mask {
	display: none !important;
}

/* Autofill: the browser's yellow (Safari) or blue (Chrome) field colour fades to white after 1 second.
   That colour cannot be set directly; a white inset shadow lies over it. */
body.login.p3-login #login form input:-webkit-autofill {
	-webkit-text-fill-color: #3e3e3e;
	animation: p3-login-autofill 0.6s ease 1s forwards;
}

@keyframes p3-login-autofill {
	from {
		box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0);
	}

	to {
		box-shadow: inset 0 0 0 100px #fff;
	}
}

/* The password (dots or text) stops before the padlock: the button is 42px wide with the padlock
   in its middle, so the free space left of the padlock equals the space right of it. */
body.login.p3-login #login form .wp-pwd input[type="password"],
body.login.p3-login #login form .wp-pwd input[type="text"],
body.login.p3-login #login form .wp-pwd .input {
	padding-right: 41px;
}

/* Remember me: a small switch instead of a tick box. Track 28x15, knob 11px with 2px of room around it (whole pixels). The knob is centred by the browser (top/bottom 0 + auto margin) and anchored to the right edge when on, so the room around it stays equal on every screen. */
body.login.p3-login #login input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	background: #cfcfcf;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
	flex: 0 0 28px;
	max-width: none;
	padding: 0;
	height: 15px;
	min-height: 15px;
	min-width: 28px;
	position: relative;
	transition: background-color 0.15s ease;
	vertical-align: middle;
	width: 28px;
}

body.login.p3-login #login input[type="checkbox"]::before,
body.login.p3-login #login input[type="checkbox"]:checked::before {
	background: #fff;
	border: 0;
	border-radius: 50%;
	content: "";
	display: block;
	float: none;
	height: 11px;
	bottom: 0;
	left: 2px;
	margin: auto 0;
	position: absolute;
	top: 0;
	transform: none;
	transition: left 0.15s ease;
	width: 11px;
}

body.login.p3-login #login input[type="checkbox"]:checked {
	background: #3e3e3e;
}

body.login.p3-login #login input[type="checkbox"]:checked::before {
	left: calc(100% - 13px);
}

body.login.p3-login #login input[type="checkbox"]:focus {
	box-shadow: none;
	outline: 0;
}

body.login.p3-login #login input[type="checkbox"]:focus-visible {
	box-shadow: 0 0 0 2px #f1f1f1, 0 0 0 3px #3e3e3e;
}

/* Login form: the password box itself is the white field and the input inside it stops before the
   padlock. Text, dots and the caret (iOS draws the caret past a padding) can then never reach the
   padlock; the free space left of the padlock equals the space right of it. */
body.login.p3-login.login-action-login #login form .wp-pwd {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-sizing: border-box;
	height: 42px;
	margin: 0 0 18px;
	overflow: hidden;
	position: relative;
}

body.login.p3-login.login-action-login #login form .wp-pwd:focus-within {
	border-color: #3e3e3e;
	box-shadow: 0 0 0 1px #3e3e3e;
}

body.login.p3-login.login-action-login #login form .wp-pwd input[type="password"],
body.login.p3-login.login-action-login #login form .wp-pwd input[type="text"],
body.login.p3-login.login-action-login #login form .wp-pwd .input {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	display: block;
	height: 40px;
	margin: 0;
	min-height: 40px;
	padding: 0 0 0 12px;
	width: calc(100% - 43px);
}

body.login.p3-login.login-action-login #login form .wp-pwd input:focus {
	border: 0;
	box-shadow: none;
}

body.login.p3-login.login-action-login #login form .wp-pwd .button.wp-hide-pw {
	height: 40px;
	min-height: 40px;
}

/* The room below the Remember me switch (to the button) equals the room above it (to the password field). */
body.login.p3-login #login form .forgetmenot {
	margin: 0 0 18px;
}

/* No grey flash on touch screens when a field, the switch, the padlock or a link is tapped. */
body.login.p3-login,
body.login.p3-login * {
	-webkit-tap-highlight-color: transparent;
}

body.login.p3-login .wp-pwd .button.wp-hide-pw:active,
body.login.p3-login .forgetmenot label:active,
body.login.p3-login #login input[type="checkbox"]:active {
	background-color: transparent;
	box-shadow: none;
	outline: 0;
}

body.login.p3-login #login input[type="checkbox"]:active {
	background-color: #cfcfcf;
}

body.login.p3-login #login input[type="checkbox"]:checked:active {
	background-color: #3e3e3e;
}
