.jbf-form {
	font-family: var(--jbf-font);
	color: var(--jbf-text);
	box-sizing: border-box;
}

.jbf-form *, .jbf-form *::before, .jbf-form *::after {
	box-sizing: inherit;
}

.jbf-fields-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 16px;
}

.jbf-col {
	flex: 1 1 200px;
}

.jbf-col--half {
	flex: 1 1 calc(50% - 8px);
}

.jbf-col--full {
	flex: 1 1 100%;
}

.jbf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 28px;
	border: none;
	border-radius: var(--jbf-radius);
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	transition: background var(--jbf-transition), opacity var(--jbf-transition);
}

.jbf-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.jbf-btn--primary {
	background: var(--jbf-accent);
	color: var(--jbf-surface);
}

.jbf-btn--primary:hover:not(:disabled) {
	background: var(--jbf-accent-hover);
}

.jbf-btn--secondary {
	background: rgba(0, 0, 0, 0);
	color: var(--jbf-primary);
	border: 2px solid var(--jbf-border);
}

.jbf-btn--secondary:hover:not(:disabled) {
	border-color: var(--jbf-primary);
}

.jbf-btn--ghost {
	background: rgba(0, 0, 0, 0);
	color: var(--jbf-accent);
}

.jbf-btn--ghost:hover:not(:disabled) {
	text-decoration: underline;
}

.jbf-btn.is-loading::after {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid rgba(0, 0, 0, 0);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: jbf-spin .6s linear infinite;
}

.jbf-form-notice {
	padding: 16px 20px;
	border-radius: var(--jbf-radius);
	margin-bottom: 20px;
	font-weight: 500;
}

.jbf-form-notice--success {
	background: #e6f4ea;
	color: var(--jbf-success);
	border: 1px solid #a8d5b5;
}

.jbf-form-notice--error {
	background: #fce8e6;
	color: var(--jbf-error);
	border: 1px solid #f5c6c3;
}

.jbf-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.jbf-field--error .jbf-input, .jbf-field--error .jbf-select, .jbf-field--error .jbf-textarea {
	border-color: var(--jbf-error);
}

.jbf-label {
	font-size: .875rem;
	font-weight: 600;
	color: var(--jbf-text);
}

.jbf-required {
	color: var(--jbf-error);
	margin-left: 2px;
}

.jbf-select, .jbf-textarea, .jbf-input {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid var(--jbf-border);
	border-radius: var(--jbf-radius);
	font-size: 1rem;
	color: var(--jbf-text);
	background: var(--jbf-surface);
	transition: border-color var(--jbf-transition), box-shadow var(--jbf-transition);
	outline: none;
}

.jbf-select::placeholder, .jbf-textarea::placeholder, .jbf-input::placeholder {
	color: var(--jbf-text-muted);
}

.jbf-select:focus, .jbf-textarea:focus, .jbf-input:focus {
	border-color: var(--jbf-border-focus);
	box-shadow: 0 0 0 3px rgba(201, 168, 76, .2);
}

[aria-invalid=true].jbf-select, [aria-invalid=true].jbf-textarea, [aria-invalid=true].jbf-input {
	border-color: var(--jbf-error);
}

.jbf-select:disabled, .jbf-textarea:disabled, .jbf-input:disabled {
	background: var(--jbf-surface-alt);
	cursor: not-allowed;
	opacity: .7;
}

.jbf-textarea {
	resize: vertical;
}

.jbf-select-wrap {
	position: relative;
}

.jbf-select {
	appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M7 10l5 5 5-5z%27 fill=%27%236b6b80%27/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
}

.jbf-checkbox-label, .jbf-radio-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: .95rem;
}

.jbf-checkbox, .jbf-radio {
	width: 18px;
	height: 18px;
	accent-color: var(--jbf-accent);
	flex-shrink: 0;
	cursor: pointer;
}

.jbf-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.jbf-field--radio-inline .jbf-radio-group {
	flex-direction: row;
	flex-wrap: wrap;
}

.jbf-field__error {
	font-size: .8rem;
	color: var(--jbf-error);
	margin-top: 2px;
}

.jbf-steps-indicator {
	margin-bottom: 32px;
}

.jbf-steps-indicator__list {
	display: flex;
	justify-content: space-between;
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	position: relative;
}

.jbf-steps-indicator__item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--jbf-text-muted);
	font-size: .875rem;
	font-weight: 500;
	transition: color var(--jbf-transition);
}

