/* ==========================================================================
   NW Výkup vozidla – formulár + lístok do bočného panela
   Farby sú premenné, aby sa dali preladiť bez zásahu do pluginu.
   ========================================================================== */

.nwv-wrap,
.nwv-card {
	--nwv-blue: #0e3b63;
	--nwv-blue-dark: #092a48;
	--nwv-red: #ce161e;
	--nwv-line: #0e3b63;
	--nwv-muted: #8a95a3;
	--nwv-radius: 14px;
}

.nwv-wrap {
	max-width: 980px;
	margin: 0 auto;
	color: var(--nwv-blue);
}

.nwv-title {
	margin: 0 0 40px;
	font-size: clamp(28px, 3.4vw, 42px);
	font-weight: 600;
	line-height: 1.15;
	color: var(--nwv-blue);
}

/* ---------- sekcie ---------- */
.nwv-fieldset {
	border: 0;
	padding: 0;
	margin: 0 0 42px;
}
.nwv-legend {
	padding: 0;
	margin: 0 0 22px;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .01em;
	color: var(--nwv-blue);
}

/* ---------- mriežka polí ---------- */
.nwv-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px 44px;
}
.nwv-field--wide {
	grid-column: 1 / -1;
}

.nwv-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* popisku nesie placeholder – label ostáva pre čítačky obrazovky */
.nwv-label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.nwv-req {
	color: var(--nwv-red);
}

/* ---------- linkové polia ---------- */
.nwv-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 2px 12px;
	font-size: 17px;
	font-family: inherit;
	line-height: 1.4;
	color: var(--nwv-blue);
	background: transparent;
	border: 0;
	border-bottom: 1.5px solid var(--nwv-line);
	border-radius: 0;
	transition: border-color .15s ease, box-shadow .15s ease;
	appearance: none;
}
textarea.nwv-input {
	min-height: 150px;
	resize: vertical;
	line-height: 1.6;
}
.nwv-input::placeholder {
	color: var(--nwv-muted);
	opacity: 1;
	/* VIN sa píše veľkými písmenami, ale placeholder má zostať normálny */
	text-transform: none;
}
.nwv-input:hover {
	border-bottom-color: var(--nwv-blue-dark);
}
.nwv-input:focus {
	outline: 0;
	border-bottom-width: 2.5px;
	border-bottom-color: var(--nwv-blue);
}

/* číselné polia bez spinnerov */
.nwv-input[type="number"] {
	-moz-appearance: textfield;
}
.nwv-input[type="number"]::-webkit-outer-spin-button,
.nwv-input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.nwv-hint {
	margin-top: 8px;
	font-size: 12.5px;
	color: var(--nwv-muted);
}

/* ---------- chyby ---------- */
.nwv-error {
	display: none;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 500;
	color: var(--nwv-red);
}
.nwv-field.is-invalid .nwv-error {
	display: block;
}
.nwv-field.is-invalid .nwv-input {
	border-bottom-color: var(--nwv-red);
}
.nwv-field.is-invalid .nwv-input::placeholder {
	color: #d98b8f;
}

/* ---------- fotky ---------- */
.nwv-drop {
	position: relative;
}
.nwv-file {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}
.nwv-drop-label {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 24px 26px;
	border: 1.5px dashed rgba(14, 59, 99, .45);
	border-radius: var(--nwv-radius);
	background: transparent;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}
.nwv-drop-label:hover,
.nwv-drop.is-dragover .nwv-drop-label {
	border-color: var(--nwv-blue);
	background: rgba(14, 59, 99, .04);
}
.nwv-file:focus-visible + .nwv-drop-label {
	outline: 2px solid var(--nwv-blue);
	outline-offset: 3px;
}
.nwv-drop-icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--nwv-blue);
	color: #fff;
	font-size: 24px;
	line-height: 1;
}
.nwv-drop-text strong {
	display: block;
	font-size: 16px;
	font-weight: 600;
	color: var(--nwv-blue);
}
.nwv-drop-text small {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--nwv-muted);
}

