/**
 * Onboarding Wizard Styles
 *
 * Modal wizard for collecting site information from users on empty sites.
 *
 * @since 2.7.0
 */

/* ==========================================================================
   Modal Overlay
   ========================================================================== */

.saiap-wizard-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100100;
	display: flex;
	align-items: center;
	justify-content: center;
}

.saiap-wizard-modal__backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.saiap-wizard-modal__container {
	position: relative;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	width: 90%;
	max-width: 640px;
	max-height: 90vh;
	overflow-y: auto;
	animation: saiap-wizard-slide-up 0.3s ease-out;
}

@keyframes saiap-wizard-slide-up {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.saiap-wizard-modal__content {
	padding: 32px 40px 40px;
}

/* Back Button */
.saiap-wizard-modal__back {
	display: flex;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	color: #64748b;
	font-size: 14px;
	cursor: pointer;
	padding: 0;
	margin-bottom: 24px;
	transition: color 0.15s ease;
}

.saiap-wizard-modal__back:hover {
	color: #1e1e1e;
}

.saiap-wizard-modal__back .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* Body scroll lock */
body.saiap-wizard-open {
	overflow: hidden;
}

/* ==========================================================================
   Wizard Header
   ========================================================================== */

.saiap-wizard__header {
	text-align: center;
	margin-bottom: 32px;
}

.saiap-wizard__title {
	font-size: 28px;
	font-weight: 700;
	color: #1e1e1e;
	margin: 0 0 8px;
	line-height: 1.2;
}

.saiap-wizard__subtitle {
	font-size: 15px;
	color: #64748b;
	margin: 0;
	line-height: 1.5;
}

/* ==========================================================================
   Form Sections
   ========================================================================== */

.saiap-wizard__section {
	margin-bottom: 28px;
	padding-bottom: 28px;
	border-bottom: 1px solid #e2e8f0;
}

.saiap-wizard__section:last-of-type {
	border-bottom: none;
	margin-bottom: 24px;
	padding-bottom: 0;
}

.saiap-wizard__section-title {
	font-size: 16px;
	font-weight: 600;
	color: #1e1e1e;
	margin: 0 0 16px;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.saiap-wizard__field {
	margin-bottom: 20px;
}

.saiap-wizard__field:last-child {
	margin-bottom: 0;
}

.saiap-wizard__label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	margin-bottom: 6px;
}

.saiap-wizard__required {
	color: #ef4444;
	margin-left: 2px;
}

.saiap-wizard__hint {
	font-weight: 400;
	color: #64748b;
	margin-left: 4px;
}

.saiap-wizard__optional {
	font-weight: 400;
	color: #94a3b8;
	margin-left: 4px;
}

.saiap-wizard__field-description {
	font-size: 13px;
	color: #64748b;
	margin: 0 0 8px;
	line-height: 1.4;
}

.saiap-wizard__radio-option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	margin-bottom: 8px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s;
}

.saiap-wizard__radio-option:hover {
	border-color: #9ca3af;
	background-color: #f9fafb;
}

.saiap-wizard__radio-option input[type="radio"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.saiap-wizard__radio-option input[type="radio"]:checked + .saiap-wizard__radio-label {
	color: #1e1e1e;
}

.saiap-wizard__radio-option:has(input[type="radio"]:checked) {
	border-color: #2563eb;
	background-color: #eff6ff;
}

.saiap-wizard__radio-label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 14px;
	color: #374151;
}

.saiap-wizard__radio-label strong {
	font-weight: 600;
	color: #1e1e1e;
}

.saiap-wizard__radio-help {
	font-size: 13px;
	color: #64748b;
	line-height: 1.4;
}

.saiap-wizard__help-text {
	font-size: 13px;
	color: #64748b;
	margin: 10px 0 0;
	line-height: 1.4;
}

.saiap-wizard__input,
.saiap-wizard__textarea {
	width: 100%;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.5;
	color: #1e1e1e;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.saiap-wizard__input:focus,
.saiap-wizard__textarea:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.saiap-wizard__input::placeholder,
.saiap-wizard__textarea::placeholder {
	color: #9ca3af;
}

.saiap-wizard__textarea {
	resize: vertical;
	min-height: 80px;
}

/* ==========================================================================
   Tag Input (Seed Topics)
   ========================================================================== */

.saiap-wizard__tags-input {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	min-height: 44px;
	align-items: center;
	cursor: text;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.saiap-wizard__tags-input:focus-within {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.saiap-wizard__tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.saiap-wizard__tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
	border: 1px solid #c7d2fe;
	border-radius: 6px;
	padding: 4px 8px;
	font-size: 13px;
	color: #4338ca;
}

.saiap-wizard__tag-text {
	line-height: 1.3;
}

.saiap-wizard__tag-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 0;
	margin: 0 -2px 0 2px;
	cursor: pointer;
	color: #6366f1;
	opacity: 0.7;
	transition: opacity 0.15s ease;
}

.saiap-wizard__tag-remove:hover {
	opacity: 1;
}

.saiap-wizard__tag-remove .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.saiap-wizard__tags-text-input {
	flex: 1;
	min-width: 120px;
	border: none;
	padding: 4px 0;
	font-size: 14px;
	outline: none;
	background: transparent;
}

.saiap-wizard__tags-text-input::placeholder {
	color: #9ca3af;
}

/* ==========================================================================
   Repeater (Competitor URLs)
   ========================================================================== */

.saiap-wizard__repeater {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.saiap-wizard__repeater-item {
	display: flex;
	gap: 8px;
	align-items: center;
}

.saiap-wizard__repeater-input {
	flex: 1;
}

.saiap-wizard__repeater-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #dc2626;
	cursor: pointer;
	transition: background-color 0.15s ease;
	flex-shrink: 0;
}

.saiap-wizard__repeater-remove:hover {
	background: #fee2e2;
}

.saiap-wizard__repeater-remove .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.saiap-wizard__add-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	color: #6366f1;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	padding: 8px 0;
	transition: color 0.15s ease;
}

.saiap-wizard__add-btn:hover {
	color: #4f46e5;
}

.saiap-wizard__add-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ==========================================================================
   Actions
   ========================================================================== */

.saiap-wizard__actions {
	text-align: center;
	padding-top: 8px;
}

.saiap-wizard__actions .button-hero {
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	border-color: #4f46e5;
	color: #fff;
	font-size: 16px;
	padding: 14px 48px;
	height: auto;
	line-height: 1.4;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.saiap-wizard__actions .button-hero:hover {
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
	transform: translateY(-1px);
}

.saiap-wizard__actions .button-hero:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

.saiap-wizard__footnote {
	font-size: 12px;
	color: #94a3b8;
	margin: 12px 0 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
	.saiap-wizard-modal__content {
		padding: 24px;
	}

	.saiap-wizard__title {
		font-size: 22px;
	}

	.saiap-wizard__actions .button-hero {
		width: 100%;
		padding: 14px 24px;
	}
}
