/**
 * Affiliate Hub - Setup Wizard Styles
 *
 * Clean, modern wizard layout with WordPress-consistent colours.
 *
 * @package AffiliateHub
 * @since 1.1.0
 */

/* ==========================================================================
   Layout
   ========================================================================== */

.affiliate-hub-wizard-wrap {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	min-height: 100vh;
	padding: 40px 20px;
	background: #f0f0f1;
}

.affiliate-hub-wizard {
	width: 100%;
	max-width: 700px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

/* ==========================================================================
   Header
   ========================================================================== */

.affiliate-hub-wizard-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 30px;
	border-bottom: 1px solid #e0e0e0;
	background: #fafafa;
}

.affiliate-hub-wizard-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
}

.affiliate-hub-wizard-logo .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #2271b1;
}

.affiliate-hub-wizard-skip {
	font-size: 13px;
	color: #757575;
	text-decoration: none;
	transition: color 0.15s ease;
}

.affiliate-hub-wizard-skip:hover,
.affiliate-hub-wizard-skip:focus {
	color: #2271b1;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.affiliate-hub-wizard-progress {
	padding: 24px 30px 0;
}

.affiliate-hub-wizard-steps {
	display: flex;
	justify-content: space-between;
	margin-bottom: 12px;
}

.affiliate-hub-wizard-step {
	display: flex;
	align-items: center;
	gap: 8px;
	opacity: 0.4;
	transition: opacity 0.3s ease;
}

.affiliate-hub-wizard-step.active,
.affiliate-hub-wizard-step.completed {
	opacity: 1;
}

.affiliate-hub-wizard-step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 600;
	background: #e0e0e0;
	color: #757575;
	transition: background 0.3s ease, color 0.3s ease;
}

.affiliate-hub-wizard-step.active .affiliate-hub-wizard-step-number {
	background: #2271b1;
	color: #fff;
}

.affiliate-hub-wizard-step.completed .affiliate-hub-wizard-step-number {
	background: #00a32a;
	color: #fff;
}

.affiliate-hub-wizard-step-label {
	font-size: 13px;
	font-weight: 500;
	color: #50575e;
}

.affiliate-hub-wizard-progress-bar {
	height: 4px;
	background: #e0e0e0;
	border-radius: 2px;
	margin-bottom: 0;
	overflow: hidden;
}

.affiliate-hub-wizard-progress-fill {
	height: 100%;
	background: #2271b1;
	border-radius: 2px;
	transition: width 0.4s ease;
}

/* ==========================================================================
   Step Content
   ========================================================================== */

.affiliate-hub-wizard-step-content {
	display: none;
}

.affiliate-hub-wizard-step-content.active {
	display: block;
}

.affiliate-hub-wizard-step-inner {
	padding: 30px;
}

.affiliate-hub-wizard-step-inner h2 {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 600;
	color: #1d2327;
}