.nwv-previews {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 16px;
}
.nwv-previews:empty {
	margin-top: 0;
}
.nwv-thumb {
	position: relative;
	width: 112px;
	height: 112px;
	border-radius: 12px;
	overflow: hidden;
	background: #eef2f7;
}
.nwv-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.nwv-thumb-remove {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 26px;
	height: 26px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 0;
}
.nwv-thumb-remove:hover {
	background: var(--nwv-red);
}

/* ---------- súhlas ---------- */
.nwv-consent {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 34px;
	font-size: 16px;
	line-height: 1.5;
	color: var(--nwv-blue);
	cursor: pointer;
}
.nwv-consent input {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	margin: 0;
	border: 1.5px solid rgba(14, 59, 99, .35);
	border-radius: 8px;
	background: #fff;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: background .15s ease, border-color .15s ease;
}
.nwv-consent input:checked {
	background: var(--nwv-blue);
	border-color: var(--nwv-blue);
}
.nwv-consent input:checked::after {
	content: '';
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg) translate(-1px, -1px);
}
.nwv-consent input:focus-visible {
	outline: 2px solid var(--nwv-blue);
	outline-offset: 2px;
}
.nwv-consent a {
	color: var(--nwv-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.nwv-consent.is-invalid {
	color: var(--nwv-red);
}
.nwv-consent.is-invalid input {
	border-color: var(--nwv-red);
}

/* ---------- odoslanie ---------- */
.nwv-actions {
	display: flex;
	align-items: center;
	gap: 22px;
	flex-wrap: wrap;
}
.nwv-submit {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 64px;
	padding: 0 44px;
	border: 0;
	border-radius: 999px;
	background: var(--nwv-blue);
	color: #fff;
	font-family: inherit;
	font-size: 19px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, transform .1s ease;
}
.nwv-submit:hover {
	background: var(--nwv-blue-dark);
}
.nwv-submit:active {
	transform: translateY(1px);
}
.nwv-submit[disabled] {
	opacity: .65;
	cursor: default;
}

.nwv-spinner {
	display: none;
	width: 17px;
	height: 17px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: nwv-spin .7s linear infinite;
}
.nwv-form.is-sending .nwv-spinner {
	display: block;
}
@keyframes nwv-spin {
	to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
	.nwv-spinner { animation-duration: 2s; }
}

.nwv-note {
	margin: 0;
	font-size: 13px;
	color: var(--nwv-muted);
}

/* ---------- hlášky ---------- */
.nwv-alert {
	margin-top: 22px;
	padding: 15px 20px;
	border-radius: var(--nwv-radius);
	background: #fdeaea;
	border: 1px solid #f3c2c4;
	color: #8f1016;
	font-size: 14.5px;
	line-height: 1.5;
}

.nwv-success {
	text-align: center;
	padding: 60px 24px;
}
.nwv-success-icon {
	width: 66px;
	height: 66px;
	margin: 0 auto 22px;
	border-radius: 50%;
	background: var(--nwv-blue);
	color: #fff;
	font-size: 30px;
	display: grid;
	place-items: center;
}
.nwv-success h3 {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 600;
	color: var(--nwv-blue);
}
.nwv-success p {
	margin: 0 auto;
	max-width: 460px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--nwv-muted);
}

/* honeypot */
.nwv-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ==========================================================================
   Lístok „Vykúpime vaše vozidlo" do bočného panela
   ========================================================================== */
.nwv-card {
	position: relative;
	overflow: hidden;
	padding: 28px 26px 30px;
	border-radius: 20px;
	background: var(--nwv-blue);
	color: #fff;
	box-shadow: 0 18px 40px rgba(14, 59, 99, .18);
}

/* jemný kruh v pozadí, aby lístok nebol plochá plocha */
.nwv-card::after {
	content: '';
	position: absolute;
	right: -70px;
	top: -70px;
	width: 190px;
	height: 190px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .07);
	pointer-events: none;
}

.nwv-card-badge {
	position: relative;
	display: inline-block;
	margin-bottom: 14px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--nwv-red);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
}

.nwv-card-title {
	position: relative;
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.22;
	color: #fff;
}

.nwv-card-text {
	position: relative;
	margin: 0 0 22px;
	font-size: 14.5px;
	line-height: 1.6;
	color: rgba(255, 255, 255, .82);
}

