/* Connect Ecommerce — Setup Wizard styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.conecom-wizard-body {
	background: #EEF2F7;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
	font-size: 14px;
	color: #1D2327;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */

.wiz-top-bar {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 32px;
	background: #010101 url('background.jpg');
	background-repeat: no-repeat;
	background-size: cover;
	border-bottom: 1px solid #DDE3EA;
}

.wiz-top-bar img {
	display: block;
}

.wiz-skip-link {
	font-size: 13px;
	color: #fff;
	text-decoration: none;
}

.wiz-skip-link:hover {
	color: #fff;
	text-decoration: underline;
}

/* ── Step progress track ────────────────────────────────────────────────── */

.wiz-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	padding: 28px 24px 0;
	max-width: 680px;
	margin: 0 auto;
}

.wiz-step-node {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	position: relative;
}

.wiz-step-circle {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid #C5D0DB;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	color: #8C9BAA;
	background: #fff;
	transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.wiz-step-node.is-active .wiz-step-circle {
	border-color: #007CBA;
	color: #007CBA;
	background: #EEF5FA;
}

.wiz-step-node.is-done .wiz-step-circle {
	border-color: #00A32A;
	background: #00A32A;
	color: #fff;
}

.wiz-step-node.is-done .wiz-step-circle span {
	display: none;
}

.wiz-step-node.is-done .wiz-step-circle::after {
	content: '';
	display: block;
	width: 10px;
	height: 6px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg) translateY(-1px);
}

.wiz-step-label {
	font-size: 11px;
	font-weight: 500;
	color: #8C9BAA;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color 0.2s;
}

.wiz-step-node.is-active .wiz-step-label {
	color: #007CBA;
}

.wiz-step-node.is-done .wiz-step-label {
	color: #00A32A;
}

.wiz-step-line {
	flex: 1;
	height: 2px;
	background: #C5D0DB;
	align-self: flex-start;
	margin-top: 15px;
	min-width: 24px;
	transition: background 0.2s;
}

.wiz-step-line.is-done {
	background: #00A32A;
}

/* ── Card ───────────────────────────────────────────────────────────────── */

.wiz-card {
	background: #fff;
	border-radius: 4px;
	border: 1px solid #DDE3EA;
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
	max-width: 680px;
	margin: 24px auto 48px;
	overflow: hidden;
}

/* ── Panels (steps) ─────────────────────────────────────────────────────── */

.wiz-panel {
	display: none;
	padding: 40px 48px;
}

.wiz-panel.is-active {
	display: block;
}

/* ── Panel icon ─────────────────────────────────────────────────────────── */

.wiz-panel-icon {
	margin-bottom: 20px;
}

/* ── Typography ─────────────────────────────────────────────────────────── */

.wiz-title {
	font-size: 22px;
	font-weight: 600;
	color: #1D2327;
	line-height: 1.3;
	text-wrap: balance;
	margin-bottom: 10px;
}

.wiz-subtitle {
	font-size: 14px;
	color: #4A5568;
	line-height: 1.6;
	max-width: 52ch;
	margin-bottom: 28px;
}

.wiz-checklist {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 36px;
}

.wiz-checklist li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: #3C4549;
}

.wiz-checklist li::before {
	content: '';
	display: inline-block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #EEF5FA url("data:image/svg+xml,%3Csvg width='10' height='7' viewBox='0 0 10 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3.5L3.5 6L9 1' stroke='%23007CBA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat;
	flex-shrink: 0;
}

/* ── Connector cards ────────────────────────────────────────────────────── */

.wiz-connector-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
}

.wiz-connector-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 20px;
	border: 2px solid #DDE3EA;
	border-radius: 4px;
	cursor: pointer;
	min-width: 120px;
	background: #1D2327;
	transition: border-color 0.15s, background 0.15s;
}

.wiz-connector-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wiz-connector-card:hover {
	border-color: #007CBA;
	background: #32373C;
}

.wiz-connector-card.is-selected {
	border-color: #007CBA;
	background: #32373C;
}

.wiz-connector-logo {
	max-height: 32px;
	max-width: 80px;
	object-fit: contain;
}

.wiz-connector-name {
	font-size: 13px;
	color: #fff;
	font-weight: 600;
}

