/*
 * Calling Profile Assessment - front-end styles.
 * Mobile-first, using the Pathfinder-Impact brand palette.
 * No build step - plain CSS with custom properties, works everywhere.
 */

/*
 * BUG FIX: this used to auto-switch to a dark palette when the visitor's
 * OPERATING SYSTEM was in dark mode (`prefers-color-scheme: dark`). That
 * only makes sense if the surrounding page also goes dark - but this CSS
 * only controls the plugin's own components, not your WordPress theme's
 * page background. On a theme with a plain white page (the normal case),
 * that produced near-white text on a white background - unreadable. Fixed
 * by always rendering dark-text-on-light, regardless of OS preference.
 *
 * See STYLE-GUIDE.md for how to customize every color/font below to match
 * your own theme, via Appearance > Customize > Additional CSS.
 */
:root {
	--pfcp-ocean-teal: #175873;
	--pfcp-chalk-white: #f8f7f3;
	--pfcp-prussian-blue: #082150;
	--pfcp-baltic-blue: #2e667c;
	--pfcp-sage-green: #8cb89f;
	--pfcp-text: #22262b;
	--pfcp-text-muted: #5a6570;
	--pfcp-border: #dfe6e2;
	--pfcp-danger-bg: #fdf1ec;
	--pfcp-danger-text: #8a3b1f;
	--pfcp-radius: 10px;
	--pfcp-max-width: 720px;
}

.pfcp-root, .pfcp-report {
	max-width: var(--pfcp-max-width);
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--pfcp-text);
	line-height: 1.5;
	box-sizing: border-box;
}
.pfcp-root *, .pfcp-report * { box-sizing: border-box; }

.pfcp-loading { text-align: center; padding: 2rem 1rem; color: var(--pfcp-text-muted); }

.pfcp-notice {
	padding: 0.9rem 1rem;
	border-radius: var(--pfcp-radius);
	margin: 0 0 1rem;
	font-size: 0.95rem;
}
.pfcp-notice--info { background: #eef4f2; color: var(--pfcp-ocean-teal); }
.pfcp-notice--warning { background: var(--pfcp-danger-bg); color: var(--pfcp-danger-text); }

/* -------------------------------------------------------------- */
/* Assessment stepper                                              */
/* -------------------------------------------------------------- */
.pfcp-stepper__header {
	position: sticky;
	top: 0;
	background: var(--pfcp-chalk-white);
	padding: 0.75rem 0 1rem;
	z-index: 2;
}
.pfcp-stepper__instrument-name {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--pfcp-baltic-blue);
	font-weight: 700;
	margin: 0 0 0.4rem;
}
.pfcp-progress-track {
	background: var(--pfcp-border);
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
}
.pfcp-progress-fill {
	background: var(--pfcp-sage-green);
	height: 100%;
	transition: width 0.3s ease;
}
.pfcp-progress-label {
	font-size: 0.8rem;
	color: var(--pfcp-text-muted);
	margin-top: 0.35rem;
}

.pfcp-jump-label {
	display: block;
	font-size: 0.85rem;
	color: var(--pfcp-text-muted);
	margin-top: 0.6rem;
}
.pfcp-jump-label select {
	margin-left: 0.4rem;
	padding: 0.3rem 0.5rem;
	border-radius: 6px;
	border: 1px solid var(--pfcp-border);
	background: transparent;
	color: var(--pfcp-text);
	max-width: 100%;
}

.pfcp-jump-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.75rem;
}
.pfcp-jump-pill {
	min-width: 36px;
	min-height: 36px;
	border-radius: 8px;
	border: 2px solid var(--pfcp-border);
	background: transparent;
	color: var(--pfcp-text-muted);
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
}
.pfcp-jump-pill.is-answered {
	border-color: var(--pfcp-sage-green);
	color: var(--pfcp-prussian-blue);
	background: rgba(140, 184, 159, 0.25);
}
.pfcp-jump-pill.is-current {
	border-color: var(--pfcp-ocean-teal);
	background: var(--pfcp-ocean-teal);
	color: #fff;
}

.pfcp-question {
	padding: 1.5rem 0;
}
.pfcp-question__prompt {
	font-size: 1.15rem;
	font-weight: 600;
	margin: 0 0 1.1rem;
}

