/* Bua Innlogging – kveldsdesign for wp-login.php */

:root {
	--bua-accent: #9c4532;
	--bua-accent-dark: #7c3325;
	--bua-ink: #2b2622;
	--bua-label: #4a423a;
	--bua-muted: #6b6259;
	--bua-svak: #8a8075;
	--bua-cream: #faf7f1;
	--bua-border: #d9cfc2;
}

html {
	background: #132638;
}

body.login {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	background: #132638 url(scene.svg) no-repeat left center / cover;
	font-family: 'Karla', sans-serif;
	display: flex;
	justify-content: flex-end;
	align-items: stretch;
}

/* ---------- Panelet til høyre ---------- */

#login {
	width: min(480px, 100%);
	margin: 0;
	padding: 48px 52px;
	box-sizing: border-box;
	background: var(--bua-cream);
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100vh;
	box-shadow: -12px 0 40px rgba(10, 22, 32, 0.35);
}

/* ---------- Logo ---------- */

.login h1 a,
.login .wp-login-logo a {
	background-image: url(logo.svg);
	background-size: 52px 46px;
	background-position: center;
	width: 52px;
	height: 46px;
	margin: 0 auto 4px;
	outline-offset: 4px;
}

/* ---------- Velkomstmelding ---------- */

.bua-welcome {
	text-align: center;
	margin: 14px 0 4px;
}

.bua-welcome h2 {
	font-family: 'Fraunces', serif;
	font-size: 32px;
	font-weight: 600;
	color: var(--bua-ink);
	margin: 0 0 8px;
	line-height: 1.15;
}

.bua-welcome p {
	font-size: 16px;
	color: var(--bua-muted);
	margin: 0;
}

/* ---------- Skjemaet ---------- */

.login form {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	margin-top: 20px;
	overflow: visible;
}

.login form label {
	font-size: 14px;
	font-weight: 600;
	color: var(--bua-label);
}

.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
	background: #ffffff;
	border: 1.5px solid var(--bua-border);
	border-radius: 12px;
	font-family: 'Karla', sans-serif;
	font-size: 16px;
	color: var(--bua-ink);
	padding: 11px 16px;
	margin: 8px 0 18px;
	box-shadow: none;
	min-height: 50px;
	box-sizing: border-box;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
	border-color: var(--bua-accent);
	box-shadow: 0 0 0 3px rgba(156, 69, 50, 0.15);
	outline: none;
}

/* Vis/skjul passord-knappen */
.login .wp-pwd {
	position: relative;
}

.login .wp-hide-pw {
	color: var(--bua-muted);
	margin-top: -4px;
}

.login .wp-hide-pw:focus {
	box-shadow: 0 0 0 2px rgba(156, 69, 50, 0.3);
	border-radius: 8px;
}

/* Husk meg */
.login .forgetmenot {
	margin-bottom: 18px;
	float: none;
	display: flex;
	align-items: center;
	gap: 4px;
}

.login .forgetmenot label {
	font-size: 14.5px;
	font-weight: 400;
	color: var(--bua-label);
}

.login input[type="checkbox"] {
	border: 1.5px solid var(--bua-border);
	border-radius: 5px;
	width: 18px;
	height: 18px;
	box-shadow: none;
}

.login input[type="checkbox"]:focus {
	border-color: var(--bua-accent);
	box-shadow: 0 0 0 2px rgba(156, 69, 50, 0.2);
}

.login input[type="checkbox"]:checked {
	border-color: var(--bua-accent);
}

.login input[type="checkbox"]:checked::before {
	content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%239c4532%27%2F%3E%3C%2Fsvg%3E");
}

/* Logg inn-knappen */
.login .submit {
	margin: 0;
}

.wp-core-ui .login .button-primary {
	width: 100%;
	float: none;
	height: 52px;
	background: var(--bua-accent);
	border: none;
	border-radius: 12px;
	font-family: 'Karla', sans-serif;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-shadow: none;
	box-shadow: none;
	transition: background 0.15s ease;
}

