/* Advanced Passport Control - Horizontal Section Tabs for Formidable Forms */

.apc-tabs-nav {
	grid-column: 1 / -1;
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 6px;
	border-bottom: 2px solid #e2e8f0;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
	box-sizing: border-box;
}

.apc-tab-btn {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	margin: 0 0 -2px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-bottom: 2px solid transparent;
	border-radius: 6px 6px 0 0;
	color: #475569;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.apc-tab-btn:hover,
.apc-tab-btn:focus-visible {
	background: #f1f5f9;
	color: #0f172a;
	outline: none;
}

.apc-tab-btn.is-active {
	background: #ffffff;
	color: #0073aa;
	border-color: #e2e8f0;
	border-bottom-color: #ffffff;
	box-shadow: inset 0 3px 0 #0073aa;
}

.apc-tab-btn.has-error::after {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #dc2626;
	flex-shrink: 0;
}

.apc-tabs-panels {
	grid-column: 1 / -1;
	width: 100%;
}

.apc-tab-panel {
	display: none;
	width: 100%;
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.apc-tab-panel.is-active {
	display: block;
}

.apc-tab-panel.is-fading-out {
	opacity: 0;
	transform: translateY(3px);
}

.apc-tab-panel.is-entering {
	opacity: 0;
	transform: translateY(4px);
}

.apc-tab-panel > .frm_section_heading.apc-tab-primary-section > h3:first-child {
	margin-top: 0;
}

/* Keep the shared Submit/Update button spanning full width below all tabs */
.apc-tabs-submit-footer {
	grid-column: 1 / -1 !important;
	width: 100%;
}

@media (max-width: 640px) {
	.apc-tabs-nav {
		gap: 4px;
	}

	.apc-tab-btn {
		flex: 1 1 calc(50% - 4px);
		justify-content: center;
		padding: 10px 12px;
		font-size: 13px;
	}
}
