/* CannaChi Toolkit — WordPress login screen (wp-login.php and Quest
   Security's custom login URL), loaded by Cannachi_Login::enqueue_login_screen().
   cannachi-frontend.css isn't loaded there, so the brand tokens it needs are
   repeated below (the dark palette, matching the site's dark mode). The logo
   is set inline from assets/images/.
   File version: 01.00.00 */

body.login {
	--cannachi-gold: #C9A96A;
	--cannachi-gold-bright: #E2C47A;
	--cannachi-gold-dim: #8A6B2A;
	--cannachi-teal: #18B6B8;
	--cannachi-teal-bright: #2DD4D6;
	--cannachi-teal-dim: #0D8E90;
	--cannachi-navy: #060E18;
	--cannachi-navy-2: #0B1825;
	--cannachi-navy-3: #101E30;
	--cannachi-heading: #FFFFFF;
	--cannachi-text: #E8EDF3;
	--cannachi-text-muted: rgba(232,237,243,0.6);
	--cannachi-border: rgba(201,169,106,0.18);
	--cannachi-error-text: #F28B8B;
	--cannachi-success: #2ECC71;
	--cannachi-font-heading: 'Cormorant Garamond', Georgia, serif;
	--cannachi-font-body: 'Outfit', -apple-system, 'Segoe UI', sans-serif;
	--cannachi-font-mono: 'DM Mono', ui-monospace, monospace;

	color-scheme: dark;
	min-height: 100vh;
	background:
		radial-gradient(ellipse 70% 50% at 50% 0%, rgba(24,182,184,0.12), transparent 70%),
		radial-gradient(ellipse 60% 40% at 50% 100%, rgba(201,169,106,0.08), transparent 70%),
		linear-gradient(160deg, var(--cannachi-navy-2) 0%, var(--cannachi-navy) 60%);
	background-attachment: fixed;
	color: var(--cannachi-text);
	font-family: var(--cannachi-font-body);
}

body.login #login { width: min(380px, calc(100vw - 32px)); padding: 6vh 0 40px; }

/* Logo */
body.login #login h1 a {
	width: 140px; height: 160px; margin: 0 auto 28px;
	background-size: contain; background-position: center; background-repeat: no-repeat;
}

/* Card */
body.login form {
	margin-top: 0; padding: 30px 28px 26px;
	background: var(--cannachi-navy-3);
	border: 1px solid var(--cannachi-border); border-radius: 18px;
	box-shadow: 0 40px 80px -30px rgb(0 0 0 / 55%);
}
body.login label {
	font-family: var(--cannachi-font-mono);
	font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
	color: var(--cannachi-text-muted);
}
body.login form .input,
body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
	margin: 6px 0 18px; padding: 10px 14px; min-height: 46px;
	background: rgba(255,255,255,0.04); color: var(--cannachi-text);
	border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
	font-family: var(--cannachi-font-body); font-size: 16px;
	box-shadow: none;
}
body.login form .input:focus,
body.login input[type="text"]:focus,
body.login input[type="email"]:focus,
body.login input[type="password"]:focus {
	border-color: var(--cannachi-teal);
	box-shadow: 0 0 0 1px var(--cannachi-teal);
	outline: 0;
}
body.login .wp-pwd { margin-bottom: 0; }
body.login .button.wp-hide-pw { min-height: 46px; top: 6px; color: var(--cannachi-text-muted); }
body.login .button.wp-hide-pw:hover,
body.login .button.wp-hide-pw:focus { color: var(--cannachi-teal-bright); background: transparent; border-color: transparent; box-shadow: none; }
body.login .button.wp-hide-pw .dashicons { color: inherit; }

body.login .forgetmenot { margin-top: 6px; }
body.login .forgetmenot label { text-transform: none; letter-spacing: 0; font-family: var(--cannachi-font-body); font-size: 13px; }
body.login input[type="checkbox"] {
	background: transparent; border-color: rgba(255,255,255,0.25);
	accent-color: var(--cannachi-teal);
}
/* WordPress draws its own blue tick; swap it for a white one on teal. */
body.login input[type="checkbox"]:checked {
	background: var(--cannachi-teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
	border-color: var(--cannachi-teal);
}
body.login input[type="checkbox"]:checked::before { content: none; }
body.login input[type="checkbox"]:focus { border-color: var(--cannachi-teal); box-shadow: 0 0 0 1px var(--cannachi-teal); }

/* Sign-in button */
body.login .button-primary,
body.login #wp-submit {
	min-height: 44px; padding: 0 26px;
	background: linear-gradient(135deg, var(--cannachi-teal-dim), var(--cannachi-teal));
	border: 0; border-radius: 6px;
	color: #FFFFFF; text-shadow: none;
	font-family: var(--cannachi-font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
	box-shadow: 0 12px 24px -12px rgba(24,182,184,0.6);
	transition: transform .2s ease, box-shadow .2s ease;
}
body.login .button-primary:hover,
body.login .button-primary:focus,
body.login #wp-submit:hover,
body.login #wp-submit:focus {
	background: linear-gradient(135deg, var(--cannachi-teal), var(--cannachi-teal-bright));
	color: #FFFFFF;
	transform: translateY(-1px);
	box-shadow: 0 0 0 2px var(--cannachi-navy-3), 0 0 0 4px var(--cannachi-teal);
}
body.login .button:not(.button-primary):not(.wp-hide-pw) {
	background: transparent; color: var(--cannachi-text-muted);
	border: 1px solid var(--cannachi-border); border-radius: 6px;
}
body.login .button:not(.button-primary):not(.wp-hide-pw):hover { color: var(--cannachi-gold); border-color: var(--cannachi-gold); }

/* Messages and errors */
body.login .message,
body.login .notice,
body.login .success,
body.login #login_error {
	margin-bottom: 18px; padding: 12px 16px;
	background: var(--cannachi-navy-3); color: var(--cannachi-text);
	border: 1px solid var(--cannachi-border); border-left: 3px solid var(--cannachi-teal); border-radius: 10px;
	box-shadow: none;
}
body.login #login_error,
body.login .notice-error { border-left-color: var(--cannachi-error-text); }
body.login .success { border-left-color: var(--cannachi-success); }
body.login .message a,
body.login .notice a,
body.login #login_error a { color: var(--cannachi-teal-bright); }

/* Links under the card */
body.login #nav,
body.login #backtoblog { padding: 0 4px; text-align: center; font-size: 13px; }
body.login #nav { margin-top: 22px; }
body.login #nav a,
body.login #backtoblog a,
body.login .privacy-policy-page-link a {
	color: var(--cannachi-text-muted); text-decoration: none; transition: color .2s ease;
}
body.login #nav a:hover,
body.login #backtoblog a:hover,
body.login .privacy-policy-page-link a:hover,
body.login #nav a:focus,
body.login #backtoblog a:focus { color: var(--cannachi-gold); box-shadow: none; }
body.login .privacy-policy-page-link { margin-top: 24px; }

/* Language switcher at the foot of the screen */
body.login .language-switcher { margin-top: 12px; }
body.login .language-switcher label .dashicons { color: var(--cannachi-text-muted); }
body.login .language-switcher select {
	background-color: var(--cannachi-navy-3); color: var(--cannachi-text);
	border-color: rgba(255,255,255,0.12);
}

/* Screen-reader and focus rings */
body.login a:focus-visible { outline: 2px solid var(--cannachi-teal); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
	body.login .button-primary,
	body.login #wp-submit { transition: none; }
	body.login .button-primary:hover,
	body.login #wp-submit:hover { transform: none; }
}
