/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after { content: ""; content: none; }
table { border-collapse: collapse; border-spacing: 0; }

*:focus { outline: none; }

/* ********** Fonts ********** */

@font-face {
	font-family: "Kia";
	src: url("fonts/DesignKB.woff") format("woff"),
		url("fonts/DesignKB.ttf") format("truetype");
	font-weight: bold;
	font-style: normal;
}
@font-face {
	font-family: "Kia";
	src: url("fonts/DesignKM.woff") format("woff"),
		url("fonts/DesignKM.ttf") format("truetype");
	font-weight: normal;
	font-style: normal;
}
@font-face {
	font-family: "Kia";
	src: url("fonts/DesignKL.woff") format("woff"),
		url("fonts/DesignKL.ttf") format("truetype");
	font-weight: 300;
	font-style: normal;
}

/* ********** SimpleBar (boilerplate, bez zmian) ********** */

[data-simplebar] {
	position: relative;
	flex-direction: column;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-content: flex-start;
	align-items: flex-start;
	width: inherit; height: inherit;
	max-width: inherit; max-height: inherit;
}
.simplebar-wrapper { overflow: hidden; width: inherit; height: inherit; max-width: inherit; max-height: inherit; }
.simplebar-mask { direction: inherit; position: absolute; overflow: hidden; padding: 0; margin: 0; left: 0; top: 0; bottom: 0; right: 0; width: auto !important; height: auto !important; z-index: 0; }
.simplebar-offset { direction: inherit !important; box-sizing: inherit !important; resize: none !important; position: absolute; top: 0; left: 0; bottom: 0; right: 0; padding: 0; margin: 0; -webkit-overflow-scrolling: touch; }
.simplebar-content { direction: inherit; box-sizing: border-box !important; position: relative; display: block; height: 100%; width: auto; visibility: visible; overflow: scroll; max-width: 100%; max-height: 100%; }
.simplebar-placeholder { max-height: 100%; max-width: 100%; width: 100%; pointer-events: none; }
.simplebar-height-auto-observer-wrapper { box-sizing: inherit !important; height: 100%; width: inherit; max-width: 1px; position: relative; float: left; max-height: 1px; overflow: hidden; z-index: -1; padding: 0; margin: 0; pointer-events: none; flex-grow: inherit; flex-shrink: 0; flex-basis: 0; }
.simplebar-height-auto-observer { box-sizing: inherit; display: block; opacity: 0; position: absolute; top: 0; left: 0; height: 1000%; width: 1000%; min-height: 1px; min-width: 1px; overflow: hidden; pointer-events: none; z-index: -1; }
.simplebar-track { z-index: 1; position: absolute; right: 0; bottom: 0; pointer-events: none; }
.simplebar-scrollbar { position: absolute; right: 2px; width: 10px; min-height: 10px; }
.simplebar-scrollbar:before { position: absolute; content: ""; background: black; border-radius: 10px; left: 0; right: 0; opacity: 0; transition: opacity 0.2s linear; }
.simplebar-track .simplebar-scrollbar.simplebar-visible:before { opacity: 0.5; transition: opacity 0s linear; }
.simplebar-track.simplebar-vertical { top: 0; width: 16px; }
.simplebar-track.simplebar-vertical .simplebar-scrollbar:before { top: 2px; bottom: 2px; }
.simplebar-track.simplebar-horizontal { left: 0; height: 16px; }
.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before { height: 100%; left: 2px; right: 2px; }
.simplebar-track.simplebar-horizontal .simplebar-scrollbar { right: auto; left: 0; top: 2px; height: 10px; min-height: 0; min-width: 10px; width: auto; }
[data-simplebar-direction="rtl"] .simplebar-track.simplebar-vertical { right: auto; left: 0; }
.hs-dummy-scrollbar-size { direction: rtl; position: fixed; opacity: 0; visibility: hidden; height: 500px; width: 500px; overflow-y: hidden; overflow-x: scroll; }

/* ********** Base ********** */

:root {
	font-size: 22px; /* jedna dźwignia do skalowania całości */
}

html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }

body {
	font-size: 1rem;
	font-family: "Kia", sans-serif;
	color: #05141f;
	background-color: #ffffff;
	line-height: 1.3;

	/* Kiosk UX */
	cursor: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
	touch-action: manipulation;
	overscroll-behavior: none;
	-webkit-touch-callout: none;
}

