/* TBP Replace Login */

/* ── Reset ───────────────────────────────────────────────── */
body.login {
	background: #fff;
	padding: 0;
	margin: 0;
	min-height: 100vh;
}

/* ── Outer wrapper ───────────────────────────────────────── */
.tbp-login-wrap {
	display: flex;
	min-height: 100vh;
}

/* ── Cover (left, fixed) ─────────────────────────────────── */
.tbp-login-cover {
	position: fixed;
	top: 0;
	left: 0;
	width: 58%;
	height: 100%;
	background-color: #0b1521;
	background-image: var(--tbp-cover-bg);
	background-size: cover;
	background-position: center;
	overflow: hidden;
	z-index: 0;
}

/* Gradient overlay — explicitly requested */
.tbp-login-cover__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, #0b1521 0%, rgba(11, 21, 33, 0) 65%);
	z-index: 2;
}

.tbp-login-cover__logo {
	position: absolute;
	top: 36px;
	left: 40px;
	z-index: 3;
}

.tbp-login-cover__logo img {
	height: 44px;
	width: auto;
	display: block;
}

/* Illustration — sits above background, below overlay so gradient fades it */
.tbp-login-cover__illustration {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 100px 48px 120px;
	z-index: 1;
}

.tbp-login-cover__illustration img {
	width: 100%;
	max-width: 850px;
	height: auto;
	object-fit: contain;
	opacity: 0.92;
}

.tbp-login-cover__text {
	position: absolute;
	bottom: 52px;
	left: 48px;
	right: 48px;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tbp-login-cover__welcome {
	display: block;
	color: rgba(255, 255, 255, 0.65);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.tbp-login-cover__site-name {
	display: block;
	color: #fff;
	font-size: clamp(28px, 3vw, 44px);
	font-weight: 700;
	line-height: 1.15;
}

/* ── Right panel ─────────────────────────────────────────── */
.tbp-login-right {
	margin-left: 58%;
	flex: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 48px 80px;
	background: #fff;
	box-sizing: border-box;
	position: relative;
}

/* ── #login box ──────────────────────────────────────────── */
#login {
	width: 100%;
	max-width: 360px;
	padding: 0;
	margin: 0;
}

/* Hide WP logo heading */
#login h1,
#login .wp-login-logo {
	display: none;
}

/* ── Form header (my injected header) ────────────────────── */
.tbp-form-header {
	margin-bottom: 28px;
}

.tbp-form-title {
	font-size: 26px;
	font-weight: 700;
	color: #0b1521;
	margin: 0 0 6px;
	padding: 0;
	line-height: 1.2;
}

.tbp-form-subtitle {
	font-size: 14px;
	color: #8c8f94;
	margin: 0;
	padding: 0;
}

/* ── Form wrapper ────────────────────────────────────────── */
#loginform,
#registerform,
#lostpasswordform,
#resetpassform {
	background: none;
	border: none;
	box-shadow: none;
	padding: 0;
	margin: 0;
}

/* ── Field row wrappers ──────────────────────────────────── */
/* WP wraps username in <p>, password in <div.user-pass-wrap> */
#loginform > p:not(.forgetmenot):not(.submit),
#registerform > p:not(.submit),
#lostpasswordform > p:not(.submit),
#resetpassform > p:not(.submit) {
	margin: 0 0 16px;
	padding: 0;
}

/* ── Labels ──────────────────────────────────────────────── */
.login label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 6px;
	padding: 0;
}

/* ── Inputs ──────────────────────────────────────────────── */
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
	display: block;
	width: 100%;
	padding: 11px 14px;
	font-size: 14px;
	line-height: 1.5;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #f8f9fa;
	color: #1d2327;
	box-shadow: none;
	transition: border-color .15s, background .15s;
	box-sizing: border-box;
	height: auto;
	margin: 0;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
	border-color: #0b1521;
	background: #fff;
	outline: none;
	box-shadow: none;
}

/* ── Password wrapper ────────────────────────────────────── */
.login .user-pass-wrap {
	margin-bottom: 16px;
}

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

.login .wp-pwd input[type="password"],
.login .wp-pwd input[type="text"] {
	padding-right: 44px;
}

/* Eye button — anchored inside the input border */
.login .wp-hide-pw {
	position: absolute;
	right: 1px;
	top: 1px;
	bottom: 1px;
	width: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	box-shadow: none !important;
	padding: 0;
	color: #8c8f94;
	cursor: pointer;
	border-radius: 0 5px 5px 0;
	transition: color .15s;
}

.login .wp-hide-pw:hover {
	color: #0b1521;
}

.login .wp-hide-pw .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* Caps lock warning — hidden by default, JS sets display:flex when active */
.login #caps-warning {
	display: none;
	font-size: 12px;
	color: #646970;
	margin-top: 6px;
	align-items: center;
	gap: 4px;
}

/* ── Remember me ─────────────────────────────────────────── */
/* Checkbox and label are siblings inside <p class="forgetmenot"> */
p.forgetmenot {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px !important;
	padding: 0;
}

