/* wipress-3: login and registration of the WiPress newspapers (Dialogo, L'Ogliastra, Libertà): the same dark page as
   the edition app screens (editions/public/app.css). The accent is the account's main color, set inline on .wp-login
   as --brand / --brand-deep by page-users_login.php. Scoped to .wp-login so it never touches the rest of the site. */
.wp-login-body { margin: 0; background: #1f2429; }
.wp-login {
	--bg: #1f2429; --sf: #2a3036; --ln: #3a434c; --ink: #eef2f6; --muted: #9aa8b5; --bt: color-mix(in srgb, var(--brand) 50%, #fff);
	min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; color: var(--ink); color-scheme: dark;
	background: var(--bg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.45;
}
.wp-login *, .wp-login *::before, .wp-login *::after { box-sizing: border-box; }

.wp-bar {
	flex: none; display: flex; align-items: center; gap: 2px; background: var(--bg);
	padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 max(4px, env(safe-area-inset-left, 0px));
	min-height: calc(52px + env(safe-area-inset-top, 0px));
}
.wp-back { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; color: var(--ink); text-decoration: none; }
.wp-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 20px/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.01em; }
.wp-login a:focus-visible, .wp-login button:focus-visible, .wp-login input:focus-visible, .wp-login select:focus-visible { outline: 2px solid var(--bt); outline-offset: 2px; }

.wp-card { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 8px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.wp-lead { margin: 0 0 18px; color: var(--muted); }

.wp-login .form-group, .wp-field { margin: 0 0 14px; }
.wp-login .wp-label { display: block; margin: 0 0 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.wp-login input[type=text], .wp-login input[type=email], .wp-login input[type=password], .wp-login input.form-control, .wp-login select.form-control {
	display: block; width: 100%; height: 46px; padding: 0 12px; border: 1.5px solid var(--ln); border-radius: 6px;
	background: var(--sf); color: var(--ink); font: inherit; font-size: 16px;
}
.wp-login input[type=text]:focus, .wp-login input[type=email]:focus, .wp-login input[type=password]:focus, .wp-login select.form-control:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }
.wp-login input::placeholder { color: var(--muted); }
.wp-login input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--sf) inset; -webkit-text-fill-color: var(--ink); }

.wp-login .btn, .wp-login button.btn {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; padding: 0 16px; margin: 0;
	border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
}
.wp-login .btn:hover { background: var(--brand-deep); color: #fff; }
.wp-login .btn.wp-ghost { background: transparent; color: var(--bt); box-shadow: inset 0 0 0 1.5px var(--brand); }
.wp-login .btn.wp-ghost:hover { background: color-mix(in srgb, var(--brand) 16%, var(--bg)); color: var(--bt); }
.wp-login .btn:disabled, .wp-login .btn[disabled] { opacity: .6; cursor: default; }
/* Text link in a sentence (Resend): square, no padding, so the label sits on the baseline of the words around it */
.wp-login .btn.btn-link, .wp-login button.btn.btn-link {
	display: inline; width: auto; height: auto; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0 !important; box-shadow: none; background: none; overflow: visible;
	color: var(--bt); font-size: inherit; font-weight: 600; line-height: inherit; vertical-align: baseline; text-decoration: underline; text-underline-offset: 2px;
}
.wp-login .btn.btn-link:hover { background: none; color: var(--bt); }

.wp-alt { margin-top: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.wp-alt a:not(.btn) { color: var(--bt); }
.wp-alt .btn { margin-top: 10px; }

.wp-login .alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 6px; font-size: 14px; border: 0; }
.wp-login .alert-danger { background: #51231e; color: #f3b3ab; }
.wp-login .alert-warning { background: #4d3a14; color: #f0cd86; }
.wp-login .alert .notice { margin-top: 2px; }

/* code step: six boxes; ids, data-otp-index and #auth_otp are what asyncform.js hooks into */
.wp-login .otp-digits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 4px 0 10px; }
.wp-login .otp-digits .otp-digit {
	width: 100%; min-width: 0; height: 54px; padding: 0; text-align: center; font: 700 24px/1 Georgia, "Times New Roman", serif;
	border: 1.5px solid var(--ln); border-radius: 6px; background: var(--sf); color: var(--ink);
}
.wp-login .otp-digits .otp-digit:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }
.wp-validity { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.wp-remember { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; font-size: 14px; }
.wp-remember input { flex: none; width: 18px; height: 18px; accent-color: var(--brand); }
.wp-otp-actions { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-top: 16px; font-size: 14px; }
.wp-otp-actions > span { color: var(--muted); }
.wp-otp-actions a { color: var(--bt); font-weight: 600; text-decoration: none; }
.wp-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

/* registration */
.wp-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.wp-row.thirds { grid-template-columns: 1fr 1.6fr 1fr; }
.wp-choice { display: flex; gap: 8px; }
.wp-choice label { flex: 1; margin: 0; }
.wp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.wp-choice span { display: flex; align-items: center; justify-content: center; height: 46px; border: 1.5px solid var(--ln); border-radius: 6px; background: var(--sf); cursor: pointer; font-size: 15px; }
.wp-choice input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, var(--bg)); }
.wp-choice input:focus-visible + span { outline: 2px solid var(--bt); outline-offset: 2px; }
.wp-login .wp-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; color: var(--ink); }
.wp-check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.wp-check a { color: var(--bt); }
@media (max-width: 380px) { .wp-row.thirds { grid-template-columns: 1fr 1fr; } .wp-row.thirds > div:nth-child(2) { grid-column: span 2; order: 3; } }