input[type="text"],
input[type="email"],
.popup__text,
.select2-search__field {
	-webkit-user-select: text;
	user-select: text;
}

/* ********** Layout ********** */

.header__container {
	width: 1800px;
	max-width: calc(100vw - 80px);
	margin: 0 auto;
	padding: 24px 0 64px 0;
}

.header__title h1 {
	font-size: 2.4rem;
	text-transform: uppercase;
	font-weight: bold;
	margin: 0 0 18px 0;
}

.header__content p { line-height: 1.45; }
.header__content ul { line-height: 1.4; list-style-type: disclosure-closed; margin: 10px 0 0 0; }
.header__content ul li { margin-left: 24px; line-height: 1.45; }

/* ********** Form ********** */

.form {
	border: 0;
	padding: 0;
	margin: 0;
	position: relative;
	background-color: #ffffff;
}

.form__item {
	display: flex;
	justify-content: space-between;
	gap: 32px;
	margin: 32px 0 0 0;
	position: relative;
}

.form__item-container {
	flex: 1 1 0;
	min-width: 0;
}

.form__item-container--single {
	width: 100%;
	flex: 1 1 100%;
}

.form__input--text {
	width: 100%;
	border: 2px #c8c8c8 solid;
	padding: 22px 28px;
	font-family: "Kia", sans-serif;
	color: #06141f;
	font-size: 1.05rem;
	background-color: #ffffff;
	line-height: 1.3;
}

.form__input--text::placeholder {
	color: #6a6a6a;
	opacity: 1;
}

.form__error {
	color: #ffffff;
	font-size: 0.8rem;
	margin-top: 0.6em;
	position: absolute;
	z-index: 1;
	background: #ea0029;
	padding: 0.6em 1.1em;
	display: none;
	line-height: 1.3;
}

.form__error::before {
	content: '';
	display: block;
	position: absolute;
	top: -0.5em;
	left: 0.5em;
	width: 0;
	height: 0;
	border-left: 0.5em solid transparent;
	border-right: 0.5em solid transparent;
	border-bottom: 0.5em solid #ea0029;
}

.form__submit-container {
	text-align: center;
	margin-top: 16px;
}

.form__submit {
	background-color: #06141f;
	padding: 26px 96px 26px 72px;
	border: 0;
	color: #fff;
	font-family: "Kia", sans-serif;
	text-transform: uppercase;
	font-size: 1.25rem;
	font-weight: bold;
	letter-spacing: 0.04em;
	margin: 28px auto;
	background: url(arrow-right.svg) #06141f no-repeat;
	background-position: right 28px center;
	background-size: 28px auto;
	min-width: 340px;
}

