/* SerpIQ Settings page – tab navigation and panels */
.serpiq-settings-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0 0 20px 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--serpiq-border, #c3c4c7);
}

.serpiq-settings-tabs li {
	margin: 0;
	padding: 0;
}

.serpiq-settings-tab {
	display: inline-block;
	padding: 10px 16px;
	margin: 0 2px -1px 0;
	text-decoration: none;
	color: var(--serpiq-text-muted, #50575e);
	background: transparent;
	border: 1px solid transparent;
	border-bottom: none;
	border-radius: 4px 4px 0 0;
	font-size: 14px;
	cursor: pointer;
}

.serpiq-settings-tab:hover {
	color: var(--serpiq-text, #1d2327);
	background: var(--serpiq-bg-muted, #f0f0f1);
}

.serpiq-settings-tab.serpiq-settings-tab-active {
	color: var(--serpiq-accent, #2271b1);
	font-weight: 600;
	background: var(--serpiq-bg, #fff);
	border-color: var(--serpiq-border, #c3c4c7);
}

.serpiq-settings-panel {
	display: none;
}

.serpiq-settings-panel.serpiq-settings-panel-active {
	display: block;
}

/* Sync now modal (do not close during sync) */
.serpiq-sync-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.2s ease, opacity 0.2s ease;
}

.serpiq-sync-modal[hidden] {
	display: none !important;
}

.serpiq-sync-modal.serpiq-sync-modal-visible {
	visibility: visible;
	opacity: 1;
}

.serpiq-sync-modal.serpiq-sync-modal-visible[hidden] {
	display: flex !important;
}

.serpiq-sync-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.serpiq-sync-modal-content {
	position: relative;
	background: var(--serpiq-bg, #fff);
	border: 1px solid var(--serpiq-border, #c3c4c7);
	border-radius: 8px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
	padding: 24px 28px;
	max-width: 420px;
	width: 100%;
}

.serpiq-sync-modal-title {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--serpiq-text, #1d2327);
}

.serpiq-sync-modal-warning {
	margin: 0 0 20px 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--serpiq-text-muted, #50575e);
}

.serpiq-sync-modal-spinner-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.serpiq-sync-modal-spinner {
	display: inline-block;
	width: 24px;
	height: 24px;
	border: 2px solid var(--serpiq-border, #c3c4c7);
	border-top-color: var(--serpiq-accent, #2271b1);
	border-radius: 50%;
	animation: serpiq-spin 0.8s linear infinite;
}

.serpiq-sync-modal-text {
	font-size: 14px;
	color: var(--serpiq-text, #1d2327);
}

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