/*
 * Nursing Companions Members: account pages, forms and dashboards.
 * Uses the Nursing Companions theme's colour presets, with fallbacks so it still looks right under another theme.
 */

:root {
	--ncm-primary: var(--wp--preset--color--primary, #1B3A7A);
	--ncm-primary-dark: var(--wp--preset--color--primary-dark, #0F2552);
	--ncm-ink: var(--wp--preset--color--ink, #1F2A44);
	--ncm-text: var(--wp--preset--color--text, #3A3632);
	--ncm-muted: var(--wp--preset--color--muted, #6B635B);
	--ncm-accent: var(--wp--preset--color--terracotta, #A65C35);
	--ncm-accent-dark: var(--wp--preset--color--terracotta-dark, #8A4B2A);
	--ncm-linen: var(--wp--preset--color--linen, #FBF7F2);
	--ncm-sand: var(--wp--preset--color--sand, #F7EFE6);
	--ncm-border: var(--wp--preset--color--border, #EDE4D9);
	--ncm-input-border: #8A7D70; /* 4:1 against white so fields are easy to see */
}

/* Sections and cards */
.ncm-section {
	padding-top: var(--wp--preset--spacing--60, 3rem);
	padding-bottom: var(--wp--preset--spacing--70, 5rem);
}
.ncm-card {
	background: #fff;
	border: 1px solid var(--ncm-border);
	border-radius: 28px;
	box-shadow: 0 20px 50px rgba(90, 60, 30, 0.08);
	padding: clamp(24px, 5vw, 40px);
}
.ncm-card > :first-child {
	margin-top: 0;
}
.ncm-kicker {
	color: var(--ncm-accent);
	font-weight: 700;
}
.ncm-welcome {
	margin-top: 0;
}
.ncm-muted {
	color: var(--ncm-muted);
}

/* Form fields (our forms and the WordPress login form) */
.ncm-form .ncm-field,
#ncm-login p {
	margin: 0 0 18px;
}
.ncm-form label,
#ncm-login .login-username label,
#ncm-login .login-password label {
	display: block;
	margin-bottom: 6px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--ncm-text);
}
.ncm-form input[type="text"],
.ncm-form input[type="email"],
.ncm-form input[type="password"],
#ncm-login input[type="text"],
#ncm-login input[type="password"] {
	box-sizing: border-box;
	width: 100%;
	min-height: 50px;
	padding: 12px 16px;
	font: inherit;
	font-size: 1rem;
	color: var(--ncm-text);
	background: #FFFDFB;
	border: 1px solid var(--ncm-input-border);
	border-radius: 14px;
}
.ncm-form input:focus,
#ncm-login input:focus {
	border-color: var(--ncm-primary);
	outline: 3px solid rgba(27, 58, 122, 0.18);
	outline-offset: 0;
}
.ncm-help {
	display: block;
	margin-top: 6px;
	font-size: 0.9375rem;
	color: var(--ncm-muted);
}
#ncm-login .login-remember label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
}
#ncm-login .login-remember input {
	width: 20px;
	height: 20px;
	accent-color: var(--ncm-primary);
}

/* Buttons */
.ncm-button,
#ncm-login #wp-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 30px;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	text-decoration: none;
	background: var(--ncm-primary);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}
.ncm-button:hover,
#ncm-login #wp-submit:hover {
	background: var(--ncm-primary-dark);
	color: #fff;
}
.ncm-button--outline {
	color: var(--ncm-ink);
	background: transparent;
	border: 1px solid #B9AA9A;
}
.ncm-button--outline:hover {
	color: var(--ncm-ink);
	background: var(--ncm-sand);
}
#ncm-login #wp-submit {
	width: 100%;
}
.ncm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.ncm-form-links {
	margin: 12px 0 0;
	font-size: 0.9375rem;
}

/* Notices */
.ncm-notice {
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 14px;
	font-size: 0.9375rem;
}
.ncm-notice--success {
	background: #EAF3EC;
	color: #1F4D2C;
}
.ncm-notice--error {
	background: #FBECE6;
	color: #7A2A16;
}
.ncm-notice--info {
	background: var(--ncm-sand);
	color: var(--ncm-ink);
}

/* Account nav (My area · My profile · Change password · Sign out) */
.ncm-account-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}
.ncm-account-nav a {
	display: inline-block;
	padding: 10px 16px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--ncm-text);
	text-decoration: none;
	border: 1px solid var(--ncm-border);
	border-radius: 999px;
}
.ncm-account-nav a:hover {
	background: var(--ncm-linen);
}
.ncm-account-nav a[aria-current="page"] {
	background: var(--ncm-sand);
	border-color: var(--ncm-sand);
	color: var(--ncm-accent-dark);
}

/* Dashboard tiles */
.ncm-tiles {
	margin-top: 32px;
}
.ncm-tile {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 28px;
	background: var(--ncm-linen);
	border-radius: 20px;
}
.ncm-tile > * {
	margin: 0;
}
.ncm-tile .ncm-tile-link {
	margin-top: auto;
	padding-top: 8px;
	font-weight: 700;
}

/* Tick list on the Join our team page */
.ncm-checklist {
	padding-left: 0;
	list-style: none;
}
.ncm-checklist li {
	position: relative;
	padding-left: 30px;
	margin-bottom: 10px;
}
.ncm-checklist li::before {
	content: "✓";
	content: "✓" / ""; /* decorative */
	position: absolute;
	left: 0;
	font-weight: 700;
	color: var(--ncm-accent);
}

/* "My account · Log out" in the theme header */
.ncm-sep {
	opacity: 0.6;
}

/* Show / Hide password button */
.ncm-password-wrap {
	position: relative;
	display: block;
}
.ncm-password-wrap input {
	padding-right: 88px !important;
}
.ncm-password-toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	min-width: 72px;
	min-height: 40px;
	padding: 6px 12px;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--ncm-primary);
	background: var(--ncm-linen);
	border: 1px solid #B9AA9A;
	border-radius: 10px;
	cursor: pointer;
}
.ncm-password-toggle:hover {
	background: var(--ncm-sand);
}

/* Keyboard focus: thick navy ring with white halo */
.ncm-section :focus-visible,
.ncm-password-toggle:focus-visible,
#ncm-login :focus-visible {
	outline: 3px solid var(--ncm-primary);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #fff;
}
.ncm-notice:focus {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

/* Windows High Contrast / forced colours */
@media (forced-colors: active) {
	.ncm-card,
	.ncm-tile,
	.ncm-notice,
	.ncm-button,
	.ncm-account-nav a {
		border: 1px solid CanvasText;
	}
}
