/**
 * Dědictví, 3krokový formulář tipu do veřejné ankety.
 * Navazuje stylisticky na rozcestí a hlavní formulář.
 */

/* Přebití WP block theme constraint (is-layout-constrained přidává
   max-width: var(--wp--style--global--content-size) na přímé potomky
   entry-content). Bez toho téma drží formulář v úzkém sloupci. */
.is-layout-constrained > .nkd-tip,
.wp-block-post-content > .nkd-tip,
.entry-content > .nkd-tip,
.nkd-tip {
	max-width: 1100px !important;
	width: 100%;
	margin-left: auto !important;
	margin-right: auto !important;
}

.nkd-tip {
	/* Napojeno na sdílené tokeny (dedictvi-tokens-*.css), hodnoty 1:1. */
	font-family: 'Inter', system-ui, sans-serif;
	color: var(--ded-fe-ink);
	line-height: 1.65;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1rem;
}

/* PROGRESS stepper, podobný jako u hlavního formuláře */
.nkd-tip-progress {
	background: transparent;
	padding: 0.5rem 1rem 1.5rem;
}

.nkd-tip-progress-inner {
	max-width: 460px;
	margin: 0 auto;
}

.nkd-tip-progress-steps {
	display: flex;
	align-items: flex-start;
}

.nkd-tip-step {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}

.nkd-tip-step:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 14px;
	left: calc(50% + 14px);
	right: calc(-50% + 14px);
	height: 1.5px;
	background: var(--ded-fe-border-strong);
	z-index: 0;
}

.nkd-tip-step.completed:not(:last-child)::after {
	background: var(--ded-fe-red);
}

.nkd-tip-step-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1.5px solid var(--ded-fe-border-strong);
	background: var(--ded-fe-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 1;
	transition: all 0.3s;
}

.nkd-tip-step-dot span {
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--ded-fe-muted-strong);
}

.nkd-tip-step.active .nkd-tip-step-dot {
	border-color: var(--ded-fe-red);
	background: var(--ded-fe-red);
	box-shadow: 0 0 0 4px var(--ded-fe-focus-ring);
}

.nkd-tip-step.active .nkd-tip-step-dot span {
	color: var(--ded-fe-white);
}

.nkd-tip-step.completed .nkd-tip-step-dot {
	border-color: var(--ded-fe-red);
	background: var(--ded-fe-red);
}

.nkd-tip-step.completed .nkd-tip-step-dot span {
	color: var(--ded-fe-white);
}

.nkd-tip-step-label {
	display: block;
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--ded-fe-muted-strong);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 0.45rem;
	text-align: center;
}

.nkd-tip-step.active .nkd-tip-step-label {
	color: var(--ded-fe-red);
}

/* PANELY */
.nkd-tip-container {
	max-width: 1100px;
	margin: 0 auto;
}

.nkd-tip-panel {
	display: none;
	animation: nkdTipFadeUp 0.3s ease;
}

.nkd-tip-panel.active {
	display: block;
}

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

/* TYPOGRAFIE */
.nkd-tip-h2 {
	font-size: 1.85rem;
	font-weight: 800;
	line-height: 1.2;
	color: var(--ded-fe-ink);
	margin: 1rem 0 1.5rem;
}

.nkd-tip-h2--center {
	text-align: center;
}

.nkd-tip-sub {
	font-size: 1rem;
	color: var(--ded-fe-ink-soft);
	text-align: center;
	max-width: 580px;
	margin: 0 auto 1.5rem;
	line-height: 1.6;
}

.nkd-tip-intro {
	font-size: 1rem;
	color: var(--ded-fe-ink-soft);
	text-align: center;
	max-width: 580px;
	margin: 0 auto 1.5rem;
	line-height: 1.6;
}

/* PULL QUOTE (krok 1) */
.nkd-tip-pullquote {
	background: var(--ded-fe-white);
	border: 1px solid var(--ded-fe-border);
	border-radius: var(--ded-fe-radius);
	padding: 2rem;
	margin-bottom: 1.5rem;
	position: relative;
}

