/**
 * BHV sverto diagnostika — mobile-first styles (TZ §16).
 *
 * Scoped under .bhv-svertas so the plugin cannot fight the host theme, and
 * built on CSS custom properties so a site can restyle it without touching
 * this file.
 */

.bhv-svertas {
	--bhv-text: #1d2327;
	--bhv-muted: #50575e;
	--bhv-line: #dcdcde;
	--bhv-bg-soft: #f6f7f7;
	--bhv-accent: #2271b1;
	--bhv-accent-dark: #135e96;
	--bhv-low: #2a7d2e;
	--bhv-medium: #8a6100;
	--bhv-high: #bd6b00;
	--bhv-critical: #b32d2e;
	--bhv-radius: 6px;

	max-width: 780px;
	margin: 0 auto;
	color: var(--bhv-text);
	font-size: 16px;
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
}

.bhv-svertas *,
.bhv-svertas *::before,
.bhv-svertas *::after {
	box-sizing: border-box;
}

.bhv-svertas.bhv--busy {
	opacity: 0.6;
	pointer-events: none;
}

/* ------------------------------------------------------------------ typography */

.bhv-h2 {
	font-size: 1.5rem;
	line-height: 1.25;
	margin: 0 0 0.5rem;
}

.bhv-h3 {
	font-size: 1.15rem;
	margin: 0 0 0.5rem;
}

.bhv-h4 {
	font-size: 1rem;
	margin: 0 0 0.4rem;
}

.bhv-svertas p {
	margin: 0 0 0.85rem;
}

.bhv-hint {
	color: var(--bhv-muted);
	font-size: 0.9rem;
}

.bhv-fineprint {
	color: var(--bhv-muted);
	font-size: 0.82rem;
}

.bhv-warn {
	background: #fcf3e6;
	border-left: 3px solid var(--bhv-high);
	padding: 0.5rem 0.75rem;
	font-size: 0.9rem;
}

.bhv-facts {
	margin: 0 0 1rem;
	padding-left: 1.2rem;
}

.bhv-facts li {
	margin-bottom: 0.25rem;
}

/* ------------------------------------------------------------------- layout */

.bhv-step {
	margin: 0 0 1.5rem;
}

.bhv-block {
	margin: 0 0 2rem;
}

.bhv-note {
	background: var(--bhv-bg-soft);
	border-left: 3px solid var(--bhv-accent);
	padding: 0.75rem 1rem;
	margin: 0 0 1.25rem;
}

.bhv-note p:last-child {
	margin-bottom: 0;
}

.bhv-note--scale {
	border-left-color: var(--bhv-high);
}

.bhv-alert {
	background: #fcebea;
	border-left: 3px solid var(--bhv-critical);
	padding: 0.75rem 1rem;
	margin: 0 0 1rem;
}

.bhv-loading {
	color: var(--bhv-muted);
}

.bhv-status {
	min-height: 1.4em;
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
}

/* ----------------------------------------------------------------- progress */

.bhv-progress {
	margin: 0 0 1.5rem;
}

.bhv-progress__bar {
	background: #e5e5e5;
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
}

.bhv-progress__fill {
	background: var(--bhv-accent);
	height: 100%;
	transition: width 0.25s ease;
}

.bhv-progress__label {
	color: var(--bhv-muted);
	font-size: 0.85rem;
	margin: 0.4rem 0 0;
}

/* ----------------------------------------------------------------- controls */

.bhv-field {
	margin: 0 0 1.1rem;
}

.bhv-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.bhv-input,
.bhv-select,
.bhv-textarea {
	width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--bhv-line);
	border-radius: var(--bhv-radius);
	font: inherit;
	color: inherit;
	background: #fff;
}

.bhv-input--number {
	max-width: 12rem;
}

.bhv-input:focus,
.bhv-select:focus,
.bhv-textarea:focus,
.bhv-btn:focus-visible,
.bhv-radio:focus-visible + .bhv-choice__label {
	outline: 2px solid var(--bhv-accent);
	outline-offset: 2px;
}

