/**
 * Caprini Score — wizard page template styles
 * Loaded only on template-caprini.php.
 */

/* ===== Reset & base ===== */
.cap-app, .cap-app *, .cap-app *::before, .cap-app *::after { box-sizing: border-box; }

.cap-app {
	font-family: 'narkissblock', 'Heebo', 'Arial Hebrew', sans-serif;
	color: #1a1a1a;
	direction: rtl;
}

/* ===== Login overlay ===== */
.cap-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	direction: rtl;
	font-family: inherit;
}

.cap-login-card {
	background: #fff;
	border-radius: 16px;
	padding: 48px 40px 44px;
	width: 420px;
	max-width: calc(100vw - 32px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.cap-login-card h2 {
	font-size: 26px;
	font-weight: 600;
	color: #2c2c2c;
	text-align: center;
	margin: 0 0 40px;
	line-height: 1.5;
	font-family: inherit;
}

.cap-login-field { margin-bottom: 28px; }

.cap-login-field label {
	display: block;
	font-size: 14px;
	color: #888;
	text-align: right;
	margin-bottom: 8px;
	font-family: inherit;
}

#cap-pw {
	width: 100%;
	border: none;
	border-bottom: 1.5px solid #B99757;
	padding: 10px 0;
	font-size: 16px;
	outline: none;
	text-align: right;
	color: #2c2c2c;
	background: transparent;
	font-family: inherit;
	direction: rtl;
}

.cap-login-btn {
	width: 100%;
	background: #B99757;
	color: #fff;
	border: none;
	border-radius: 50px;
	padding: 16px;
	font-size: 16px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s;
}

.cap-login-btn:hover { background: #a78346; }

.cap-login-err {
	font-size: 13px;
	color: #e53e3e;
	text-align: center;
	margin-top: 14px;
	min-height: 18px;
	opacity: 0;
	transition: opacity .2s;
}

.cap-login-err.is-visible { opacity: 1; }

/* ===== Main wrap ===== */
.cap-wrap {
	max-width: 720px;
	margin: 40px auto 80px;
	padding: 0 16px;
}

/* ===== Hero ===== */
.cap-hero {
	background: linear-gradient(135deg, #373737 0%, #1a1a1a 60%, #2c2c2c 100%);
	border-radius: 18px;
	padding: 32px 36px;
	margin-bottom: 22px;
	position: relative;
	overflow: hidden;
}

.cap-hero-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(185, 151, 87, .18);
	border: 1px solid rgba(185, 151, 87, .35);
	color: #B99757;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 14px;
	border-radius: 20px;
	margin-bottom: 16px;
}

.cap-hero h1 {
	color: #fff;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 22px;
}

.cap-hero h1 span { color: #B99757; }

/* ===== Progress bar ===== */
.cap-progress {
	display: flex;
	align-items: center;
	gap: 14px;
}

.cap-progress-bar {
	flex: 1;
	height: 6px;
	background: rgba(255, 255, 255, .08);
	border-radius: 3px;
	overflow: hidden;
}

.cap-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #B99757 0%, #d4af6a 100%);
	border-radius: 3px;
	transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

.cap-progress-text {
	font-size: 13px;
	color: rgba(255, 255, 255, .7);
	font-weight: 500;
	flex-shrink: 0;
}

.cap-progress-text span { color: #B99757; font-weight: 700; }

/* ===== Form ===== */
.cap-form { margin: 0; padding: 0; border: 0; }

/* Wizard: hide all steps by default; only .is-current is visible. */
.cap-step { display: none; }
.cap-step.is-current {
	display: block;
	animation: capStepIn .35s cubic-bezier(.4, 0, .2, 1);
}

@keyframes capStepIn {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.cap-card {
	background: #fff;
	border-radius: 16px;
	border: 1px solid #e8e8e8;
	margin: 0 0 16px;
	padding: 0;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
	scroll-margin-top: 20px;
}

.cap-card-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px 26px;
	border-bottom: 1px solid #f0f0f0;
	background: #fafafa;
	width: 100%;
	float: none;
}

.cap-num {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #373737;
	color: #B99757;
	font-size: 15px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cap-card-title {
	font-size: 17px;
	font-weight: 600;
	color: #1a1a1a;
}

.cap-pts-badge {
	margin-right: auto;
	font-size: 11px;
	font-weight: 600;
	color: #B99757;
	background: rgba(185, 151, 87, .1);
	border: 1px solid rgba(185, 151, 87, .2);
	padding: 3px 10px;
	border-radius: 12px;
}

/* ===== Radio list ===== */
.cap-radio-list {
	padding: 14px 18px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cap-r {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 13px 16px;
	border-radius: 10px;
	cursor: pointer;
	transition: background .15s;
}

.cap-r:hover { background: #f8f6f2; }

.cap-r input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}

.cap-r-dot {
	width: 22px;
	height: 22px;
	border: 2px solid #d0d0d0;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .15s;
}

.cap-r input:checked ~ .cap-r-dot {
	border-color: #B99757;
	background: #B99757;
	box-shadow: inset 0 0 0 4px #fff;
}

.cap-r input:focus-visible ~ .cap-r-dot {
	outline: 2px solid #B99757;
	outline-offset: 2px;
}

.cap-r-text {
	font-size: 14px;
	color: #555;
	flex: 1;
}

.cap-r-text strong { color: #B99757; font-weight: 700; }

/* ===== Checkbox list ===== */
.cap-cb-list { display: flex; flex-direction: column; padding: 6px 0; }

.cap-cb {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 13px 26px;
	border-bottom: 1px solid #f5f5f5;
	cursor: pointer;
	transition: background .15s;
}

.cap-cb:last-child { border-bottom: none; }

.cap-cb:hover { background: #faf8f5; }

.cap-cb input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}

.cap-box {
	width: 24px;
	height: 24px;
	border: 2px solid #d0d0d0;
	border-radius: 7px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .15s;
	font-size: 14px;
	color: transparent;
}

.cap-cb input:checked ~ .cap-box {
	background: #B99757;
	border-color: #B99757;
	color: #fff;
}

.cap-cb input:focus-visible ~ .cap-box {
	outline: 2px solid #B99757;
	outline-offset: 2px;
}

.cap-cb-text {
	font-size: 14px;
	color: #555;
	line-height: 1.5;
}

.cap-cb input:checked ~ .cap-cb-text {
	color: #1a1a1a;
	font-weight: 500;
}

/* ===== Step navigation ===== */
.cap-step-nav {
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 18px 26px 22px;
	border-top: 1px solid #f0f0f0;
	background: #fafafa;
}

.cap-btn-prev, .cap-btn-next, .cap-btn-finish {
	border: none;
	border-radius: 50px;
	padding: 12px 28px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: all .15s;
}

.cap-btn-prev {
	background: transparent;
	color: #888;
	border: 1px solid #d0d0d0;
}

.cap-btn-prev:hover:not(:disabled) {
	background: #f0f0f0;
	color: #555;
	border-color: #b8b8b8;
}

.cap-btn-prev:disabled {
	opacity: .4;
	cursor: not-allowed;
}

.cap-btn-next, .cap-btn-finish {
	background: #B99757;
	color: #fff;
	margin-right: auto;
}

.cap-btn-next:hover, .cap-btn-finish:hover {
	background: #a78346;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(185, 151, 87, .35);
}

.cap-btn-finish {
	background: #1a1a1a;
	font-size: 15px;
	padding: 14px 36px;
}

.cap-btn-finish:hover {
	background: #000;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

/* ===== Result reveal ===== */
.cap-result {
	margin: 0 0 24px;
}

.cap-result.is-revealed .cap-result-card {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.cap-result-card {
	background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 60%, #1a1a1a 100%);
	border-radius: 20px;
	padding: 44px 40px 36px;
	color: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	position: relative;
	overflow: hidden;
	opacity: 0;
	transform: translateY(20px) scale(.96);
	transition: opacity .55s cubic-bezier(.4, 0, .2, 1), transform .55s cubic-bezier(.4, 0, .2, 1);
}

.cap-result-card::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 240px;
	height: 240px;
	background: radial-gradient(circle, rgba(185, 151, 87, .15) 0%, transparent 70%);
	pointer-events: none;
}

.cap-result-header { text-align: center; position: relative; }

.cap-result-eyebrow {
	font-size: 12px;
	font-weight: 600;
	color: #B99757;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	margin-bottom: 6px;
}

.cap-result-title {
	font-size: 28px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 28px;
	font-family: inherit;
}

.cap-result-score {
	text-align: center;
	margin-bottom: 24px;
	position: relative;
}

.cap-result-num {
	font-size: 96px;
	font-weight: 800;
	color: #B99757;
	line-height: 1;
	letter-spacing: -2px;
	display: inline-block;
	animation: capScorePop .6s cubic-bezier(.34, 1.56, .64, 1) .2s both;
}

@keyframes capScorePop {
	0%   { opacity: 0; transform: scale(.5); }
	100% { opacity: 1; transform: scale(1); }
}

.cap-result-num-label {
	font-size: 14px;
	color: rgba(255, 255, 255, .55);
	margin-top: 4px;
}

.cap-result-badge {
	display: block;
	text-align: center;
	margin: 0 auto 28px;
	max-width: 380px;
	padding: 14px 24px;
	border-radius: 50px;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	background: #16a34a;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	animation: capBadgeIn .5s cubic-bezier(.4, 0, .2, 1) .35s both;
}

@keyframes capBadgeIn {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.cap-result-rec {
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 14px;
	padding: 20px 24px;
	margin-bottom: 24px;
	animation: capStepIn .5s cubic-bezier(.4, 0, .2, 1) .5s both;
}

.cap-result-rec-label {
	font-size: 12px;
	font-weight: 600;
	color: #B99757;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 8px;
}

.cap-result-rec-text {
	font-size: 16px;
	color: rgba(255, 255, 255, .9);
	line-height: 1.6;
}

.cap-result-actions {
	display: flex;
	justify-content: center;
}

.cap-result-btn-restart {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .25);
	color: rgba(255, 255, 255, .75);
	padding: 12px 28px;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: all .15s;
}

.cap-result-btn-restart:hover {
	background: rgba(255, 255, 255, .08);
	color: #fff;
	border-color: rgba(255, 255, 255, .4);
}

/* ===== Mobile (≤ 768px) ===== */
@media (max-width: 768px) {
	.cap-wrap {
		margin: 24px auto 60px;
		padding: 0 12px;
	}

	.cap-hero {
		padding: 24px 22px;
		border-radius: 14px;
	}

	.cap-hero h1 { font-size: 20px; }

	.cap-progress { gap: 10px; }
	.cap-progress-text { font-size: 12px; }

	.cap-card-head {
		padding: 16px 18px;
		gap: 10px;
	}

	.cap-num { width: 30px; height: 30px; font-size: 13px; }

	.cap-card-title { font-size: 15px; }

	.cap-pts-badge { font-size: 10px; }

	.cap-r, .cap-cb { padding: 14px 14px; }

	.cap-r-text, .cap-cb-text { font-size: 14px; }

	.cap-step-nav {
		padding: 14px 18px 18px;
		gap: 10px;
	}

	.cap-btn-prev, .cap-btn-next, .cap-btn-finish {
		padding: 11px 18px;
		font-size: 13px;
		flex: 1;
	}

	.cap-btn-finish { font-size: 14px; }

	.cap-result-card {
		padding: 32px 22px 28px;
		border-radius: 16px;
	}

	.cap-result-title { font-size: 22px; }
	.cap-result-num { font-size: 76px; }
	.cap-result-badge { font-size: 16px; padding: 12px 20px; }
	.cap-result-rec { padding: 16px 18px; }
	.cap-result-rec-text { font-size: 14px; }

	.cap-login-card { padding: 36px 26px 32px; }
	.cap-login-card h2 { font-size: 22px; margin-bottom: 30px; }
}