p.forgetmenot input[type="checkbox"] {
	width: 15px;
	height: 15px;
	min-width: 15px;
	margin: 0;
	cursor: pointer;
	flex-shrink: 0;
}

p.forgetmenot label {
	display: inline !important;
	font-size: 13px;
	font-weight: 400;
	color: #646970;
	margin: 0;
	cursor: pointer;
}

/* ── Submit ──────────────────────────────────────────────── */
p.submit {
	margin: 0 !important;
	padding: 0;
}

.login input[type="submit"],
.login #wp-submit {
	display: block;
	width: 100%;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	background: #0b1521;
	border: 1px solid #0b1521;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	transition: background .15s;
	height: auto;
	box-shadow: none;
	text-shadow: none;
	box-sizing: border-box;
}

.login input[type="submit"]:hover,
.login #wp-submit:hover {
	background: #1c2f48;
	border-color: #1c2f48;
}

/* ── Nav links ───────────────────────────────────────────── */
#nav,
#backtoblog {
	text-align: center;
	margin-top: 16px;
	padding: 0;
	font-size: 13px;
	color: #c3c4c7;
	line-height: 1.6;
}

#nav a,
#backtoblog a {
	font-size: 13px;
	color: #646970;
	text-decoration: none;
	transition: color .15s;
}

#nav a:hover,
#backtoblog a:hover {
	color: #0b1521;
}

#backtoblog { margin-top: 4px; }

/* ── Notices / errors ────────────────────────────────────── */
.login .message,
.login .success {
	border-left: 3px solid #0b1521;
	background: #f0f4f8;
	box-shadow: none;
	font-size: 13px;
	margin-bottom: 20px;
	padding: 10px 14px;
	border-radius: 0 4px 4px 0;
}

#login_error,
.login .notice-error {
	border-left: 3px solid #d63638;
	background: #fdf2f2;
	box-shadow: none;
	font-size: 13px;
	margin-bottom: 20px;
	padding: 10px 14px;
	border-radius: 0 4px 4px 0;
}

/* ── Language switcher (WP core, outside #login) ─────────── */
.language-switcher {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
}

.language-switcher form {
	display: flex;
	align-items: center;
	gap: 8px;
}

.language-switcher label {
	color: #8c8f94;
	margin: 0;
	cursor: pointer;
}

.language-switcher label .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #8c8f94;
}

.language-switcher select {
	font-size: 12px;
	padding: 4px 8px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #f8f9fa;
	color: #646970;
	box-shadow: none;
	height: auto;
	cursor: pointer;
}

.language-switcher .button {
	font-size: 12px !important;
	padding: 5px 10px !important;
	height: auto !important;
	min-height: 0 !important;
	line-height: 1.4 !important;
	border-radius: 4px !important;
	border: 1px solid #dcdcde !important;
	background: #f8f9fa !important;
	color: #646970 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	cursor: pointer;
}

.language-switcher .button:hover {
	background: #eef0f2 !important;
	border-color: #b5b5ba !important;
	color: #1d2327 !important;
}

/* ── WP button reset — override login.min.css defaults ──── */
.login .button:not(.wp-hide-pw),
.login .button-primary:not(.wp-hide-pw),
.login .button-secondary:not(.wp-hide-pw),
.login .button-large:not(.wp-hide-pw),
.login .button-small:not(.wp-hide-pw) {
	height: auto !important;
	min-height: 0 !important;
	line-height: 1.5 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	vertical-align: baseline;
}

/* ── Generate password button ────────────────────────────── */
.login .wp-generate-pw {
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.login .wp-generate-pw > button,
.login button.wp-generate-pw {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	background: #f8f9fa !important;
	border: 1px solid #dcdcde !important;
	border-radius: 6px !important;
	color: #1d2327 !important;
	cursor: pointer;
	width: auto !important;
	transition: background .15s, border-color .15s;
}

.login .wp-generate-pw > button:hover,
.login button.wp-generate-pw:hover {
	background: #eef0f2 !important;
	border-color: #b5b5ba !important;
}

/* ── Password strength ───────────────────────────────────── */
.login #pass-strength-result {
	width: 100%;
	box-sizing: border-box;
	font-size: 12px;
	border-radius: 4px;
	padding: 6px 10px;
	margin-top: 0;
}

/* ── Mobile logo (shown only when cover is hidden) ───────── */
.tbp-login-mobile-logo {
	display: none;
	margin-bottom: 28px;
}

.tbp-login-mobile-logo img {
	height: 40px;
	width: auto;
	display: block;
}

/* ── Responsive ──────────────────────────────────────────── */
@media ( max-width: 900px ) {
	.tbp-login-cover { display: none; }
	.tbp-login-right {
		margin-left: 0;
		padding: 48px 32px 80px;
	}
	.tbp-login-mobile-logo { display: block; }
}

@media ( max-width: 480px ) {
	.tbp-login-right { padding: 48px 20px 80px; }
}

/* ── Help widget ─────────────────────────────────────────── */
.tbp-login-help {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.tbp-login-help__toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: #0b1521;
	border: none;
	border-radius: 100px;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	transition: background .15s, box-shadow .15s;
	white-space: nowrap;
}