.bhv-checkboxes {
	border: 1px solid var(--bhv-line);
	border-radius: var(--bhv-radius);
	padding: 0.75rem 0.9rem;
	margin: 0 0 1.1rem;
}

.bhv-checkboxes__grid {
	display: grid;
	gap: 0.35rem;
}

.bhv-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.3rem 0;
}

.bhv-checkbox input {
	margin-top: 0.3rem;
	flex: 0 0 auto;
	width: 1.05rem;
	height: 1.05rem;
}

/* ---------------------------------------------------------------- questions */

.bhv-question {
	border: 1px solid var(--bhv-line);
	border-radius: var(--bhv-radius);
	padding: 1rem;
	margin: 0 0 1rem;
}

/* `display: block` vienos eilutės klausimui atrodo gerai, bet siaurame
   ekrane legenda lieka ant rėmelio ir antra eilutė iškrenta už kortelės.
   Float + 100 % plotis grąžina legendą į įprastą srautą kortelės viduje. */
.bhv-question__legend {
	font-weight: 600;
	float: left;
	width: 100%;
	padding: 0;
	margin: 0;
}

.bhv-question__counter {
	display: inline-block;
	background: var(--bhv-bg-soft);
	color: var(--bhv-muted);
	border-radius: 999px;
	padding: 0.05rem 0.5rem;
	font-size: 0.78rem;
	font-weight: 600;
	margin-right: 0.4rem;
}

.bhv-choices {
	display: grid;
	gap: 0.5rem;
	margin-top: 0.75rem;
	clear: both;
}

.bhv-choice {
	position: relative;
}

