/**
 * La Bodeteka Forms - front-end styles.
 * Neutral by default: it inherits the text colour and adapts to light or dark
 * sections. Elementor's style controls override colours, radius and padding.
 */

.lbd-form-wrap {
	--lbd-accent: #c8912f;
	--lbd-border: rgba(128, 128, 128, 0.35);
	--lbd-field-bg: rgba(128, 128, 128, 0.06);
	--lbd-error: #e5484d;
}

.lbd-form {
	display: block;
	margin: 0;
}

.lbd-fields {
	display: grid;
	gap: 18px;
}

.lbd-cols-1 {
	grid-template-columns: minmax(0, 1fr);
}

.lbd-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lbd-cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lbd-field {
	grid-column: 1 / -1;
	min-width: 0;
}

.lbd-cols-2 .lbd-span-1,
.lbd-cols-3 .lbd-span-1 {
	grid-column: span 1;
}

@media (max-width: 900px) {
	.lbd-cols-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.lbd-cols-2,
	.lbd-cols-3 {
		grid-template-columns: minmax(0, 1fr);
	}

	.lbd-field,
	.lbd-cols-2 .lbd-span-1,
	.lbd-cols-3 .lbd-span-1 {
		grid-column: 1 / -1;
	}
}

.lbd-field-label {
	display: block;
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.3;
}

.lbd-req {
	color: var(--lbd-error);
	font-weight: 700;
}

.lbd-input,
.lbd-select {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 12px 14px;
	background-color: var(--lbd-field-bg);
	border: 1px solid var(--lbd-border);
	border-radius: 6px;
	color: inherit;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lbd-select {
	appearance: none;
	-webkit-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 19px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 38px;
}

.lbd-textarea {
	min-height: 120px;
	resize: vertical;
}

.lbd-phone-group {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.lbd-phone-group .lbd-input {
	flex: 1 1 auto;
	min-width: 0;
}

.lbd-country-select {
	flex: 0 0 auto;
	min-width: 108px;
	padding: 12px 10px;
	background-color: var(--lbd-field-bg);
	border: 1px solid var(--lbd-border);
	border-radius: 6px;
	color: inherit;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	cursor: pointer;
}

.lbd-country-select:focus {
	outline: none;
	border-color: var(--lbd-accent);
	box-shadow: 0 0 0 2px rgba(200, 145, 47, 0.25);
}

@media (max-width: 640px) {
	.lbd-country-select {
		min-width: 96px;
	}
}

.lbd-input::placeholder {
	color: #8a8a8a;
}

.lbd-input:focus,
.lbd-select:focus {
	outline: none;
	border-color: var(--lbd-accent);
	box-shadow: 0 0 0 2px rgba(200, 145, 47, 0.25);
}

.lbd-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lbd-options-cols-2,
.lbd-options-cols-3,
.lbd-options-cols-4 {
	display: grid;
	gap: 10px 16px;
	align-items: start;
}

.lbd-options-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lbd-options-cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lbd-options-cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 640px) {
	.lbd-options-cols-2,
	.lbd-options-cols-3,
	.lbd-options-cols-4 {
		grid-template-columns: minmax(0, 1fr);
	}
}

.lbd-option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	cursor: pointer;
	font-size: 15px;
	line-height: 1.45;
}

.lbd-option input[type="radio"],
.lbd-option input[type="checkbox"] {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	margin: 2px 0 0;
	accent-color: var(--lbd-accent);
	cursor: pointer;
}

.lbd-field-help {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #8a8a8a;
}

.lbd-field-error {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--lbd-error);
}

.lbd-field.is-invalid .lbd-input,
.lbd-field.is-invalid .lbd-select {
	border-color: var(--lbd-error);
}

.lbd-field.is-invalid .lbd-field-label {
	color: var(--lbd-error);
}

.lbd-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---- Multi-step wizard ---- */
.lbd-step[hidden],
.lbd-step-back[hidden],
.lbd-step-next[hidden],
.lbd-form-submit[hidden] {
	display: none !important;
}