.form__submit:active { background-color: #1a2a36; }

.form__description {
	margin: 22px 0;
	color: #06141f;
	font-size: 0.8rem;
	line-height: 1.4;
}

.form__label { font-size: 0.8rem; vertical-align: middle; padding: 6px; }

.form__disclaimer {
	margin: 32px 0 0 0;
	color: #06141f;
	font-size: 0.8rem;
	line-height: 1.45;
}

.form__disclaimer a { color: #06141f; }
.form__disclaimer a:hover { text-decoration: none; }

/* ********** Select2 — AGRESYWNIE z !important ********** */

/* Szerokość 100% tylko wewnątrz formularza (nie dropdownu na body) */
.form .select2-container {
	width: 100% !important;
	max-width: 100% !important;
}

/* Widoczny pasek selecta */
.select2-container--kia .select2-selection--single,
.select2-container .select2-selection--single {
	font-family: "Kia", sans-serif !important;
	font-weight: 400 !important;
	font-size: 1.05rem !important;
	border: 2px solid #c8c8c8 !important;
	padding: 22px 28px !important;
	height: auto !important;
	min-height: 74px !important;
	color: #06141f !important;
	background-color: #ffffff !important;
	line-height: 1.3 !important;
	display: flex !important;
	align-items: center !important;
	cursor: pointer !important;
}

.select2-container--disabled .select2-selection {
	color: #bbbbbb !important;
	background-color: #fafafa !important;
}

.form__item-container--model .select2-selection {
	color: #06141f !important;
	background-color: #ffffff !important;
}

/* Tekst wewnątrz selecta + strzałka */
.select2-container--kia .select2-selection--single .select2-selection__rendered,
.select2-container .select2-selection--single .select2-selection__rendered {
	padding: 0 56px 0 0 !important;
	font-size: 1.05rem !important;
	line-height: 1.3 !important;
	color: inherit !important;
	width: 100% !important;
	height: auto !important;
	background: url("caret-down.svg") no-repeat right center !important;
	background-size: 28px auto !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

/* Placeholder w selekcie */
.select2-selection .select2-selection__placeholder,
.select2-container--kia .select2-selection__placeholder {
	color: #6a6a6a !important;
	font-size: 1.05rem !important;
}

/* Ukrywamy natywną strzałkę — używamy tylko SVG z backgroundu */
.select2-container--kia .select2-selection__arrow,
.select2-container .select2-selection__arrow {
	display: none !important;
}

/* Dropdown list (na body) */
.select2-dropdown {
	border: 2px solid #c8c8c8 !important;
	font-family: "Kia", sans-serif !important;
	font-size: 1.05rem !important;
}

.select2-results__options {
	max-height: 520px !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	font-size: 1.05rem !important;
	-webkit-overflow-scrolling: touch !important;
	touch-action: pan-y !important;
	overscroll-behavior: contain !important;
}

/* Gruby scrollbar na liście — łatwiejszy do złapania palcem */
.select2-results__options::-webkit-scrollbar {
	width: 14px;
}
.select2-results__options::-webkit-scrollbar-track {
	background: #f0f0f0;
}
.select2-results__options::-webkit-scrollbar-thumb {
	background: #c8c8c8;
	border-radius: 10px;
}
.select2-results__options::-webkit-scrollbar-thumb:active {
	background: #06141f;
}

.select2-results__option,
.select2-container--kia .select2-results__option {
	padding: 18px 28px !important;
	line-height: 1.35 !important;
	min-height: 62px !important;
	display: flex !important;
	align-items: center !important;
	font-size: 1.05rem !important;
	touch-action: manipulation !important;
}

.select2-container--kia .select2-results__option--highlighted,
.select2-results__option--highlighted[aria-selected] {
	background: #d0d3d5 !important;
	color: #06141f !important;
}

.select2-container--kia .select2-results__option--disabled,
.select2-results__option[aria-disabled="true"] {
	text-decoration: line-through !important;
	color: #bbbbbb !important;
}

.select2-results__option--selected[aria-selected="true"] {
	background-color: #f0f0f0 !important;
}

/* Pole wyszukiwania w dropdownie */
.select2-search--dropdown .select2-search__field {
	font-size: 1.05rem !important;
	padding: 16px 20px !important;
	border: 2px solid #c8c8c8 !important;
	font-family: "Kia", sans-serif !important;
}

/* ********** Thankyou overlay — pojawia się po submicie, znika sam ********** */

.thankyou__overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 300;
	background: rgba(255, 255, 255, 0.97);
	align-items: center;
	justify-content: center;
	padding: 40px;
	cursor: none;
}

.thankyou__overlay--visible {
	display: flex;
	animation: thankyouFadeIn 0.35s ease-out;
}

@keyframes thankyouFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.thankyou__box {
	max-width: 1100px;
	width: 100%;
	text-align: center;
	padding: 80px 60px;
	border: 2px solid #c8c8c8;
	background-color: #ffffff;
}

.thankyou__title {
	font-size: 2.4rem;
	font-weight: bold;
	color: #06141f;
	margin: 0 0 28px 0;
	line-height: 1.25;
}

.thankyou__text {
	font-size: 1.25rem;
	line-height: 1.5;
	color: #06141f;
	margin: 0 0 56px 0;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 56px;
}

.thankyou__countdown {
	font-size: 0.95rem;
	color: #6a6a6a;
	line-height: 1.4;
	margin: 0;
}

.thankyou__seconds {
	display: inline-block;
	min-width: 1.2em;
	font-weight: bold;
	color: #06141f;
}

/* Stary .thankyou zachowany na wypadek gdyby send.php renderował normalny thankyou fallback */
.thankyou {
	border: 2px #c8c8c8 solid;
	padding: 140px 56px 220px 56px;
	margin: 48px 0 0 0;
}
.thankyou p { text-align: center; font-size: 1.35rem; line-height: 1.4; }
.thankyou .header__title { padding-bottom: 40px; text-align: center; }
.thankyou .header__title h1 { font-size: 1.5rem; text-transform: none; font-weight: normal; }

/* ********** Regulations ********** */

.regulations__entry {
	margin: 22px 0;
	font-size: 0.85rem;
	line-height: 1.5;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.regulations__icon {
	font-size: 1.1rem;
	color: inherit;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #06141f;
	border-radius: 50%;
	width: 56px;
	height: 56px;
	line-height: 1;
	margin: 0 4px;
	font-weight: bold;
	flex-shrink: 0;
}

.regulations__icon::after { content: "i"; display: block; }
.regulations__icon:active { background-color: #06141f; color: #ffffff; }

/* ********** Popup — fixed overlay z backdropem, natywny scroll ********** */

.popup__wrapper {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 255;
	background: rgba(6, 20, 31, 0.55);
	padding: 40px;
}

.popup__close {
	position: fixed;
	top: 40px;
	right: 40px;
	font-size: 1.2rem;
	color: inherit;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #06141f;
	border-radius: 50%;
	width: 64px;
	height: 64px;
	line-height: 1;
	font-weight: bold;
	z-index: 256;
	background-color: #ffffff;
}

.popup__close::after { content: "✕"; display: block; }
.popup__close:active { background-color: #06141f; color: #ffffff; }

.popup__content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: white;
	border: 2px solid #c8c8c8;
	padding: 72px 80px 56px 80px;
	box-shadow: rgba(0, 0, 0, 0.35) 0px 12px 40px;
	width: min(1200px, calc(100vw - 80px));
	max-width: calc(100vw - 80px);
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
}

/* popup__scroll teraz jest zwykłym wrapperem — bez simplebar, bez własnej szerokości */
.popup__scroll {
	width: 100%;
	max-width: 100%;
}

.popup__text {
	line-height: 1.55;
	font-size: 0.95rem;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

/* Gruby natywny scrollbar w popupie — lepszy dla dotyku */
.popup__content::-webkit-scrollbar {
	width: 14px;
}
.popup__content::-webkit-scrollbar-track {
	background: #f0f0f0;
}
.popup__content::-webkit-scrollbar-thumb {
	background: #c8c8c8;
	border-radius: 10px;
}
.popup__content::-webkit-scrollbar-thumb:active {
	background: #06141f;
}

/* ********** Custom checkbox ********** */

.form__label--legal {
	padding: 0;
	display: block;
	cursor: pointer;
}

.form__label--legal-text {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 20px;
	padding: 0 20px 0 0;
	line-height: 1.45;
	font-size: 0.85rem;
}

.form__checkbox--legal {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	pointer-events: none;
}

.form__checkbox--legal-box {
	display: inline-block;
	width: 40px;
	height: 40px;
	min-width: 40px;
	border: 2px solid #06141f;
	background-color: #ffffff;
	position: relative;
	flex-shrink: 0;
	margin-top: 2px;
	transition: background-color 0.12s linear;
}

.form__checkbox--legal:checked + .form__checkbox--legal-box {
	background-color: #06141f;
}

.form__checkbox--legal:checked + .form__checkbox--legal-box::after {
	content: "";
	position: absolute;
	top: 6px;
	left: 12px;
	width: 12px;
	height: 22px;
	border: solid #ffffff;
	border-width: 0 4px 4px 0;
	transform: rotate(45deg);
}

.form__label--legal p { flex: 1; }

/* ********** Tooltip ********** */

.tooltip {
	display: none;
	position: absolute;
	top: 0;
	right: 0;
	background-color: #fafafa;
	padding: 14px;
	color: #06141f;
	border-radius: 10px;
	border: 2px #c8c8c8 solid;
	margin: 8px;
	font-size: 0.8rem;
}

.form__item-container--disabled:hover .tooltip--disabled { display: block; }

/* ********** Responsive fallback ********** */

@media (max-width: 1920px) {
	:root { font-size: 20px; }
	.header__container { width: 1500px; }
}

@media (max-width: 1400px) {
	:root { font-size: 18px; }
	.header__container { width: auto; margin: 0 40px; }
}

@media (max-width: 1000px) {
	:root { font-size: 16px; }
	.header__container { margin: 0 16px; }
	.form__item { gap: 16px; }
	.select2-container--kia .select2-selection--single,
	.select2-container .select2-selection--single {
		min-height: 58px !important;
		padding: 16px 20px !important;
	}
}

@media (max-width: 600px) {
	.form__item {
		flex-direction: column;
		width: 100%;
		gap: 28px;
	}
}
