/* ============================================================ *
 * YALARI LOGIN SCREEN — brand-aligned with the Raisely donation-
 * form stylesheet, so wp-login.php reads as the same site as the
 * donation flow rather than default WordPress chrome.
 *
 * Design tokens lifted from that stylesheet:
 *   $primaryColor:   #A51C30  (Site Red)
 *   $secondaryColor: #A8545D  (Brand Rose)
 *   $formBg:         #F7F5F3
 *   $formSurface:    #FFFFFF
 *   $formBorder:     #D6D0CA
 *   $textBody:       #2C2624
 *   Fonts: 'DM Sans' (body/buttons), 'DM Serif Display' (headline)
 *   Pills, box-shadow, hover-lift on primary actions.
 *
 * Fonts are enqueued in functions.php (login_enqueue_scripts),
 * not @import'd here, so they don't block CSS parsing.
 *
 * Server path: wp-content/themes/astra-child/css/custom-login.css
 * Yalari revision: 1.1.0 (2026-10-21)
 *
 * Revision 1.1.0 (2026-10-21, with functions.php 1.0.27): this file never
 * loaded before (functions.php pointed at the theme root, not css/), so
 * this is the first time it is live. Fixes made while auditing it:
 *   - logo path is now ../logo.svg (the logo sits in the theme root);
 *   - field borders #D6D0CA (1.5:1) -> #8a7f72 (3.9:1), WCAG 1.4.11;
 *   - placeholder #8c8578 (3.7:1) -> #6e675d (5.6:1), WCAG 1.4.3;
 *   - checkbox 20px -> 24px (WCAG 2.5.8);
 *   - visible keyboard focus on the checkbox, show-password button, Sign in
 *     button and links (WCAG 2.4.7);
 *   - link selectors made specific enough to beat WordPress core, so the
 *     Brand Rose colour (4.7:1 on the page) actually applies.
 * ============================================================ */

:root {
	--login-accent: #A51C30;        /* Site Red */
	--login-accent-dark: #8B1728;   /* hover */
	--login-accent-active: #751321; /* active */
	--login-secondary: #A8545D;     /* Brand Rose */
	--login-text: #2C2624;
	--login-bg: #F7F5F3;
	--login-surface: #FFFFFF;
	--login-border: #D6D0CA;        /* card edge only (decorative) */
	--login-field-border: #8a7f72;  /* field edges: 3.9:1 on white */
}

body.login {
	background: var(--login-bg);
}

/* ------------------------------------------------ */
/* LOGO
   Replace WordPress's own logo with the Yalari child-theme logo.
   Place the SVG file at child-theme-root/logo.svg (same folder as this
   file and style.css) — the relative url() below resolves from here,
   no PHP needed. If you use a different filename, change it below.

   Logo is a 64x64 square SVG, sized up here at 2x (128px) since it's
   vector and scales cleanly with no blur. */
#login h1 a {
	background-image: url('../logo.svg'); /* this file is in css/, the logo in the theme root */
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	width: 128px;
	height: 128px;
	margin-bottom: 16px;
}

/* ------------------------------------------------ */
/* FORM CARD
   Raisely's donation-form surface treatment: warm off-white page,
   white rounded card, soft border and shadow instead of WordPress's
   flat grey box. */
#loginform {
	background: var(--login-surface) !important;
	border: 1px solid var(--login-border) !important;
	border-radius: 14px !important;
	box-shadow: 0 4px 16px rgba(44, 38, 36, 0.08) !important;
	padding: 26px 24px 20px !important;
}

.login-instructions {
	font-family: 'DM Serif Display', serif;
	color: var(--login-text);
	text-align: center;
	font-size: 18px;
	line-height: 1.4;
	margin: 0 0 20px;
}

#loginform label {
	font-family: 'DM Sans', sans-serif;
	color: var(--login-text);
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}

#loginform input[type="text"],
#loginform input[type="password"] {
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;        /* stops iOS Safari auto-zooming on focus */
	padding: 12px;
	min-height: 44px;       /* WCAG 2.5.5 touch target */
	border-radius: 8px;
	border: 1.5px solid var(--login-field-border);
	width: 100%;
	transition: border-color 0.15s ease, outline-color 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
	#loginform input[type="text"],
	#loginform input[type="password"] {
		transition: none;
	}
}

/* Solid, opaque focus outline: survives Windows High Contrast Mode,
   unlike a box-shadow-only ring, and meets 1.4.11 Non-text Contrast. */
#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus {
	border-color: var(--login-accent-dark);
	outline: 3px solid var(--login-accent);
	outline-offset: 1px;
}

#loginform input::placeholder {
	color: #6e675d;
}

.wp-pwd {
	display: flex;
	align-items: center;
}
.wp-pwd .button.wp-hide-pw {
	min-width: 44px;
	min-height: 44px;
}

.forgetmenot {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 16px 0;
}
.forgetmenot input[type="checkbox"] {
	width: 24px;
	height: 24px;
	margin: 0;
	accent-color: var(--login-accent);
}
.forgetmenot label {
	font-family: 'DM Sans', sans-serif;
	font-size: 14px;
	cursor: pointer;
}

/* ------------------------------------------------ */
/* PRIMARY BUTTON
   Matches the Raisely donation form's Tier-1 pill CTA: full-width,
   pill radius, bold DM Sans, box-shadow, hover-lift. */
.wp-core-ui .button-primary {
	width: 100%;
	min-height: 46px;
	padding: 14px 24px;
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	font-weight: 700;
	text-shadow: none;
	border: none;
	border-radius: 50px;
	background: var(--login-accent);
	box-shadow: 0 2px 6px rgba(165, 28, 48, 0.18);
	transition: all 0.15s ease;
}
.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus {
	background: var(--login-accent-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(165, 28, 48, 0.24);
}
.wp-core-ui .button-primary:active {
	background: var(--login-accent-active);
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.wp-core-ui .button-primary {
		transition: none;
	}
	.wp-core-ui .button-primary:hover,
	.wp-core-ui .button-primary:focus {
		transform: none;
	}
}

/* ------------------------------------------------ */
/* SECONDARY LINKS (lost password / back to site)
   Brand Rose, matching the donation form's Tier-2 accent colour. */
.login #nav a,
.login #backtoblog a {
	font-family: 'DM Sans', sans-serif;
	color: var(--login-secondary);
	font-weight: 600;
	text-decoration: none;
}
.login #nav a:hover,
.login #backtoblog a:hover {
	color: var(--login-accent);
	text-decoration: underline;
}

/* ------------------------------------------------ */
/* ERROR / MESSAGE BANNERS */
#login #login_error,
.login .message {
	font-family: 'DM Sans', sans-serif;
	border-left-width: 4px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
	padding: 14px 16px;
}

/* ------------------------------------------------ */
/* KEYBOARD FOCUS (1.1.0)
   One clear ring for everything you can tab to, keyboard users only. */
.forgetmenot input[type="checkbox"]:focus-visible,
.wp-pwd .button.wp-hide-pw:focus-visible,
.wp-core-ui .button-primary:focus-visible,
#nav a:focus-visible,
#backtoblog a:focus-visible,
#login h1 a:focus-visible {
	outline: 3px solid var(--login-accent);
	outline-offset: 2px;
	box-shadow: none;
}
/* WordPress core's own button focus style is more specific; win over it. */
body.login #wp-submit:focus-visible {
	outline: 3px solid var(--login-accent);
	outline-offset: 3px;
	box-shadow: none;
}