.nkd-tip-pullquote::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	bottom: 0;
	background: var(--ded-fe-red);
}

.nkd-tip-quote {
	font-size: 1.25rem;
	line-height: 1.5;
	color: var(--ded-fe-ink);
	font-weight: 400;
	font-style: italic;
	margin: 0 0 12px;
}

.nkd-tip-accent {
	color: var(--ded-fe-red);
	font-style: normal;
	font-weight: 600;
}

.nkd-tip-attrib {
	font-size: 0.85rem;
	color: var(--ded-fe-muted);
	margin: 0;
}

.nkd-tip-attrib strong {
	color: var(--ded-fe-ink);
	font-weight: 600;
}

/* DEFINICE */
.nkd-tip-definice {
	background: var(--ded-fe-white);
	border: 1px solid var(--ded-fe-border);
	border-radius: var(--ded-fe-radius);
	padding: 1.75rem 2rem;
	margin-bottom: 1.5rem;
}

.nkd-tip-definice p {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--ded-fe-ink);
	margin: 0 0 12px;
}

.nkd-tip-definice p:last-child {
	margin-bottom: 0;
}

.nkd-tip-definice strong {
	color: var(--ded-fe-red);
	font-weight: 600;
}

/* COMPARE (Ano / Spíš ne) */
.nkd-tip-twocol {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
	margin-bottom: 1.5rem;
}

.nkd-tip-compare {
	background: var(--ded-fe-white);
	border: 1px solid var(--ded-fe-border);
	border-radius: var(--ded-fe-radius);
	padding: 1.5rem 1.5rem 1.25rem;
	position: relative;
}

.nkd-tip-compare::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
}

.nkd-tip-compare--is::before {
	background: var(--ded-fe-red);
}

.nkd-tip-compare--isnt::before {
	background: var(--ded-fe-border-strong);
}

.nkd-tip-compare-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--ded-fe-muted);
	margin: 0 0 12px;
}

.nkd-tip-compare--is .nkd-tip-compare-label {
	color: var(--ded-fe-red);
}

.nkd-tip-compare h3 {
	font-size: 1.3rem;
	font-weight: 700;
	margin: 0 0 12px;
	line-height: 1.2;
	color: var(--ded-fe-ink);
}

.nkd-tip-compare ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.nkd-tip-compare li {
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--ded-fe-ink-soft);
	padding: 10px 0;
	border-bottom: 1px solid var(--ded-fe-border-light);
}

.nkd-tip-compare li:last-child {
	border-bottom: none;
}

.nkd-tip-tag {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ded-fe-accent2);
	margin-right: 8px;
	display: inline-block;
	min-width: 62px;
}

.nkd-tip-tag--trad {
	color: var(--ded-fe-muted);
}

.nkd-tip-why {
	color: var(--ded-fe-muted);
	font-size: 0.85rem;
	display: block;
	margin-top: 3px;
	padding-left: 0;
}

/* PĚT OBLASTÍ grid (krok 1) */
.nkd-tip-areas-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0;
	border: 1px solid var(--ded-fe-border);
	background: var(--ded-fe-border);
	margin-bottom: 1rem;
}

.nkd-tip-area {
	background: var(--ded-fe-white);
	padding: 1.25rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nkd-tip-area-num {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--ded-fe-red);
	line-height: 1;
	margin: 0;
}

.nkd-tip-area-name {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--ded-fe-ink);
	margin: 0;
	line-height: 1.3;
}

.nkd-tip-area-ex {
	font-size: 0.78rem;
	color: var(--ded-fe-muted);
	line-height: 1.5;
	margin: 0;
}

/* RYCHLOTEST (krok 2) */
.nkd-tip-quiz-item {
	background: var(--ded-fe-white);
	border: 1px solid var(--ded-fe-border);
	padding: 1.5rem 1.5rem 1.25rem;
	margin-bottom: 12px;
}

.nkd-tip-quiz-num {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--ded-fe-red);
	line-height: 1;
	margin: 0 0 10px;
}