.affiliate-hub-wizard-description {
	margin: 0 0 24px;
	font-size: 14px;
	color: #757575;
	line-height: 1.6;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.affiliate-hub-wizard-field {
	margin-bottom: 24px;
}

.affiliate-hub-wizard-field > label {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.affiliate-hub-wizard-field-desc {
	margin: 0 0 10px;
	font-size: 13px;
	color: #757575;
}

.affiliate-hub-wizard-input {
	width: 100%;
	max-width: 300px;
	padding: 8px 12px;
	font-size: 14px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	box-shadow: none;
	transition: border-color 0.15s ease;
}

.affiliate-hub-wizard-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.affiliate-hub-wizard-input.affiliate-hub-wizard-input-error {
	border-color: #d63638;
	box-shadow: 0 0 0 1px #d63638;
}

.affiliate-hub-wizard-preview {
	margin-top: 8px;
	font-size: 13px;
	color: #757575;
}

.affiliate-hub-wizard-preview code {
	padding: 3px 8px;
	background: #f6f7f7;
	border-radius: 3px;
	font-size: 12px;
}

/* Radio buttons */
.affiliate-hub-wizard-radio-group {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.affiliate-hub-wizard-radio {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 16px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.affiliate-hub-wizard-radio:hover {
	border-color: #2271b1;
	background: #f9fbfd;
}

.affiliate-hub-wizard-radio input[type="radio"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.affiliate-hub-wizard-radio-label {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.affiliate-hub-wizard-radio-label strong {
	font-size: 14px;
	color: #1d2327;
}

.affiliate-hub-wizard-radio-label span {
	font-size: 12px;
	color: #757575;
}

/* Checkboxes */
.affiliate-hub-wizard-checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.affiliate-hub-wizard-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	color: #1d2327;
}

/* ==========================================================================
   Modules (Toggle Switches)
   ========================================================================== */

.affiliate-hub-wizard-modules {
	display: flex;
	flex-direction: column;
	gap: 1px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
}

.affiliate-hub-wizard-module {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: #fff;
	border-bottom: 1px solid #f0f0f0;
}

.affiliate-hub-wizard-module:last-child {
	border-bottom: none;
}

.affiliate-hub-wizard-module-info {
	flex: 1;
	padding-right: 16px;
}

.affiliate-hub-wizard-module-info strong {
	display: block;
	font-size: 14px;
	color: #1d2327;
	margin-bottom: 2px;
}

.affiliate-hub-wizard-module-info p {
	margin: 0;
	font-size: 12px;
	color: #757575;
	line-height: 1.4;
}

/* Toggle switch */
.affiliate-hub-wizard-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
	cursor: pointer;
}

.affiliate-hub-wizard-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.affiliate-hub-wizard-toggle-slider {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #c3c4c7;
	border-radius: 12px;
	transition: background 0.25s ease;
}

.affiliate-hub-wizard-toggle-slider::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.25s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.affiliate-hub-wizard-toggle input:checked + .affiliate-hub-wizard-toggle-slider {
	background: #2271b1;
}

.affiliate-hub-wizard-toggle input:checked + .affiliate-hub-wizard-toggle-slider::before {
	transform: translateX(20px);
}

.affiliate-hub-wizard-toggle input:focus + .affiliate-hub-wizard-toggle-slider {
	box-shadow: 0 0 0 2px #2271b1;
}

/* ==========================================================================
   Success (Step 4)
   ========================================================================== */

.affiliate-hub-wizard-success {
	text-align: center;
	padding: 50px 30px;
}

.affiliate-hub-wizard-success-icon .dashicons {
	font-size: 64px;
	width: 64px;
	height: 64px;
	color: #00a32a;
	margin-bottom: 16px;
}

.affiliate-hub-wizard-success h2 {
	font-size: 26px;
}

.affiliate-hub-wizard-success-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 30px;
	flex-wrap: wrap;
}

.affiliate-hub-wizard-success-actions .button-hero {
	font-size: 15px;
	padding: 10px 24px;
	height: auto;
	line-height: 1.5;
}

/* ==========================================================================
   Step Actions (Navigation)
   ========================================================================== */

.affiliate-hub-wizard-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 30px;
	border-top: 1px solid #e0e0e0;
	background: #fafafa;
}

.affiliate-hub-wizard-actions .button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.affiliate-hub-wizard-actions .button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1;
}

.affiliate-hub-wizard-saving {
	opacity: 0.7;
	cursor: wait;
}

/* ==========================================================================
   Error Messages
   ========================================================================== */

.affiliate-hub-wizard-error {
	margin-top: 16px;
	padding: 10px 14px;
	background: #fcf0f1;
	border: 1px solid #d63638;
	border-radius: 4px;
	color: #d63638;
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.affiliate-hub-wizard-error .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 600px) {
	.affiliate-hub-wizard-wrap {
		padding: 20px 10px;
	}

	.affiliate-hub-wizard-header,
	.affiliate-hub-wizard-step-inner,
	.affiliate-hub-wizard-actions,
	.affiliate-hub-wizard-progress {
		padding-left: 20px;
		padding-right: 20px;
	}

	.affiliate-hub-wizard-step-label {
		display: none;
	}

	.affiliate-hub-wizard-steps {
		justify-content: center;
		gap: 16px;
	}

	.affiliate-hub-wizard-radio {
		padding: 10px 12px;
	}

	.affiliate-hub-wizard-success-actions {
		flex-direction: column;
	}

	.affiliate-hub-wizard-success-actions .button {
		width: 100%;
		text-align: center;
		justify-content: center;
	}
}