.jbf-steps-indicator__item.is-active {
	color: var(--jbf-accent);
}

.jbf-steps-indicator__item.is-active .jbf-steps-indicator__number {
	background: var(--jbf-accent);
	color: var(--jbf-surface);
}

.jbf-steps-indicator__item.is-completed {
	color: var(--jbf-success);
}

.jbf-steps-indicator__item.is-completed .jbf-steps-indicator__number {
	background: var(--jbf-success);
	color: var(--jbf-surface);
}

.jbf-steps-indicator__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid currentColor;
	font-weight: 700;
	font-size: .85rem;
	flex-shrink: 0;
	transition: background var(--jbf-transition), color var(--jbf-transition);
}

.jbf-steps-indicator__track {
	height: 3px;
	background: var(--jbf-border);
	border-radius: 99px;
	overflow: hidden;
}

.jbf-steps-indicator__progress {
	height: 100%;
	background: var(--jbf-accent);
	width: 0%;
	transition: width var(--jbf-step-anim);
}

.jbf-steps-wrapper {
	overflow: hidden;
	position: relative;
}

.jbf-step {
	display: none;
}

.jbf-step--active {
	display: block;
}

.jbf-step--enter-right {
	animation: jbf-enter-right var(--jbf-step-anim) forwards;
}

.jbf-step--enter-left {
	animation: jbf-enter-left var(--jbf-step-anim) forwards;
}

.jbf-step--exit-left {
	animation: jbf-exit-left var(--jbf-step-anim) forwards;
}

.jbf-step--exit-right {
	animation: jbf-exit-right var(--jbf-step-anim) forwards;
}

.jbf-step-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 24px;
	margin-top: 24px;
	border-top: 1px solid var(--jbf-border);
}

.jbf-step-nav>:only-child {
	margin-left: auto;
}

.jbf-mode-switcher {
	display: flex;
	gap: 4px;
	background: var(--jbf-surface-alt);
	border-radius: var(--jbf-radius);
	padding: 4px;
	margin-bottom: 24px;
	width: fit-content;
}

.jbf-mode-switcher__btn {
	padding: 8px 20px;
	border: none;
	border-radius: calc(var(--jbf-radius) - 2px);
	background: rgba(0, 0, 0, 0);
	cursor: pointer;
	font-weight: 500;
	font-size: .9rem;
	color: var(--jbf-text-muted);
	transition: background var(--jbf-transition), color var(--jbf-transition);
}

.jbf-mode-switcher__btn.is-active {
	background: var(--jbf-surface);
	color: var(--jbf-text);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}

.jbf-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	visibility: hidden;
}

.jbf-popup[aria-hidden=false] {
	visibility: visible;
}

.jbf-popup[aria-hidden=false] .jbf-popup__overlay {
	opacity: 1;
}

.jbf-popup[aria-hidden=false] .jbf-popup__panel {
	transform: translateY(0);
	opacity: 1;
}

.jbf-popup__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, .6);
	opacity: 0;
	transition: opacity var(--jbf-transition);
}

.jbf-popup__panel {
	position: relative;
	background: var(--jbf-surface);
	border-radius: var(--jbf-radius-lg);
	width: 90%;
	max-width: 600px;
	max-height: 80vh;
	overflow-y: auto;
	padding: 24px;
	transform: translateY(20px);
	opacity: 0;
	transition: all var(--jbf-transition);
}

.jbf-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
}

.jbf-popup__footer {
	margin-top: 24px;
	text-align: right;
}

.jbf-autocomplete-wrap {
	position: relative;
}

.jbf-autocomplete__suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--jbf-border);
	max-height: 200px;
	overflow-y: auto;
	z-index: 10001;
	list-style: none;
	margin: 0;
	padding: 0;
}

.jbf-autocomplete__suggestion {
	padding: 8px 12px;
	cursor: pointer;
}

.jbf-autocomplete__suggestion:hover {
	background: #f0f0f0;
}

.jbf-counter {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.jbf-counter__controls {
	display: flex;
	align-items: center;
	gap: 12px;
}

.jbf-counter__controls button {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--jbf-border);
	background: #fff;
	font-size: 18px;
	cursor: pointer;
}

.jbf-counter__controls input {
	width: 50px;
	text-align: center;
	border: none;
	font-size: 16px;
}

.jbf-route-row {
	border-bottom: 1px solid var(--jbf-border);
	padding-bottom: 16px;
	margin-bottom: 16px;
}

.js-remove-route {
	margin-top: 24px;
}