.pfcp-scale {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.pfcp-scale__option {
	flex: 1 1 auto;
	min-width: 44px;
	min-height: 44px; /* touch target */
	border: 2px solid var(--pfcp-border);
	border-radius: var(--pfcp-radius);
	background: transparent;
	color: var(--pfcp-text);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	padding: 0.6rem 0.4rem;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.pfcp-scale__option:hover { border-color: var(--pfcp-baltic-blue); }
.pfcp-scale__option.is-selected {
	border-color: var(--pfcp-ocean-teal);
	background: var(--pfcp-ocean-teal);
	color: #fff;
}
.pfcp-scale__labels {
	display: flex;
	justify-content: space-between;
	font-size: 0.75rem;
	color: var(--pfcp-text-muted);
	margin-top: 0.4rem;
}

.pfcp-textarea {
	width: 100%;
	min-height: 120px;
	border: 2px solid var(--pfcp-border);
	border-radius: var(--pfcp-radius);
	padding: 0.75rem;
	font-size: 1rem;
	font-family: inherit;
	color: var(--pfcp-text);
	background: transparent;
}
.pfcp-textarea:focus { outline: none; border-color: var(--pfcp-ocean-teal); }

.pfcp-save-status {
	font-size: 0.8rem;
	color: var(--pfcp-text-muted);
	min-height: 1.2em;
	margin-top: 0.5rem;
}

.pfcp-nav {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 0 2rem;
}

.pfcp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.7rem 1.4rem;
	border-radius: var(--pfcp-radius);
	border: none;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	background: var(--pfcp-ocean-teal);
	color: #fff;
}
.pfcp-btn:hover { background: var(--pfcp-prussian-blue); }
.pfcp-btn--secondary {
	background: transparent;
	color: var(--pfcp-ocean-teal);
	border: 2px solid var(--pfcp-ocean-teal);
}
.pfcp-btn--secondary:hover { background: #eef4f2; }
.pfcp-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* -------------------------------------------------------------- */
/* Dashboard / report                                              */
/* -------------------------------------------------------------- */
.pfcp-report__branding {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding-bottom: 1rem;
	margin-bottom: 1rem;
	border-bottom: 2px solid var(--pfcp-ocean-teal);
}
.pfcp-report__logo { max-height: 70px; max-width: 220px; width: auto; height: auto; }
.pfcp-report__branding-text { text-align: left; }
.pfcp-report__org-name { font-weight: 700; font-size: 1.1rem; color: var(--pfcp-prussian-blue); margin: 0; }
.pfcp-report__org-desc { color: var(--pfcp-text-muted); margin: 0.1rem 0 0; }
.pfcp-report__org-link { margin: 0.1rem 0 0; font-size: 0.9rem; }
.pfcp-report__header { text-align: center; margin-bottom: 1.5rem; }
.pfcp-report__header h1 { color: var(--pfcp-prussian-blue); margin-bottom: 0.2rem; }
.pfcp-report__student { font-weight: 700; font-size: 1.1rem; }
.pfcp-report__meta { color: var(--pfcp-text-muted); font-size: 0.9rem; }

.pfcp-report__instrument {
	border-top: 1px solid var(--pfcp-border);
	padding: 1.25rem 0;
}
.pfcp-report__instrument h2 {
	color: var(--pfcp-ocean-teal);
	font-size: 1.15rem;
	margin: 0 0 0.75rem;
}

.pfcp-result-type {
	font-size: 2rem;
	font-weight: 800;
	color: var(--pfcp-prussian-blue);
	margin: 0 0 0.5rem;
}

.pfcp-result-ranked { margin: 0; padding-left: 1.2rem; }
.pfcp-result-ranked li { margin-bottom: 0.75rem; }

.pfcp-reflections dt { font-weight: 700; margin-top: 0.75rem; }
.pfcp-reflections dd { margin: 0.25rem 0 0; color: var(--pfcp-text-muted); }

.pfcp-report__ai-narrative { background: #eef4f2; padding: 1rem; border-radius: var(--pfcp-radius); }

.pfcp-growth-plan-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.pfcp-growth-plan-list li {
	border: 1px solid var(--pfcp-border);
	border-radius: var(--pfcp-radius);
	padding: 1rem 1.1rem;
	margin-bottom: 0.85rem;
}
.pfcp-growth-item__header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 0.5rem;
}
.pfcp-growth-item__desc {
	margin: 0 0 0.75rem;
	color: var(--pfcp-text-muted);
}
.pfcp-growth-item__controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 0.6rem;
	padding-top: 0.6rem;
	border-top: 1px solid var(--pfcp-border);
}
.pfcp-growth-item__controls select {
	padding: 0.45rem 0.6rem;
	border-radius: 6px;
	border: 1px solid var(--pfcp-border);
	background: transparent;
	color: var(--pfcp-text);
}
.pfcp-badge {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	color: #fff;
	line-height: 1.6;
}
.pfcp-badge--career { background: var(--pfcp-baltic-blue); }
.pfcp-badge--calling { background: var(--pfcp-ocean-teal); }
.pfcp-badge--personality { background: var(--pfcp-sage-green); color: var(--pfcp-prussian-blue); }

/* The "add item" mini-form (growth plan), and any other inline label+field
   rows on the mentor dashboard / fast-track / admin-style pages rendered
   through the front-end CSS. */
.pfcp-inline-form {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	margin: 0.75rem 0 1.25rem;
}
.pfcp-inline-form > div { display: flex; flex-direction: column; gap: 0.3rem; }
.pfcp-inline-form label { font-size: 0.8rem; font-weight: 600; color: var(--pfcp-text-muted); }
.pfcp-inline-form input[type="text"],
.pfcp-inline-form select {
	padding: 0.5rem 0.6rem;
	border-radius: 6px;
	border: 1px solid var(--pfcp-border);
	background: transparent;
	color: var(--pfcp-text);
	min-height: 40px;
}

.pfcp-report__footer { text-align: center; padding-top: 1.5rem; }

/* -------------------------------------------------------------- */
/* Shared cards (mentor dashboard + fast-track)                    */
/* -------------------------------------------------------------- */
.pfcp-card {
	border: 1px solid var(--pfcp-border);
	border-radius: var(--pfcp-radius);
	padding: 1.25rem;
	margin: 1rem 0;
}
.pfcp-card h3 {
	margin-top: 0;
	color: var(--pfcp-ocean-teal);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}
/* Safety net: any plain <ul>/<li> list rendered inside a card (mentor
   notes, etc.) gets reasonable breathing room even without a dedicated
   class, so nothing on the mentor dashboard runs text/buttons together. */
.pfcp-card ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.pfcp-card ul li { margin-bottom: 0.5rem; }
.pfcp-card textarea.pfcp-textarea { margin: 0.5rem 0; }
.pfcp-card > .pfcp-btn,
.pfcp-card > .pfcp-btn + .pfcp-btn { margin-right: 0.5rem; }

/* -------------------------------------------------------------- */
/* Fast-track page                                                 */
/* -------------------------------------------------------------- */
.pfcp-ft-hint { color: var(--pfcp-text-muted); font-size: 0.85rem; margin: 0.25rem 0 0.75rem; }
.pfcp-ft-dichotomies { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.75rem; }
.pfcp-ft-dichotomy { display: flex; gap: 1.5rem; flex-wrap: wrap; padding: 0.5rem 0; border-bottom: 1px solid var(--pfcp-border); }
.pfcp-ft-dichotomy label { display: flex; align-items: center; gap: 0.4rem; }
.pfcp-ft-picklist { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 0.75rem; }
.pfcp-ft-option { display: flex; align-items: center; gap: 0.4rem; min-width: 45%; }
.pfcp-ft-textfields textarea { margin-bottom: 0.75rem; }
.pfcp-ft-textfields label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.pfcp-ft-group { padding: 0.75rem 0; border-top: 1px solid var(--pfcp-border); }
.pfcp-ft-group:first-of-type { border-top: none; padding-top: 0; }
.pfcp-ft-group h4 { margin: 0 0 0.25rem; }
.pfcp-result-group__label { margin-top: 1.25rem; }
.pfcp-result-group__label:first-child { margin-top: 0; }
.pfcp-partner-offer { padding: 0.75rem 0; border-top: 1px solid var(--pfcp-border); }
.pfcp-partner-offer:first-of-type { border-top: none; }
.pfcp-partner-offer h3 { margin: 0 0 0.15rem; }
.pfcp-partner-offer__by { color: var(--pfcp-text-muted); font-size: 0.85rem; margin: 0 0 0.5rem; }

/* -------------------------------------------------------------- */
/* Mentor dashboard                                                */
/* -------------------------------------------------------------- */
.pfcp-mentor-group-heading { margin: 1.5rem 0 0.5rem; }
.pfcp-mentor-group-heading:first-of-type { margin-top: 0.5rem; }
.pfcp-mentor-group-count { font-weight: 400; color: var(--pfcp-text-muted); }
.pfcp-student-list { list-style: none; margin: 0; padding: 0; }
.pfcp-student-card {
	border: 1px solid var(--pfcp-border);
	border-radius: var(--pfcp-radius);
	padding: 1rem;
	margin-bottom: 0.75rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}
.pfcp-status-pill {
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: var(--pfcp-border);
}
.pfcp-status-pill--completed { background: var(--pfcp-sage-green); color: var(--pfcp-prussian-blue); }
.pfcp-status-pill--in_progress { background: #fdeecb; color: #6b4c05; }
.pfcp-status-pill--not_started { background: var(--pfcp-border); color: var(--pfcp-text-muted); }

/* -------------------------------------------------------------- */
/* Print / PDF view                                                */
/* -------------------------------------------------------------- */
.pfcp-print-body { background: #fff; padding: 1.5rem; }
@media print {
	.pfcp-no-print { display: none !important; }
	.pfcp-report { max-width: none; }
	.pfcp-report__instrument { break-inside: avoid; }
}

/* -------------------------------------------------------------- */
/* Small screens (defaults above already mobile-first; this just    */
/* loosens spacing back up on larger viewports).                   */
/* -------------------------------------------------------------- */
@media (min-width: 600px) {
	.pfcp-question__prompt { font-size: 1.3rem; }
	.pfcp-scale__option { flex: 0 0 auto; min-width: 56px; }
}

/* -------------------------------------------------------------- */
/* Mentor dashboard: student detail pop-up                         */
/* -------------------------------------------------------------- */
body.pfcp-modal-open { overflow: hidden; }
.pfcp-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(8, 33, 80, 0.55);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 3rem 1rem;
	z-index: 100000;
	overflow-y: auto;
}
.pfcp-modal {
	position: relative;
	background: #fff;
	border-radius: var(--pfcp-radius);
	max-width: 760px;
	width: 100%;
	padding: 2rem 1.5rem 1.5rem;
	box-shadow: 0 20px 60px rgba(8, 33, 80, 0.3);
}
.pfcp-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--pfcp-text-muted);
	cursor: pointer;
	padding: 0.25rem 0.5rem;
}
.pfcp-modal__close:hover { color: var(--pfcp-text); }
@media (max-width: 480px) {
	.pfcp-modal-overlay { padding: 1rem 0.5rem; }
	.pfcp-modal { padding: 2rem 1rem 1rem; }
}

