/**
 * AD Betonzaun — formularze
 * Design: duże targety (min 48px height), high contrast, intuicyjny dla 55+
 */

.adb-form {
	--adb-primary: #0E141C;
	--adb-accent: #FF6B00;
	--adb-accent-gold: #FFB800;
	--adb-border: #E2E8F0;
	--adb-text: #2D3748;
	--adb-muted: #718096;
	--adb-bg: #FFFFFF;
	--adb-bg-soft: #F7FAFC;
	--adb-danger: #E53E3E;
	--adb-success: #38A169;

	max-width: 720px;
	margin: 0 auto;
	padding: 32px;
	background: var(--adb-bg);
	border: 1px solid var(--adb-border);
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(14, 20, 28, 0.06);
	font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
	color: var(--adb-text);
}

.adb-form--nowa-linia {
	background-image: linear-gradient(var(--adb-bg), var(--adb-bg)),
		linear-gradient(135deg, var(--adb-accent-gold), var(--adb-accent));
	background-origin: border-box;
	background-clip: padding-box, border-box;
	border: 2px solid transparent;
}

.adb-form__badge {
	margin: -32px -32px 24px;
	padding: 16px 32px;
	background: linear-gradient(135deg, var(--adb-accent-gold) 0%, var(--adb-accent) 100%);
	color: #fff;
	border-radius: 16px 16px 0 0;
}
.adb-form__badge p { margin: 8px 0 0; font-size: 14px; opacity: 0.95; }

.adb-form__section {
	border: none;
	padding: 0;
	margin: 0 0 28px;
}
.adb-form__section legend {
	font-size: 17px;
	font-weight: 700;
	color: var(--adb-primary);
	padding: 0 0 12px;
	letter-spacing: -0.01em;
}

.adb-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 640px) {
	.adb-form__grid { grid-template-columns: 1fr; }
	.adb-form { padding: 24px 20px; }
	.adb-form__badge { margin: -24px -20px 20px; padding: 14px 20px; }
}

.adb-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.adb-form__field--full { grid-column: 1 / -1; }

/* 2026-05-04 v7 — readability polish: bigger labels, more padding, gold focus
   (Adam: „formularze czytelne, działaj") */
.adb-form__field > span,
.adb-form__radios > legend {
	font-size: 15px;
	font-weight: 600;
	color: #14110b;
	margin-bottom: 4px;
	display: block;
	letter-spacing: -0.005em;
}
.adb-form__field em {
	color: #b8891f;  /* gold accent (was orange) */
	font-style: normal;
	font-weight: 700;
	margin-left: 4px;
}

.adb-form__field input[type="text"],
.adb-form__field input[type="email"],
.adb-form__field input[type="tel"],
.adb-form__field input[type="number"],
.adb-form__field input[type="url"],
.adb-form__field select,
.adb-form__field textarea {
	width: 100%;
	min-height: 54px;  /* +6px (was 48) */
	padding: 14px 16px;  /* +2px each (was 12 14) */
	font-size: 16px;  /* +1px (was 15) for better readability */
	font-family: inherit;
	color: #14110b;
	background: #fff;
	border: 1.5px solid #e8e2d4;
	border-radius: 4px;  /* less round (was 8) — luxury feel */
	transition: all 0.18s ease;
	font-weight: 500;
}
.adb-form__field textarea {
	min-height: 110px;  /* +14px (was 96) */
	resize: vertical;
	line-height: 1.55;
}

.adb-form__field input::placeholder,
.adb-form__field textarea::placeholder {
	color: #9c9280;
	font-weight: 400;
}

.adb-form__field input:hover:not(:focus),
.adb-form__field select:hover:not(:focus),
.adb-form__field textarea:hover:not(:focus) {
	border-color: #c4bba7;
}

.adb-form__field input:focus,
.adb-form__field select:focus,
.adb-form__field textarea:focus {
	outline: none;
	border-color: #b8891f;  /* gold (was orange #ff6b00) */
	box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.18);
}

/* Selects + radios visually consistent */
.adb-form__field select {
	cursor: pointer;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23b8891f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 18px center;
	padding-right: 44px;
	appearance: none; -webkit-appearance: none; -moz-appearance: none;
}

.adb-form__field.has-error input,
.adb-form__field.has-error select,
.adb-form__field.has-error textarea {
	border-color: var(--adb-danger);
	box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}