.lbd-stepper {
	margin: 0 0 26px;
}

.lbd-stepper-items {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.lbd-stepper-item {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 0;
	opacity: 0.45;
	transition: opacity 0.2s ease;
}

.lbd-stepper-item.is-active,
.lbd-stepper-item.is-done {
	opacity: 1;
}

.lbd-stepper-dot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 2px solid var(--lbd-border);
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.lbd-stepper-item.is-active .lbd-stepper-dot {
	background-color: var(--lbd-accent);
	border-color: var(--lbd-accent);
	color: #14100a;
}

.lbd-stepper-item.is-done .lbd-stepper-dot {
	border-color: var(--lbd-accent);
	color: var(--lbd-accent);
}

.lbd-stepper-name {
	font-size: 11px;
	line-height: 1.25;
	text-align: center;
}

.lbd-stepper-track {
	height: 4px;
	margin-top: 14px;
	background: var(--lbd-border);
	border-radius: 99px;
	overflow: hidden;
}

.lbd-stepper-fill {
	height: 100%;
	background-color: var(--lbd-accent);
	border-radius: 99px;
	transition: width 0.3s ease;
}

.lbd-stepper-count {
	margin: 8px 0 0;
	font-size: 12px;
	opacity: 0.7;
	text-align: center;
}

.lbd-step-head {
	margin-bottom: 18px;
}

.lbd-step-title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.3;
}

.lbd-step-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.75;
}

.lbd-steps-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 22px;
}

.lbd-step-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 18px;
	background: transparent;
	border: 1px solid var(--lbd-border);
	border-radius: 6px;
	color: inherit;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.lbd-step-back:hover {
	border-color: var(--lbd-accent);
}

.lbd-step-next {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	padding: 12px 24px;
	background-color: var(--lbd-accent);
	border: 0;
	border-radius: 6px;
	color: #14100a;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.lbd-step-next:hover {
	filter: brightness(1.08);
}

.lbd-form.is-sent .lbd-stepper,
.lbd-form.is-sent .lbd-step,
.lbd-form.is-sent .lbd-steps-nav {
	display: none;
}

.lbd-privacy {
	margin: 14px 0 0;
	font-size: 12px;
	line-height: 1.5;
	opacity: 0.65;
}

.lbd-form-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 20px 0 0;
	padding: 13px 28px;
	border: 0;
	border-radius: 6px;
	background-color: var(--lbd-accent);
	color: #14100a;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.lbd-form-submit:hover,
.lbd-form-submit:focus {
	filter: brightness(1.08);
}

.lbd-form-submit:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.lbd-form-submit[disabled] {
	opacity: 0.65;
	cursor: progress;
}

.lbd-form-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: lbd-form-spin 0.7s linear infinite;
}

.lbd-form.is-sending .lbd-form-spinner {
	display: inline-block;
}

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

.lbd-form-message {
	margin-top: 16px;
	padding: 12px 14px;
	border-left: 4px solid transparent;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
}

.lbd-form-message.is-success {
	background-color: rgba(46, 160, 67, 0.12);
	border-left-color: #2ea043;
}

.lbd-form-message.is-error {
	background-color: rgba(229, 72, 77, 0.1);
	border-left-color: var(--lbd-error);
}

.lbd-form.is-sent .lbd-fields,
.lbd-form.is-sent .lbd-form-submit,
.lbd-form.is-sent .lbd-privacy {
	display: none;
}

.lbd-section-title {
	margin: 8px 0 0;
	font-size: 18px;
	line-height: 1.3;
}

.lbd-form-empty,
.lbd-noscript {
	font-size: 14px;
	line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
	.lbd-form-submit,
	.lbd-stepper-fill,
	.lbd-stepper-item,
	.lbd-input,
	.lbd-select {
		transition: none;
	}

	.lbd-form-spinner {
		animation: none;
	}
}
