.btf-modal {
	--btf-navy: var(--bi-navy, #0a1b33);
	--btf-accent: var(--bi-accent, #d4af37);
	--btf-muted: var(--bi-muted, #5b6a7c);
	--btf-line: var(--bi-line, #e6dfd0);
	position: fixed;
	inset: 0;
	z-index: 400;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}

.btf-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.btf-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 27, 51, 0.66);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.btf-modal__panel {
	position: relative;
	z-index: 1;
	width: min(460px, 100%);
	max-height: min(88vh, 760px);
	max-height: min(88dvh, 760px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: clamp(24px, 5vw, 34px);
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(10, 27, 51, 0.38);
	transform: translateY(16px) scale(0.99);
	transition: transform 0.26s ease;
}

.btf-modal.is-open .btf-modal__panel {
	transform: none;
}

.btf-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--btf-line);
	border-radius: 50%;
	background: #fff;
	color: var(--btf-navy);
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
}

.btf-modal__close:hover {
	background: #f7f2e6;
}

.btf-modal__eyebrow {
	margin: 0 0 10px;
	color: var(--btf-accent);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.btf-modal__title {
	margin: 0 0 8px;
	padding-right: 38px;
	color: var(--btf-navy);
	font-size: clamp(1.4rem, 3vw, 1.75rem);
	line-height: 1.2;
}

.btf-modal__text {
	margin: 0 0 22px;
	color: var(--btf-muted);
	font-size: 0.95rem;
	line-height: 1.55;
}

body.btf-modal-open {
	overflow: hidden;
}

.btf-flash {
	position: fixed;
	top: 22px;
	left: 50%;
	z-index: 500;
	transform: translateX(-50%);
	width: min(520px, calc(100% - 32px));
	padding: 13px 18px;
	border-radius: 12px;
	box-shadow: 0 14px 40px rgba(10, 27, 51, 0.22);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.45;
	text-align: center;
}

.btf-flash--success {
	background: #1d7a46;
}

.btf-flash--error {
	background: #a02a20;
}

.btf-form {
	display: grid;
	gap: 14px;
}

.btf-field {
	display: grid;
	gap: 6px;
}

.btf-field label {
	color: var(--btf-navy);
	font-size: 0.86rem;
	font-weight: 700;
}

.btf-req {
	color: #c0392b;
}

.btf-field input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--btf-line);
	border-radius: 11px;
	background: #fff;
	color: var(--btf-navy);
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.3;
}

.btf-field input:focus {
	outline: none;
	border-color: var(--btf-accent);
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.btf-submit {
	width: 100%;
	padding: 14px 20px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #f5dd88 0%, #d4af37 46%, #a8841f 100%);
	color: var(--btf-navy);
	font: inherit;
	font-size: 0.95rem;
	font-weight: 800;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btf-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(212, 175, 55, 0.35);
}

.btf-submit:disabled {
	opacity: 0.65;
	cursor: progress;
}

.btf-form__note {
	margin: 0;
	color: var(--btf-muted);
	font-size: 0.76rem;
	line-height: 1.45;
	text-align: center;
}

.btf-form__message {
	padding: 11px 14px;
	border-radius: 10px;
	font-size: 0.88rem;
	line-height: 1.45;
}

.btf-form__message.is-success {
	background: #e7f6ec;
	border: 1px solid #b7e2c5;
	color: #17663a;
}

.btf-form__message.is-error {
	background: #fdecea;
	border: 1px solid #f5c2bd;
	color: #8a1f16;
}

.btf-form--inline {
	max-width: 460px;
}

.btf-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.btf-trigger:not(.bi-btn) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border: 1px solid rgba(10, 27, 51, 0.18);
	border-radius: 999px;
	background: transparent;
	color: var(--btf-navy, #0a1b33);
	font: inherit;
	font-weight: 700;
	font-size: 0.92rem;
	line-height: 1.2;
	cursor: pointer;
}

.btf-trigger:not(.bi-btn):hover {
	border-color: var(--btf-accent, #d4af37);
	background: rgba(212, 175, 55, 0.08);
}

.btf-trigger--block,
.btf-trigger.bi-btn--block {
	width: 100%;
}

.btf-actions-stack {
	display: grid;
	gap: 10px;
}

.btf-feature-trigger {
	margin-top: 10px;
}

@media (max-width: 520px) {
	.btf-modal {
		padding: 14px;
	}

	.btf-modal__panel {
		padding: 24px 20px;
		border-radius: 18px;
	}
}