/* -------------------------------------------------------------- */
/* [pfcp_login] - magic-link + password forms                     */
/* -------------------------------------------------------------- */
.pfcp-login-divider {
	text-align: center;
	color: var(--pfcp-text-muted);
	font-size: 0.85rem;
	margin: 1.5rem 0;
}

/* -------------------------------------------------------------- */
/* Balance Wheel Assessment                                        */
/* -------------------------------------------------------------- */
.pfcp-wheel-chart { display: flex; flex-direction: column; align-items: center; }
.pfcp-wheel { width: 100%; max-width: 640px; height: auto; }
.pfcp-wheel__ring { fill: none; stroke: var(--pfcp-border); stroke-width: 1; }
.pfcp-wheel__ring--outer { stroke-width: 1.6; }
.pfcp-wheel__spoke { stroke: var(--pfcp-border); stroke-width: 1; }
.pfcp-wheel__hub { fill: var(--pfcp-border); opacity: 0.5; }
.pfcp-wheel__label { font-size: 12.5px; font-weight: 600; fill: var(--pfcp-prussian-blue); }
.pfcp-wheel__tick { font-size: 10.5px; fill: var(--pfcp-text-muted); }
.pfcp-wheel__before { fill: var(--pfcp-ocean-teal); fill-opacity: 0.16; stroke: var(--pfcp-ocean-teal); stroke-width: 2.5; }
.pfcp-wheel__after { fill: var(--pfcp-sage-green); fill-opacity: 0.32; stroke: var(--pfcp-sage-green); stroke-width: 2.5; }

