/**
 * IG Detail - formulár
 * Farby a typografia vychádzajú z Elementor kitu webu (Poppins, #FFEC00, #1E1E1C).
 */

.igdf {
	--igdf-accent: #ffec00;
	--igdf-dark: #1e1e1c;
	--igdf-radius: 8px;
	--igdf-gap: 18px;
	--igdf-ease: cubic-bezier(0.22, 1, 0.36, 1);

	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	position: relative;
	max-width: 100%;
	box-sizing: border-box;
}

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

/* ---------- farebné schémy ---------- */

.igdf--dark {
	--igdf-text: #ffffff;
	--igdf-muted: rgba(255, 255, 255, 0.62);
	--igdf-field-bg: rgba(255, 255, 255, 0.06);
	--igdf-field-bg-focus: rgba(255, 255, 255, 0.1);
	--igdf-border: rgba(255, 255, 255, 0.16);
	--igdf-placeholder: rgba(255, 255, 255, 0.38);
	--igdf-error: #ff8a80;
}

.igdf--light {
	--igdf-text: #1e1e1c;
	--igdf-muted: #5b5b5b;
	--igdf-field-bg: #f6f6f4;
	--igdf-field-bg-focus: #ffffff;
	--igdf-border: #e2e2dd;
	--igdf-placeholder: #a5a5a0;
	--igdf-error: #d93025;
}

/* ---------- hlavička ---------- */

.igdf__title {
	margin: 0 0 8px;
	color: var(--igdf-text);
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.01em;
}

.igdf__subtitle {
	margin: 0 0 26px;
	color: var(--igdf-muted);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.6;
	max-width: 52ch;
}

/* ---------- mriežka polí ---------- */

.igdf__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--igdf-gap);
}

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

.igdf__field--full {
	grid-column: 1 / -1;
}

.igdf__label {
	margin-bottom: 7px;
	color: var(--igdf-muted);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.3;
}

.igdf__req {
	margin-left: 3px;
	color: var(--igdf-accent);
}

.igdf--light .igdf__req {
	color: #d93025;
}

/* ---------- polia ---------- */

.igdf .igdf__input {
	width: 100%;
	margin: 0;
	padding: 13px 15px;
	color: var(--igdf-text);
	background: var(--igdf-field-bg);
	border: 1px solid var(--igdf-border);
	border-radius: var(--igdf-radius);
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.25s var(--igdf-ease), background-color 0.25s var(--igdf-ease), box-shadow 0.25s var(--igdf-ease);
}

.igdf .igdf__input::placeholder {
	color: var(--igdf-placeholder);
	opacity: 1;
}

.igdf .igdf__input:hover {
	border-color: color-mix(in srgb, var(--igdf-accent) 35%, var(--igdf-border));
}

.igdf .igdf__input:focus,
.igdf .igdf__input:focus-visible {
	outline: none;
	background: var(--igdf-field-bg-focus);
	border-color: var(--igdf-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--igdf-accent) 22%, transparent);
}

.igdf .igdf__textarea {
	resize: vertical;
	min-height: 96px;
}

.igdf .igdf__select {
	padding-right: 40px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23999' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 12px 8px;
}

.igdf--dark .igdf__select option {
	color: #1e1e1c;
	background: #ffffff;
}

/* chybový stav */

.igdf .igdf__input.is-invalid {
	border-color: var(--igdf-error);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--igdf-error) 18%, transparent);
}

.igdf__error {
	display: block;
	max-height: 0;
	overflow: hidden;
	color: var(--igdf-error);
	font-size: 12.5px;
	line-height: 1.4;
	opacity: 0;
	transition: max-height 0.25s var(--igdf-ease), opacity 0.2s ease, margin-top 0.25s var(--igdf-ease);
}

.igdf__error.is-visible {
	max-height: 44px;
	margin-top: 6px;
	opacity: 1;
}

/* ---------- návnady pre roboty ---------- */

.igdf__trap {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ---------- súhlas ---------- */

.igdf__consent {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	margin-top: 20px;
	color: var(--igdf-muted);
	font-size: 13px;
	line-height: 1.55;
	cursor: pointer;
	user-select: none;
}

.igdf__consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--igdf-accent);
	cursor: pointer;
}

.igdf--dark .igdf__consent input[type="checkbox"] {
	accent-color: var(--igdf-accent);
}

