/**
 * Setup wizard styles.
 *
 * @package Magid_Collaborator
 */

/* Container */
.wp-collaborator-setup-wizard {
	max-width: 900px;
	margin: 20px auto;
}

.wp-collaborator-wizard-container {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

/* Progress Indicator */
.wizard-progress {
	display: flex;
	justify-content: space-between;
	padding: 30px 40px 20px;
	border-bottom: 1px solid #dcdcde;
	background: #f6f7f7;
}

.progress-step {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	position: relative;
	opacity: 0.5;
	transition: opacity 0.3s ease;
}

.progress-step.active,
.progress-step.completed {
	opacity: 1;
}

.progress-step::after {
	content: '';
	position: absolute;
	top: 18px;
	left: 50%;
	width: 100%;
	height: 2px;
	background: #dcdcde;
	z-index: -1;
}

.progress-step:last-child::after {
	display: none;
}

.progress-step.completed::after {
	background: #2271b1;
}

.step-number {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #dcdcde;
	color: #50575e;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.3s ease;
}

.progress-step.active .step-number {
	background: #2271b1;
	color: #fff;
	transform: scale(1.1);
}

.progress-step.completed .step-number {
	background: #00a32a;
	color: #fff;
}

.progress-step.completed .step-number::before {
	content: '\f147';
	font-family: 'dashicons';
	font-size: 20px;
}

.progress-step.completed .step-number {
	font-size: 0;
}

.step-label {
	font-size: 13px;
	font-weight: 500;
	color: #50575e;
	text-align: center;
}

.progress-step.active .step-label {
	color: #2271b1;
	font-weight: 600;
}

/* Wizard Steps */
.wizard-steps {
	padding: 40px;
	min-height: 400px;
}

.wizard-step {
	display: none;
}

.wizard-step.active {
	display: block;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.step-icon {
	text-align: center;
	margin-bottom: 20px;
}

.step-icon .dashicons {
	width: 60px;
	height: 60px;
	font-size: 60px;
	color: #2271b1;
}

.wizard-step h2 {
	text-align: center;
	margin: 0 0 15px;
	font-size: 28px;
	color: #1d2327;
}

.step-description {
	text-align: center;
	font-size: 16px;
	color: #50575e;
	margin: 0 auto 30px;
	max-width: 600px;
	line-height: 1.6;
}

/* Features List */
.wizard-features {
	max-width: 500px;
	margin: 30px auto;
}

.feature-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	margin-bottom: 10px;
	background: #f6f7f7;
	border-radius: 4px;
}

.feature-item .dashicons {
	color: #00a32a;
	width: 24px;
	height: 24px;
	font-size: 24px;
	flex-shrink: 0;
}

/* Instructions */
.wizard-instructions {
	max-width: 700px;
	margin: 0 auto 30px;
}

.instruction-list {
	counter-reset: instruction-counter;
	list-style: none;
	padding: 0;
	margin: 0;
}

.instruction-list li {
	counter-increment: instruction-counter;
	position: relative;
	padding: 20px 20px 20px 70px;
	margin-bottom: 15px;
	background: #f6f7f7;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
}

.instruction-list li::before {
	content: counter(instruction-counter);
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	background: #2271b1;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 14px;
}

.instruction-list li strong {
	display: block;
	margin-bottom: 8px;
	color: #1d2327;
}

.instruction-list li p {
	margin: 8px 0 0;
}

.instruction-list li .notice {
	margin: 10px 0 0;
}

/* Credential Fields */
.credential-fields {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
	margin: 15px 0;
}

.field-row {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f1;
}

.field-row:last-child {
	border-bottom: none;
}

.field-row label {
	font-weight: 600;
	min-width: 120px;
	color: #1d2327;
}

.field-row code {
	background: #f6f7f7;
	padding: 6px 12px;
	border-radius: 3px;
	font-size: 14px;
}

.field-row .description {
	font-style: italic;
	color: #646970;
}

/* Connection Info */
.wizard-connection-info {
	max-width: 500px;
	margin: 30px auto;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
}

.info-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #dcdcde;
}

.info-row:last-child {
	border-bottom: none;
}

.info-row .label {
	font-weight: 600;
	color: #1d2327;
}

.info-row .value {
	display: flex;
	align-items: center;
	gap: 8px;
}

.info-row .value .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

/* Wizard Actions */
.wizard-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 15px;
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid #dcdcde;
}

.wizard-actions .button-hero {
	font-size: 16px;
	padding: 8px 24px;
	height: auto;
	line-height: 1.5;
}

.wizard-skip {
	color: #646970;
	text-decoration: none;
	font-size: 14px;
	margin-left: 15px;
}

.wizard-skip:hover {
	color: #2271b1;
	text-decoration: underline;
}

/* Button Dashicons Alignment - Universal fix for all buttons */
.wizard-step .button .dashicons {
	vertical-align: middle;
	margin-right: 6px;
	line-height: 1;
}

.wizard-step .button .dashicons-arrow-right-alt2 {
	margin-right: 0;
	margin-left: 6px;
}

.wizard-step .button .dashicons-arrow-left-alt2 {
	margin-right: 6px;
	margin-left: 0;
}

/* Copy Button */
.copy-to-clipboard {
	margin-left: 10px;
	vertical-align: middle;
}

.copy-to-clipboard.success {
	background: #00a32a;
	border-color: #00a32a;
	color: #fff;
}

.copy-to-clipboard .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	line-height: 1;
}

/* Validation Message */
#wizard-validation-message {
	margin: 20px 0;
}

#wizard-validation-message .notice {
	margin: 0 0 10px;
}

/* Button States */
.button-success {
	background: #00a32a;
	border-color: #00a32a;
	color: #fff;
}

.button-success:hover,
.button-success:focus {
	background: #008a20;
	border-color: #008a20;
	color: #fff;
}

/* Responsive */
@media screen and (max-width: 782px) {
	.wizard-progress {
		padding: 20px 15px 10px;
	}

	.step-label {
		font-size: 11px;
	}

	.wizard-steps {
		padding: 30px 20px;
	}

	.wizard-step h2 {
		font-size: 24px;
	}

	.step-description {
		font-size: 14px;
	}

	.instruction-list li {
		padding: 15px 15px 15px 60px;
	}

	.instruction-list li::before {
		left: 15px;
		width: 28px;
		height: 28px;
		font-size: 12px;
	}

	.field-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.field-row label {
		min-width: auto;
	}

	.wizard-actions {
		flex-direction: column-reverse;
		gap: 10px;
	}

	.wizard-actions .button {
		width: 100%;
		text-align: center;
	}

	.wizard-skip {
		margin-left: 0;
		margin-top: 10px;
	}
}

@media screen and (max-width: 600px) {
	.progress-step {
		flex-direction: column;
	}

	.step-label {
		display: none;
	}

	.progress-step.active .step-label {
		display: block;
		position: absolute;
		top: 50px;
		white-space: nowrap;
	}
}