.pfcp-wheel-legend { display: flex; gap: 1.5rem; margin: 0.5rem 0 1.25rem; font-size: 0.85rem; color: var(--pfcp-text-muted); }
.pfcp-wheel-legend__item { display: inline-flex; align-items: center; gap: 0.4rem; }
.pfcp-wheel-legend__item::before { content: ""; width: 0.85rem; height: 0.85rem; border-radius: 3px; display: inline-block; }
.pfcp-wheel-legend__item--before::before { background: var(--pfcp-ocean-teal); }
.pfcp-wheel-legend__item--after::before { background: var(--pfcp-sage-green); }

.pfcp-wheel-table { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 0.88rem; }
.pfcp-wheel-table th, .pfcp-wheel-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--pfcp-border); }
.pfcp-wheel-table th { color: var(--pfcp-text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pfcp-wheel-table tr:last-child td { border-bottom: none; }
.pfcp-wheel-table__up { color: #2f7a4f; font-weight: 700; }
.pfcp-wheel-table__down { color: #a8402c; font-weight: 700; }

.pfcp-wheel-form__category { margin: 1.5rem 0; padding-top: 1rem; border-top: 1px solid var(--pfcp-border); }
.pfcp-wheel-form__category:first-child { border-top: none; padding-top: 0; }
.pfcp-wheel-form__category h3 { margin: 0 0 0.75rem; }
.pfcp-wheel-form__question { margin-bottom: 1rem; }
.pfcp-wheel-form__question p { margin: 0 0 0.4rem; }
.pfcp-wheel-form__hint { font-size: 0.8rem; color: var(--pfcp-text-muted); }
