/**
 * Style formularzy checklisty: pasek przycisków + modale
 * („Dane do pełnomocnictwa", „Podatek od nieruchomości").
 */

.erl-tx-forms-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 0.9rem;
	margin: 0 0 0.75rem;
	background: #f5f7fb;
	border: 1px solid #dfe4ee;
	border-radius: 8px;
}

.erl-tx-forms-bar__label {
	font-weight: 600;
	color: #33415c;
	margin-right: 0.25rem;
}

/* Modal ------------------------------------------------------------------- */

.erl-tx-form-modal[hidden] {
	display: none;
}

.erl-tx-form-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 3vh 1rem;
	overflow: auto;
}

.erl-tx-form-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.erl-tx-form-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 720px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	max-height: 94vh;
	display: flex;
	flex-direction: column;
}

.erl-tx-form-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e6e9f0;
}

.erl-tx-form-modal__title {
	margin: 0;
	font-size: 1.15rem;
}

.erl-tx-form-modal__close {
	border: 0;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: #64748b;
}

.erl-tx-form-modal__body {
	padding: 1.1rem 1.25rem 1.4rem;
	overflow: auto;
}

body.erl-chromeless-page .erl-tx-form-modal {
	padding-top: var(--erl-modal-nav-offset, 5rem);
	padding-bottom: 1rem;
}

body.erl-chromeless-page .erl-tx-form-modal__dialog {
	max-height: calc(100vh - var(--erl-modal-nav-offset, 5rem) - 1rem);
}

body.erl-tx-form-modal-open {
	overflow: hidden;
}

/* Form -------------------------------------------------------------------- */

.erl-tx-form__row {
	margin: 0 0 0.85rem;
}

.erl-tx-form__label {
	display: block;
	font-weight: 600;
	color: #1f2a44;
	margin-bottom: 0.25rem;
	font-size: 0.92rem;
}

.erl-tx-form__req {
	color: #b91c1c;
}

.erl-tx-form .erl-input,
.erl-tx-form input[type='text'],
.erl-tx-form input[type='number'],
.erl-tx-form textarea,
.erl-tx-form select {
	width: 100%;
	padding: 0.45rem 0.55rem;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font: inherit;
	box-sizing: border-box;
}

.erl-tx-form textarea {
	resize: vertical;
}

.erl-tx-form__hint {
	display: block;
	font-size: 0.78rem;
	color: #64748b;
	margin-top: 0.2rem;
	font-style: italic;
}

.erl-tx-form__group {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 0.9rem 1rem 0.4rem;
	margin: 0 0 1rem;
}

.erl-tx-form__group legend {
	font-weight: 700;
	color: #1e40af;
	padding: 0 0.4rem;
	font-size: 0.95rem;
}

.erl-tx-form__radios {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.erl-tx-form__radio,
.erl-tx-form__check {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 500;
}

.erl-tx-form__check input,
.erl-tx-form__radio input {
	width: auto;
}

.erl-tx-form__fraction {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.erl-tx-form__fraction input {
	width: 6rem;
}

.erl-tx-form__slash {
	font-weight: 700;
	color: #475569;
}

.erl-tx-form__unit {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	width: 100%;
}

.erl-tx-form__unit input {
	flex: 1 1 auto;
}

.erl-tx-form__row.is-field-error .erl-input,
.erl-tx-form .is-field-error {
	border-color: #dc2626 !important;
	box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.erl-tx-forms__field-error {
	margin: 0.35rem 0 0;
	color: #b91c1c;
	font-size: 0.82rem;
	line-height: 1.3;
	font-weight: 500;
}

.erl-tx-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid #eef1f6;
}

.erl-tx-form__msg {
	margin: 0 0 0.9rem;
	padding: 0.55rem 0.7rem;
	border-radius: 6px;
	font-size: 0.9rem;
}

.erl-tx-form__msg.is-ok {
	background: #ecfdf3;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.erl-tx-form__msg.is-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.erl-tx-form__msg.is-info {
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

.erl-tx-form__prefill-note {
	margin: 0 0 0.9rem;
	padding: 0.55rem 0.7rem;
	border-radius: 6px;
	font-size: 0.85rem;
	background: #fffbeb;
	color: #92400e;
	border: 1px solid #fde68a;
}

.erl-tx-form__admin-note {
	margin: 0 0 0.9rem;
	padding: 0.55rem 0.7rem;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

.erl-tx-form-loading,
.erl-tx-form-error {
	padding: 1rem;
	text-align: center;
	color: #475569;
}

.erl-tx-form-error {
	color: #991b1b;
}

/* Fallback dla przycisku, gdy motyw nie dostarcza .erl-portal-btn */
.erl-tx-forms-bar .erl-portal-btn {
	cursor: pointer;
}