.bhv-radio {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.bhv-choice__label {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	border: 1px solid var(--bhv-line);
	border-radius: var(--bhv-radius);
	padding: 0.6rem 0.75rem;
	cursor: pointer;
	background: #fff;
}

.bhv-radio:checked + .bhv-choice__label {
	border-color: var(--bhv-accent);
	background: #f0f6fc;
	box-shadow: inset 0 0 0 1px var(--bhv-accent);
}

.bhv-choice__value {
	flex: 0 0 auto;
	width: 1.9rem;
	height: 1.9rem;
	border-radius: 50%;
	background: var(--bhv-bg-soft);
	color: var(--bhv-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.bhv-radio:checked + .bhv-choice__label .bhv-choice__value {
	background: var(--bhv-accent);
	color: #fff;
}

.bhv-choice__text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.bhv-choice__text small {
	color: var(--bhv-muted);
	font-size: 0.82rem;
}

/* ---------------------------------------------------------------- processes */

.bhv-process-list {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.bhv-process-list__item {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: space-between;
	align-items: center;
	border: 1px solid var(--bhv-line);
	border-radius: var(--bhv-radius);
	padding: 0.65rem 0.8rem;
	margin-bottom: 0.5rem;
}

.bhv-process-list__actions {
	display: flex;
	gap: 0.5rem;
}

.bhv-process-form {
	border: 1px solid var(--bhv-line);
	border-left: 3px solid var(--bhv-accent);
	border-radius: var(--bhv-radius);
	padding: 1rem;
	margin: 0 0 1rem;
}

/* ------------------------------------------------------------------ buttons */

.bhv-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1.25rem 0 0;
}

.bhv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.6rem 1.2rem;
	border-radius: var(--bhv-radius);
	border: 1px solid transparent;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.bhv-btn--primary {
	background: var(--bhv-accent);
	color: #fff;
}

.bhv-btn--primary:hover {
	background: var(--bhv-accent-dark);
	color: #fff;
}

.bhv-btn--secondary {
	background: #fff;
	color: var(--bhv-accent);
	border-color: var(--bhv-accent);
}

.bhv-btn--ghost {
	background: #fff;
	color: var(--bhv-text);
	border-color: var(--bhv-line);
}

.bhv-btn--link {
	background: none;
	border: none;
	color: var(--bhv-accent);
	min-height: 0;
	padding: 0.2rem 0;
	text-decoration: underline;
}

.bhv-btn--danger {
	color: var(--bhv-critical);
}

/* ------------------------------------------------------------------- result */

.bhv-summary {
	background: var(--bhv-bg-soft);
	border-left: 4px solid var(--bhv-accent);
	padding: 1rem 1.15rem;
	margin: 0 0 1.75rem;
}

.bhv-xray {
	display: grid;
	gap: 0.55rem;
}

.bhv-xray__row {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		"name value"
		"track track"
		"band band";
	gap: 0.2rem 0.5rem;
	align-items: center;
	padding-bottom: 0.55rem;
	border-bottom: 1px solid var(--bhv-line);
}

.bhv-xray__name { grid-area: name; font-weight: 600; }
.bhv-xray__value { grid-area: value; font-weight: 700; font-variant-numeric: tabular-nums; }
.bhv-xray__track { grid-area: track; background: #e5e5e5; height: 10px; border-radius: 999px; overflow: hidden; }
.bhv-xray__band { grid-area: band; color: var(--bhv-muted); font-size: 0.85rem; }

.bhv-xray__fill {
	height: 100%;
	border-radius: 999px;
}

.bhv-band--low { background: var(--bhv-low); }
.bhv-band--medium { background: var(--bhv-medium); }
.bhv-band--high { background: var(--bhv-high); }
.bhv-band--critical { background: var(--bhv-critical); }

.bhv-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: bhv-card;
}

.bhv-card {
	border: 1px solid var(--bhv-line);
	border-radius: var(--bhv-radius);
	padding: 1rem;
	margin: 0 0 0.85rem;
}

.bhv-card p:last-child {
	margin-bottom: 0;
}

.bhv-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.bhv-tag {
	display: inline-block;
	background: var(--bhv-bg-soft);
	border: 1px solid var(--bhv-line);
	border-radius: 999px;
	padding: 0.12rem 0.6rem;
	font-size: 0.82rem;
	font-weight: 600;
}

.bhv-tag--quick_win { background: #edf7ed; border-color: var(--bhv-low); color: #1c5c20; }
.bhv-tag--strategic { background: #f0f6fc; border-color: var(--bhv-accent); color: var(--bhv-accent-dark); }
.bhv-tag--later { background: var(--bhv-bg-soft); }
.bhv-tag--low_value { background: #f6f7f7; color: var(--bhv-muted); }

.bhv-plan {
	display: grid;
	gap: 1rem;
}

.bhv-plan__column ul {
	margin: 0;
	padding-left: 1.2rem;
}

.bhv-plan__column li {
	margin-bottom: 0.35rem;
}

.bhv-cta {
	border: 1px solid var(--bhv-line);
	border-radius: var(--bhv-radius);
	padding: 1.1rem;
	background: var(--bhv-bg-soft);
}

.bhv-email-form__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.bhv-email-form__row .bhv-input {
	flex: 1 1 14rem;
}

/* ---------------------------------------------------------------- >= 640px */

@media (min-width: 640px) {
	.bhv-h2 { font-size: 1.75rem; }

	.bhv-choices {
		grid-template-columns: repeat(3, 1fr);
	}

	.bhv-xray__row {
		grid-template-columns: 12rem 1fr 4rem 9rem;
		grid-template-areas: "name track value band";
	}

	.bhv-plan {
		grid-template-columns: repeat(3, 1fr);
	}

	.bhv-checkboxes__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------------------------------------------------- reduced motion / print */

@media (prefers-reduced-motion: reduce) {
	.bhv-progress__fill {
		transition: none;
	}
}

@media print {
	.bhv-progress,
	.bhv-actions,
	.bhv-email-form {
		display: none;
	}
}