/* ── Connector fields ────────────────────────────────────────────────────── */

.wiz-conn-fields,
.wiz-fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 28px;
}

.wiz-conn-fields[hidden] {
	display: none;
}

.wiz-admin-msg {
	font-size: 13px;
	color: #646970;
	background: #F6F7F7;
	border-left: 3px solid #C5D0DB;
	padding: 10px 14px;
	border-radius: 0 2px 2px 0;
}

.wiz-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wiz-field label {
	font-size: 13px;
	font-weight: 600;
	color: #1D2327;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wiz-field--row {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}

.wiz-field--row label {
	font-weight: 500;
}

.wiz-optional {
	font-size: 11px;
	font-weight: 400;
	color: #8C9BAA;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.wiz-field input.regular-text,
.wiz-field .regular-text,
.wiz-field select,
.wiz-field textarea {
	width: 100%;
	max-width: 100%;
	font-size: 14px;
	padding: 7px 10px;
	border: 1px solid #C5D0DB;
	border-radius: 3px;
	color: #1D2327;
	transition: border-color 0.15s;
}

.wiz-field--row select {
	width: auto;
	min-width: 120px;
}

.wiz-field input:focus,
.wiz-field select:focus,
.wiz-field textarea:focus {
	border-color: #007CBA;
	outline: 2px solid rgba(0, 124, 186, 0.25);
	outline-offset: 0;
}

.wiz-field .description {
	font-size: 12px;
	color: #8C9BAA;
	margin: 0;
}

/* ── Test connection row ─────────────────────────────────────────────────── */

.wiz-test-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 4px;
}

.wiz-test-msg {
	font-size: 13px;
	font-weight: 500;
}

.wiz-test-msg.is-ok    { color: #00A32A; }
.wiz-test-msg.is-error { color: #D63638; }

/* ── Sync step ───────────────────────────────────────────────────────────── */

#js-sync-idle {
	margin-bottom: 24px;
}

.wiz-sync-progress {
	height: 6px;
	background: #DDE3EA;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 16px;
}

.wiz-sync-bar {
	height: 100%;
	width: 0;
	background: #007CBA;
	border-radius: 3px;
	transition: width 0.4s ease;
}

.wiz-sync-log {
	max-height: 200px;
	overflow-y: auto;
	font-size: 12px;
	font-family: "Menlo", "Monaco", "Courier New", monospace;
	color: #3C4549;
	background: #F6F7F7;
	border: 1px solid #DDE3EA;
	border-radius: 3px;
	padding: 10px 12px;
	margin-bottom: 20px;
	line-height: 1.7;
}

.wiz-success-msg {
	font-size: 15px;
	font-weight: 600;
	color: #00A32A;
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wiz-success-msg::before {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #00A32A url("data:image/svg+xml,%3Csvg width='10' height='7' viewBox='0 0 10 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3.5L3.5 6L9 1' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat;
	flex-shrink: 0;
}

/* ── Done step ───────────────────────────────────────────────────────────── */

.wiz-done-links {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 8px;
}

/* ── Actions row ─────────────────────────────────────────────────────────── */

.wiz-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-top: 8px;
	border-top: 1px solid #EEF2F7;
	margin-top: 8px;
}

.wiz-actions--end {
	justify-content: flex-end;
	border-top: none;
	margin-top: 0;
}

.wiz-actions .button-primary {
	margin-left: auto;
}

.wiz-actions--end .button-primary {
	margin-left: 0;
}

/* Keep WP button styles from conflicting */
.wiz-card .button {
	font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.wiz-top-bar     { padding: 12px 16px; }
	.wiz-progress    { padding: 20px 12px 0; gap: 0; }
	.wiz-step-label  { display: none; }
	.wiz-step-line   { min-width: 12px; }
	.wiz-panel       { padding: 28px 20px; }
	.wiz-title       { font-size: 18px; }
	.wiz-connector-grid { gap: 8px; }
	.wiz-connector-card { min-width: 100px; padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.wiz-step-circle,
	.wiz-step-label,
	.wiz-step-line,
	.wiz-sync-bar,
	.wiz-connector-card { transition: none; }
}