.nkd-tip-quiz-q {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 6px;
	color: var(--ded-fe-ink);
	line-height: 1.35;
}

.nkd-tip-quiz-help {
	font-size: 0.92rem;
	color: var(--ded-fe-ink-soft);
	margin: 0 0 14px;
	line-height: 1.55;
}

.nkd-tip-quiz-opts {
	display: flex;
	gap: 0;
	border: 1px solid var(--ded-fe-border);
}

.nkd-tip-quiz-opt {
	flex: 1;
	padding: 10px 8px;
	font-size: 0.85rem;
	text-align: center;
	color: var(--ded-fe-ink-soft);
	border: none;
	border-right: 1px solid var(--ded-fe-border);
	background: var(--ded-fe-white);
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s, color 0.15s;
}

.nkd-tip-quiz-opt:last-child {
	border-right: none;
}

.nkd-tip-quiz-opt:hover {
	background: var(--ded-fe-bg);
}

.nkd-tip-quiz-opt.selected {
	background: var(--ded-fe-red-light);
	color: var(--ded-fe-ink);
	font-weight: 600;
}

/* QUIZ AREAS (krok 2, otázka 04 s checkboxovými kartami) */
.nkd-tip-quiz-areas {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	margin-top: 4px;
}

.nkd-tip-quiz-area {
	background: var(--ded-fe-white);
	border: 1px solid var(--ded-fe-border);
	padding: 14px 16px;
	display: flex;
	gap: 14px;
	align-items: flex-start;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.nkd-tip-quiz-area:hover {
	border-color: var(--ded-fe-muted-strong);
}

.nkd-tip-quiz-area.selected {
	background: var(--ded-fe-red-light);
	border-color: var(--ded-fe-red);
}

.nkd-tip-quiz-area-num {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--ded-fe-red);
	line-height: 1;
	min-width: 36px;
	flex-shrink: 0;
}

.nkd-tip-quiz-area-body {
	flex: 1;
}

.nkd-tip-quiz-area-name {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--ded-fe-ink);
	margin: 0 0 3px;
}

.nkd-tip-quiz-area-ex {
	font-size: 0.85rem;
	color: var(--ded-fe-ink-soft);
	margin: 0;
	line-height: 1.5;
}

.nkd-tip-quiz-area-check {
	width: 20px;
	height: 20px;
	border: 1.5px solid var(--ded-fe-border-strong);
	background: var(--ded-fe-white);
	flex-shrink: 0;
	margin-top: 2px;
	position: relative;
}

.nkd-tip-quiz-area.selected .nkd-tip-quiz-area-check {
	background: var(--ded-fe-red);
	border-color: var(--ded-fe-red);
}

.nkd-tip-quiz-area.selected .nkd-tip-quiz-area-check::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 1px;
	width: 6px;
	height: 11px;
	border: solid var(--ded-fe-white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* FORMULÁŘ (krok 3) */
.nkd-tip-form {
	display: block;
}

.nkd-tip-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.nkd-tip-field {
	background: var(--ded-fe-white);
	border: 1px solid var(--ded-fe-border);
	padding: 1.25rem 1.5rem;
	margin-bottom: 10px;
}

.nkd-tip-label {
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--ded-fe-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0 0 6px;
	display: block;
}

.nkd-tip-label-opt {
	font-weight: 400;
	color: var(--ded-fe-muted);
	text-transform: none;
	letter-spacing: 0;
}

.nkd-tip-hint {
	font-size: 0.9rem;
	color: var(--ded-fe-ink-soft);
	margin: 0 0 10px;
	line-height: 1.5;
}

.nkd-tip-input {
	background: var(--ded-fe-input-bg);
	border: 1px solid var(--ded-fe-border-light);
	padding: 10px 14px;
	font-size: 0.95rem;
	color: var(--ded-fe-ink);
	font-family: inherit;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.nkd-tip-input:focus {
	outline: none;
	border-color: var(--ded-fe-red);
	box-shadow: var(--ded-focus);
}

.nkd-tip-textarea {
	resize: vertical;
	min-height: 100px;
	font-family: inherit;
}

.nkd-tip-row {
	display: flex;
	gap: 10px;
}

.nkd-tip-row .nkd-tip-input {
	flex: 1;
}

/* ZPRÁVA */
.nkd-tip-message {
	margin: 1rem 0;
	padding: 12px 16px;
	font-size: 0.9rem;
	display: none;
}

.nkd-tip-message.is-error {
	background: var(--ded-error-bg);
	border-left: 3px solid var(--ded-fe-red);
	color: var(--ded-error);
	display: block;
}

.nkd-tip-message.is-success {
	background: #e8f5e8;
	border-left: 3px solid #5a8a3a;
	color: var(--ded-green);
	display: block;
}

/* NAVIGACE */
.nkd-tip-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--ded-fe-border);
	gap: 1rem;
}