.igdf__consent a {
	color: var(--igdf-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.igdf__consent a:hover {
	color: var(--igdf-accent);
}

.igdf__error--consent.is-visible {
	margin-top: 4px;
}

/* ---------- tlačidlo ---------- */

.igdf .igdf__submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 24px;
	padding: 15px 34px;
	min-width: 190px;
	color: var(--igdf-dark);
	background: var(--igdf-accent);
	border: none;
	border-radius: var(--igdf-radius);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	cursor: pointer;
	overflow: hidden;
	transition: transform 0.25s var(--igdf-ease), box-shadow 0.25s var(--igdf-ease), filter 0.2s ease;
}

.igdf .igdf__submit::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
	transform: translateX(-120%);
	transition: transform 0.7s var(--igdf-ease);
}

.igdf .igdf__submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--igdf-accent) 75%, transparent);
}

.igdf .igdf__submit:hover::after {
	transform: translateX(120%);
}

.igdf .igdf__submit:active {
	transform: translateY(0);
}

.igdf .igdf__submit:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--igdf-accent) 55%, transparent);
	outline-offset: 3px;
}

.igdf .igdf__submit[disabled] {
	cursor: not-allowed;
	filter: saturate(0.55) brightness(0.92);
	transform: none;
	box-shadow: none;
}

.igdf__spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid color-mix(in srgb, var(--igdf-dark) 25%, transparent);
	border-top-color: var(--igdf-dark);
	border-radius: 50%;
	animation: igdf-spin 0.65s linear infinite;
}

.igdf__form.is-sending .igdf__spinner {
	display: block;
}

@keyframes igdf-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- stavová hláška ---------- */

.igdf__status {
	margin: 16px 0 0;
	color: var(--igdf-error);
	font-size: 13.5px;
	line-height: 1.55;
	min-height: 0;
}

.igdf__status:empty {
	margin: 0;
}

/* ---------- stav po odoslaní ---------- */

.igdf__success {
	padding: 34px 28px;
	text-align: center;
	background: var(--igdf-field-bg);
	border: 1px solid color-mix(in srgb, var(--igdf-accent) 40%, var(--igdf-border));
	border-radius: calc(var(--igdf-radius) + 4px);
	animation: igdf-reveal 0.5s var(--igdf-ease) both;
}

.igdf__success[hidden] {
	display: none;
}

.igdf__success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	margin-bottom: 16px;
	color: var(--igdf-dark);
	background: var(--igdf-accent);
	border-radius: 50%;
	animation: igdf-pop 0.5s var(--igdf-ease) 0.12s both;
}

.igdf__success h4 {
	margin: 0 0 8px;
	color: var(--igdf-text);
	font-size: 21px;
	font-weight: 700;
}

.igdf__success p {
	margin: 0;
	color: var(--igdf-muted);
	font-size: 14.5px;
	line-height: 1.6;
}

@keyframes igdf-reveal {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

@keyframes igdf-pop {
	from {
		opacity: 0;
		transform: scale(0.5);
	}
}

/* ---------- responzivita ---------- */

@media (max-width: 767px) {
	.igdf__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 15px;
	}

	.igdf .igdf__submit {
		width: 100%;
	}
}

/* ---------- panel ----------
   Formulár dostane vlastnú plochu a vrstvu nad dekoračným pozadím sekcie,
   takže sa neprekrýva s grafickými tvarmi v pätičke. */

.igdf--card {
	position: relative;
	z-index: 3;
	padding: 30px 30px 34px;
	border-radius: 12px;
	isolation: isolate;
}

.igdf--dark.igdf--card {
	background: rgba(12, 12, 11, 0.82);
	border: 1px solid rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

.igdf--light.igdf--card {
	background: #ffffff;
	border: 1px solid #e7e7e2;
	box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.32);
}

@media (max-width: 767px) {
	.igdf--card {
		padding: 24px 20px 26px;
	}
}

/* užšia verzia do pätičky */

.igdf--compact .igdf__subtitle {
	margin-bottom: 20px;
	font-size: 14px;
}

.igdf--compact .igdf__title {
	font-size: clamp(20px, 2.4vw, 26px);
}

@media (prefers-reduced-motion: reduce) {
	.igdf *,
	.igdf *::before,
	.igdf *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