.wp-core-ui .login .button-primary:hover,
.wp-core-ui .login .button-primary:active {
	background: var(--bua-accent-dark);
}

.wp-core-ui .login .button-primary:focus {
	background: var(--bua-accent-dark);
	box-shadow: 0 0 0 3px rgba(156, 69, 50, 0.3);
}

/* ---------- Lenker og navigasjon ---------- */

.login #nav {
	padding: 0;
	margin: 22px 0 0;
	text-align: center;
	font-size: 14.5px;
}

.login #nav a {
	color: var(--bua-accent);
	font-weight: 600;
	text-decoration: none;
}

.login #nav a:hover,
.login #backtoblog a:hover {
	color: var(--bua-accent-dark);
	text-decoration: underline;
}

/* «Tilbake til …»-lenken vekk – Bua-panelet skal være rent */
.login #backtoblog {
	display: none;
}

.login .privacy-policy-page-link {
	margin: 14px 0 0;
	text-align: center;
	font-size: 13px;
}

.login .privacy-policy-page-link a {
	color: var(--bua-svak);
}

/* Språkvelger (skjules også via filter) */
.login .language-switcher {
	display: none;
}

/* Fottekst i panelet */
#login::after {
	content: "Bua er bare for oss – har du havnet her ved en feil, finner du ingenting spennende.";
	display: block;
	margin-top: 28px;
	font-size: 13px;
	color: var(--bua-svak);
	text-align: center;
	line-height: 1.5;
}

/* ---------- Meldinger og feil ---------- */

.login #login_error,
.login .notice-error {
	background: #fdf3ef;
	border: 1.5px solid #e5b8a8;
	border-left-width: 1.5px;
	border-radius: 12px;
	box-shadow: none;
	color: var(--bua-ink);
	padding: 14px 16px;
	margin: 16px 0 0;
	font-size: 14.5px;
	line-height: 1.5;
}

.login .message,
.login .success,
.login .notice-info,
.login .notice-success {
	background: #f2f7f3;
	border: 1.5px solid #cfe0d5;
	border-left-width: 1.5px;
	border-radius: 12px;
	box-shadow: none;
	color: var(--bua-ink);
	padding: 14px 16px;
	margin: 16px 0 0;
	font-size: 14.5px;
	line-height: 1.5;
}

.login #login_error a,
.login .message a {
	color: var(--bua-accent);
	font-weight: 600;
}

/* ---------- «Bua» over illustrasjonen ---------- */

.bua-hero {
	position: absolute;
	left: 56px;
	bottom: 52px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	pointer-events: none;
	user-select: none;
}

.bua-hero-navn {
	font-family: 'Fraunces', serif;
	font-size: 64px;
	font-weight: 700;
	color: #f7efe2;
	line-height: 1;
}

.bua-hero-slagord {
	font-size: 18px;
	color: #e3d6c2;
	letter-spacing: 0.01em;
}

/* ---------- Mobil ---------- */

@media (max-width: 900px) {
	body.login {
		flex-direction: column;
		justify-content: flex-end;
		background-position: top center;
		background-size: auto 54vh;
	}

	#login {
		width: 100%;
		min-height: auto;
		margin-top: 44vh;
		border-radius: 24px 24px 0 0;
		padding: 32px 24px 36px;
		box-shadow: 0 -10px 30px rgba(10, 22, 32, 0.35);
	}

	.bua-hero {
		left: 28px;
		bottom: auto;
		top: calc(44vh - 108px);
	}

	.bua-hero-navn {
		font-size: 40px;
	}

	.bua-hero-slagord {
		font-size: 14px;
	}
}

/* ---------- Interim-innlogging (popup ved utløpt økt) ---------- */

.interim-login.login {
	display: block;
	background: var(--bua-cream);
}

.interim-login #login {
	min-height: auto;
	width: 100%;
	margin: 0 auto;
	padding: 24px;
	box-shadow: none;
}

.interim-login .bua-hero {
	display: none;
}