.nkd-tip-nav-info {
	font-size: 0.85rem;
	color: var(--ded-fe-muted);
}

.nkd-tip-btn {
	background: var(--ded-fe-red);
	color: var(--ded-fe-white);
}

.nkd-tip-btn:hover {
	background: var(--ded-fe-red-hover);
}

.nkd-tip-btn--back {
	background: transparent;
	color: var(--ded-fe-muted-strong);
	border: 1px solid var(--ded-fe-border);
}

.nkd-tip-btn--back:hover {
	background: var(--ded-fe-bg);
	color: var(--ded-fe-ink);
}

.nkd-tip-btn--alt {
	background: var(--ded-fe-ink);
	color: var(--ded-fe-white);
	text-decoration: none;
	display: inline-block;
}

.nkd-tip-btn--alt:hover {
	background: #1a1a1a;
}

.nkd-tip-btn--submit:disabled {
	opacity: 0.5;
	cursor: wait;
}

/* DĚKOVNÁ STRÁNKA */
.nkd-tip-thanks {
	background: var(--ded-fe-white);
	border: 1px solid var(--ded-fe-border);
	padding: 2.5rem 2rem;
	text-align: center;
	max-width: 600px;
	margin: 2rem auto;
}

.nkd-tip-thanks h3 {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--ded-fe-red);
	margin: 0 0 1rem;
}

.nkd-tip-thanks p {
	font-size: 1rem;
	color: var(--ded-fe-ink-soft);
	margin: 0 0 1rem;
	line-height: 1.6;
}

.nkd-tip-thanks .nkd-tip-btn--alt {
	margin-top: 1rem;
}

/* RESPONSIVE */
@media (max-width: 720px) {
	.nkd-tip-twocol,
	.nkd-tip-areas-grid {
		grid-template-columns: 1fr;
	}
	.nkd-tip-areas-grid {
		gap: 1px;
	}
	.nkd-tip-quiz-opts {
		flex-wrap: wrap;
	}
	.nkd-tip-quiz-opt {
		flex: 1 1 30%;
		min-width: 30%;
		border-bottom: 1px solid var(--ded-fe-border);
	}
	.nkd-tip-row {
		flex-direction: column;
	}
	.nkd-tip-nav {
		flex-direction: column;
	}
	.nkd-tip-nav .nkd-tip-btn {
		width: 100%;
	}
	.nkd-tip-h2 {
		font-size: 1.5rem;
	}
	.nkd-tip-quote {
		font-size: 1.05rem;
	}
}

/* Souhlasy v tip formuláři */
.nkd-tip-souhlasy {
	background: var(--bg, var(--ded-fe-bg));
	border-radius: 8px;
	padding: 1rem 1.2rem;
}
.nkd-tip-souhlas {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 0.5rem 0;
	cursor: pointer;
	line-height: 1.5;
}
.nkd-tip-souhlas + .nkd-tip-souhlas {
	border-top: 1px solid var(--border, var(--ded-fe-border));
}
.nkd-tip-souhlas input[type="checkbox"] {
	margin-top: 0.2rem;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	accent-color: var(--red, var(--ded-fe-red));
	cursor: pointer;
}
.nkd-tip-souhlas span {
	flex: 1;
	font-size: 0.95rem;
}