.tbp-login-help__toggle:hover {
	background: #1c2f48;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}

.tbp-login-help__menu {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	overflow: hidden;
	min-width: 180px;
	animation: tbp-help-in .15s ease;
	transform-origin: bottom right;
}

@keyframes tbp-help-in {
	from { opacity: 0; transform: scale(.95) translateY(4px); }
	to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.tbp-login-help__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	color: #1d2327;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: background .12s;
	border-bottom: 1px solid #f3f4f6;
}

.tbp-login-help__item:last-child {
	border-bottom: none;
}

.tbp-login-help__item:hover {
	background: #f8f9fb;
	color: #0b1521;
}

.tbp-login-help__item svg {
	flex-shrink: 0;
	color: #6b7280;
}

.tbp-login-help__item:hover svg {
	color: #0b1521;
}

/* ── Google OAuth button ─────────────────────────────────── */

/* Make the login form a flex column so we can reorder the Google
   button to appear after the submit section via CSS order. */
#loginform {
	display: flex;
	flex-direction: column;
}

.tbp-google-login {
	order: 10;
	margin-top: 16px;
	width: 100%;
	box-sizing: border-box;
}

.tbp-google-login__divider {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
	color: #9ca3af;
	margin-bottom: 14px;
}

.tbp-google-login__divider::before,
.tbp-google-login__divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}

.tbp-google-login__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 44px;
	padding: 0 16px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
	font-size: 14px;
	font-weight: 500;
	color: #1d2327;
	text-decoration: none;
	transition: background .15s, border-color .15s, box-shadow .15s;
}

.tbp-google-login__btn:hover {
	background: #f8f9fb;
	border-color: #d1d5db;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .10);
	color: #1d2327;
}

/* Error notice */
.tbp-google-error {
	margin: 0 0 16px;
	padding: 10px 14px;
	background: #fef2f2;
	border: 1px solid #fca5a5;
	border-radius: 6px;
	color: #b91c1c;
	font-size: 13px;
}

/* ── Google-only default page (password form is at /password-login/) ── */
.tbp-google-only #loginform > p,
.tbp-google-only #loginform .user-pass-wrap,
.tbp-google-only #loginform .forgetmenot,
.tbp-google-only #loginform .submit,
.tbp-google-only #nav,
.tbp-google-only .tbp-google-login__divider,
.tbp-google-only #caps-warning {
	display: none !important;
}

.tbp-google-only .tbp-google-login {
	margin-top: 0;
}

.tbp-google-login__hint {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: #646970;
	text-align: center;
}

.tbp-google-login__more,
.tbp-login-back {
	order: 11;
	margin: 20px 0 0;
	font-size: 13px;
	text-align: center;
}

.tbp-google-login__more a,
.tbp-login-back a {
	color: #646970;
	text-decoration: none;
	transition: color .15s;
}

.tbp-google-login__more a:hover,
.tbp-login-back a:hover {
	color: #0b1521;
	text-decoration: underline;
}

/* ── KUB email request (wp-login.php?action=kub-account) ── */
.tbp-kub-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tbp-kub-intro {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: #646970;
}

.tbp-kub-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.tbp-kub-field {
	margin: 0;
}

.tbp-kub-group {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tbp-kub-group[hidden] {
	display: none;
}

.login .tbp-kub-form select,
.login .tbp-kub-form textarea,
.login .tbp-kub-form input[type="tel"] {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 11px 14px;
	font-size: 14px;
	line-height: 1.5;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background-color: #f8f9fa;
	color: #1d2327;
	box-shadow: none;
	box-sizing: border-box;
	min-height: 46px;
	margin: 0;
}

.login .tbp-kub-form textarea {
	resize: vertical;
}

.login .tbp-kub-form select:focus,
.login .tbp-kub-form textarea:focus,
.login .tbp-kub-form input[type="tel"]:focus {
	border-color: #0b1521;
	background-color: #fff;
	outline: none;
}

.tbp-kub-type {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	margin: 0;
	padding: 0;
	border: 0;
}

.tbp-kub-type legend {
	float: left;
	margin: 0 6px 0 0;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
}

.login .tbp-kub-type label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-weight: 400;
}

.tbp-kub-notes {
	margin: 0 0 4px;
	padding: 12px 14px 12px 30px;
	border-radius: 6px;
	background: #f0f4f8;
	font-size: 13px;
	line-height: 1.5;
	color: #1d2327;
}

.tbp-kub-notes li + li {
	margin-top: 4px;
}

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.tbp-kub-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 480px) {
	.tbp-kub-grid {
		grid-template-columns: 1fr;
	}
}

/* Request page: wider column, no WordPress form box. */
.login-action-kub-account #login {
	width: 100%;
	max-width: 560px;
}

.login .tbp-kub-form {
	background: none;
	border: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
}

.login .tbp-kub-form input[type="submit"] {
	min-height: 46px;
	padding: 12px 20px;
	font-size: 15px;
	line-height: 1.4;
}
