/* ==========================================================================
   PyCentric Decision Tree Component
   Rendered inside #pyc-decision-tree container.
   ========================================================================== */

.pyc-tree-wrap {
	transition: opacity 0.25s ease;
	flex: 1;
	display: flex;
}

.pyc-tree-inner {
	background: var(--pyc-card, #1a1a2e);
	border: 1px solid var(--pyc-border, rgba(255, 255, 255, 0.08));
	border-radius: 14px;
	padding: 2rem;
	position: relative;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	width: 100%;
	display: flex;
	flex-direction: column;
}

/* Progress */
.pyc-tree-progress {
	margin-bottom: 1.5rem;
}

.pyc-tree-progress-label {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--pyc-muted, #888);
	margin-bottom: 0.5rem;
}

.pyc-tree-progress-bar {
	height: 4px;
	background: var(--pyc-border, rgba(255, 255, 255, 0.08));
	border-radius: 2px;
	overflow: hidden;
}

.pyc-tree-progress-fill {
	height: 100%;
	background: var(--pyc-accent, #8b5cf6);
	border-radius: 2px;
	transition: width 0.35s ease;
}

/* Question */
.pyc-tree-question {
	font-size: 1.375rem;
	font-weight: 650;
	color: var(--pyc-heading, #fff);
	margin: 0 0 1.25rem;
	line-height: 1.3;
}

/* Options */
.pyc-tree-options {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.pyc-tree-option {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	width: 100%;
	padding: 1rem 1.125rem;
	background: var(--pyc-bg, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--pyc-border, rgba(255, 255, 255, 0.08));
	border-radius: 10px;
	cursor: pointer;
	text-align: left;
	color: var(--pyc-text, #ddd);
	font-family: inherit;
	font-size: 0.9375rem;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	min-height: 58px;
}

.pyc-tree-option:hover {
	border-color: var(--pyc-accent, #8b5cf6);
	background: var(--pyc-surface-hover, rgba(139, 92, 246, 0.08));
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.pyc-tree-option:focus-visible {
	outline: 2px solid var(--pyc-accent, #8b5cf6);
	outline-offset: 2px;
}

.pyc-tree-option:active {
	transform: translateY(0);
}

.pyc-tree-option-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	min-width: 42px;
	border-radius: 8px;
	background: var(--pyc-card-glow, rgba(255, 255, 255, 0.04));
	color: var(--pyc-accent, #8b5cf6);
}

.pyc-tree-option-text {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	flex: 1;
	min-width: 0;
}

.pyc-tree-option-label {
	font-weight: 550;
	color: var(--pyc-heading, #fff);
	line-height: 1.3;
	font-size: 1rem;
}

.pyc-tree-option-desc {
	font-size: 0.8125rem;
	color: var(--pyc-muted, #888);
	line-height: 1.35;
}

.pyc-tree-option-arrow {
	color: var(--pyc-muted, #666);
	flex-shrink: 0;
	transition: color 0.2s ease, transform 0.2s ease;
}

.pyc-tree-option:hover .pyc-tree-option-arrow {
	color: var(--pyc-accent, #8b5cf6);
	transform: translateX(4px);
}

/* Back button */
.pyc-tree-back {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	margin-top: 1.25rem;
	padding: 0.5rem 0.875rem;
	background: none;
	border: 1px solid var(--pyc-border, rgba(255, 255, 255, 0.08));
	border-radius: 6px;
	color: var(--pyc-muted, #888);
	font-family: inherit;
	font-size: 0.8125rem;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.pyc-tree-back:hover {
	color: var(--pyc-text, #ddd);
	border-color: var(--pyc-muted, #555);
}

/* Result card */
.pyc-tree-result {
	text-align: center;
	padding: 2.25rem 1.75rem;
}

.pyc-tree-result-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.875rem;
	background: rgba(34, 197, 94, 0.1);
	border: 1px solid rgba(34, 197, 94, 0.25);
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 500;
	color: #22c55e;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 1.25rem;
}

.pyc-tree-result-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--pyc-heading, #fff);
	margin: 0 0 0.75rem;
	line-height: 1.25;
}

.pyc-tree-result-body {
	font-size: 0.9375rem;
	color: var(--pyc-text, #ccc);
	line-height: 1.65;
	margin: 0 auto 1.5rem;
	max-width: 480px;
}

.pyc-tree-result-actions {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 1.25rem;
}

.pyc-tree-cta {
	min-width: 180px;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	font-size: 0.9375rem;
}

.pyc-tree-restart {
	margin-top: 0;
	opacity: 0.5;
}

.pyc-tree-restart:hover {
	opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
	.pyc-tree-inner {
		padding: 1.25rem;
		border-radius: 10px;
	}

	.pyc-tree-question {
		font-size: 1.125rem;
		margin-bottom: 1.25rem;
	}

	.pyc-tree-option {
		padding: 0.875rem;
		min-height: 56px;
	}

	.pyc-tree-option-icon {
		width: 38px;
		height: 38px;
		min-width: 38px;
	}

	.pyc-tree-option-label {
		font-size: 0.9375rem;
	}

	.pyc-tree-option-desc {
		font-size: 0.75rem;
	}

	.pyc-tree-result {
		padding: 1.75rem 1.25rem;
	}

	.pyc-tree-result-title {
		font-size: 1.25rem;
	}

	.pyc-tree-result-actions {
		flex-direction: column;
	}

	.pyc-tree-cta {
		width: 100%;
	}
}

@media (min-width: 768px) {
	.pyc-tree-options {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.75rem;
	}

	.pyc-tree-options .pyc-tree-option:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.pyc-tree-inner {
		padding: 2.25rem;
	}

	.pyc-tree-options {
		grid-template-columns: 1fr;
		gap: 0.625rem;
	}

	.pyc-tree-option {
		padding: 1.125rem 1.375rem;
	}
}