.adb-form__field.has-error::after {
	content: attr(data-error);
	display: block;
	font-size: 13px;
	color: var(--adb-danger);
	margin-top: 4px;
	font-weight: 500;
}

.adb-form__radios {
	border: none;
	padding: 12px 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.adb-form__radios > label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: var(--adb-bg-soft);
	border-radius: 8px;
	cursor: pointer;
	font-size: 15px;
	transition: background 0.15s ease;
}
.adb-form__radios > label:hover {
	background: #EDF2F7;
}
.adb-form__radios input[type="radio"] {
	width: 20px;
	height: 20px;
	accent-color: var(--adb-accent);
}

.adb-form__checkbox {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: var(--adb-bg-soft);
	border-radius: 8px;
	margin-bottom: 8px;
	cursor: pointer;
	font-size: 15px;
}
.adb-form__checkbox input {
	width: 20px;
	height: 20px;
	accent-color: var(--adb-accent);
}

.adb-form__blocks {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.adb-form__block-row {
	padding: 10px 14px;
	background: var(--adb-bg-soft);
	border-radius: 8px;
	border: 1px solid var(--adb-border);
}
.adb-form__block-row label {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 12px;
}
.adb-form__block-row input[type="number"] {
	width: 80px;
	min-height: 40px;
	padding: 6px 8px;
	font-size: 14px;
	border: 1.5px solid var(--adb-border);
	border-radius: 6px;
	text-align: center;
}
.adb-form__block-label { font-weight: 500; }

/* GDPR/DSGVO explicit consent — required by Art. 7 + BDSG § 4 (Audit T7.8 / T8.4) */
.adb-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 24px 0 0;
	padding: 16px 18px;
	background: #fafaf6;
	border: 1px solid #e5e0d3;
	border-left: 3px solid var(--adb-primary, #9d6e1f);
	font-size: 13.5px;
	line-height: 1.55;
	color: #4a4a40;
	cursor: pointer;
}
.adb-form__consent input[type="checkbox"] {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--adb-primary, #9d6e1f);
	cursor: pointer;
}
.adb-form__consent span { flex: 1; }
.adb-form__consent a { color: var(--adb-primary, #9d6e1f); text-decoration: underline; font-weight: 500; }
.adb-form__consent em { color: #c7242b; font-style: normal; font-weight: 700; margin-left: 2px; }
.adb-form__consent.has-error,
.adb-form__consent input:invalid:not(:placeholder-shown) ~ span {
	border-left-color: #c7242b;
}

.adb-form__actions {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.adb-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 60px;  /* +4px (was 56) */
	padding: 18px 36px;  /* +2px each (was 16 32) */
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	background: #14110b;  /* ink (was orange primary) — luxury feel */
	border: none;
	border-radius: 4px;  /* less round (was 10) */
	cursor: pointer;
	transition: all 0.22s ease;
	letter-spacing: 0.02em;
	text-transform: none;
}
.adb-form__submit:hover,
.adb-form__submit:focus {
	background: #b8891f;  /* gold hover (was orange) */
	color: #14110b;
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(212, 175, 55, 0.35);
	outline: 2px solid #b8891f;
	outline-offset: 2px;
}
.adb-form__submit:disabled {
	opacity: 0.6;
	cursor: wait;
	transform: none;
}
.adb-form__submit[data-state="loading"]::after {
	content: '';
	width: 16px;
	height: 16px;
	margin-left: 10px;
	border: 2px solid rgba(255,255,255,0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: adbSpin 0.8s linear infinite;
}
@keyframes adbSpin { to { transform: rotate(360deg); } }

.adb-form__privacy {
	font-size: 13px;
	color: var(--adb-muted);
	margin: 0;
	text-align: center;
}
.adb-form__privacy a {
	color: var(--adb-text);
	text-decoration: underline;
}

.adb-form__status {
	margin-top: 16px;
	padding: 14px 18px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	display: none;
}
.adb-form__status[data-state="success"] {
	display: block;
	background: #F0FFF4;
	color: var(--adb-success);
	border: 1px solid #9AE6B4;
}
.adb-form__status[data-state="error"] {
	display: block;
	background: #FFF5F5;
	color: var(--adb-danger);
	border: 1px solid #FEB2B2;
}

[data-adb-show-if] {
	display: none;
}
[data-adb-show-if][data-adb-visible="true"] {
	display: flex;
}