.nwv-card-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 52px;
	padding: 0 8px 0 24px;
	border-radius: 999px;
	background: #fff;
	color: var(--nwv-blue);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s ease, transform .15s ease;
}
.nwv-card-btn:hover {
	background: #eef3f8;
	transform: translateY(-1px);
	color: var(--nwv-blue);
}
.nwv-card-arrow {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--nwv-blue);
	color: #fff;
	transition: transform .15s ease;
}
.nwv-card-btn:hover .nwv-card-arrow {
	transform: rotate(45deg);
}

/* ==========================================================================
   Vertikálna záložka prilepená na pravý okraj obrazovky
   Zatvorená je vidieť len zvislý pásik; na hover (alebo klik na dotyku)
   sa vysunie celá karta.
   ========================================================================== */
.nwv-tab {
	--nwv-blue: #0e3b63;
	--nwv-blue-dark: #092a48;
	--nwv-red: #ce161e;
	--nwv-tab-width: 320px;

	position: fixed;
	top: 50%;
	right: 0;
	z-index: 9990;
	display: flex;
	align-items: stretch;
	transform: translate(var(--nwv-tab-width), -50%);
	transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}

/* vysunutie */
.nwv-tab:hover,
.nwv-tab:focus-within,
.nwv-tab.is-open {
	transform: translate(0, -50%);
}

/* ---------- úchyt ---------- */
.nwv-tab-handle {
	flex: 0 0 auto;
	align-self: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 52px;
	padding: 22px 0;
	border: 0;
	border-radius: 14px 0 0 14px;
	background: var(--nwv-red);
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: -6px 0 22px rgba(14, 59, 99, .22);
	transition: background .15s ease;
}
.nwv-tab-handle:hover {
	background: #b1121a;
}
.nwv-tab-handle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -5px;
}

.nwv-tab-handle-text {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	white-space: nowrap;
	line-height: 1;
}

.nwv-tab-handle-icon {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	flex: 0 0 auto;
}

/* ---------- vysúvaný panel ---------- */
.nwv-tab-panel {
	flex: 0 0 auto;
	width: var(--nwv-tab-width);
	box-sizing: border-box;
}
.nwv-tab-panel .nwv-card {
	border-radius: 20px 0 0 20px;
	height: 100%;
	box-shadow: -10px 0 40px rgba(14, 59, 99, .25);
}

@media (prefers-reduced-motion: reduce) {
	.nwv-tab {
		transition-duration: .01ms;
	}
}

/* ---------- mobil ---------- */
@media (max-width: 680px) {
	.nwv-grid {
		grid-template-columns: 1fr;
		gap: 26px;
	}
	.nwv-title {
		margin-bottom: 30px;
	}
	.nwv-drop-label {
		padding: 18px;
		gap: 14px;
	}
	.nwv-submit {
		width: 100%;
		justify-content: center;
		min-height: 58px;
		font-size: 17px;
	}
	.nwv-thumb {
		width: calc(33.333% - 8px);
		height: auto;
		aspect-ratio: 1;
	}
	.nwv-card {
		padding: 24px 22px 26px;
	}
	.nwv-card-title {
		font-size: 21px;
	}

	/* záložka: užší panel, aby na telefóne nezakryla celú obrazovku */
	.nwv-tab {
		--nwv-tab-width: min(300px, calc(100vw - 60px));
		top: auto;
		bottom: 90px;
		transform: translate(var(--nwv-tab-width), 0);
	}
	.nwv-tab:hover,
	.nwv-tab:focus-within,
	.nwv-tab.is-open {
		transform: translate(0, 0);
	}
	.nwv-tab-handle {
		width: 34px;
		gap: 8px;
		padding: 14px 0;
		border-radius: 10px 0 0 10px;
		font-size: 9.5px;
		letter-spacing: .06em;
		box-shadow: -4px 0 14px rgba(14, 59, 99, .18);
	}
	.nwv-tab-handle-icon {
		width: 18px;
		height: 18px;
	}
	.nwv-tab-handle-icon svg {
		width: 15px;
		height: 15px;
	}
}
