/*
 * استایل فرانت‌اند ویزارد عیب‌یابی هوشمند — پشتیبانی کامل از راست‌به‌چپ (RTL).
 * ظاهر عمومی (تیتر، نوار مراحل شماره‌دار، کارت‌های آیکون‌دار) با الگوی طراحی افزونه مشابه هم‌راستا شده است.
 */

.str-wizard {
	/* رنگ اصلی از تنظیمات پنل مدیریت خوانده می‌شود (توسط wizard.js روی documentElement تنظیم می‌شود)؛
	   در نبود آن، به‌صورت پیش‌فرض به یک سبزآبی تیره (هم‌راستا با طراحی مرجع) بازمی‌گردد. */
	--str-primary: var( --str-wizard-primary, #16413a );
	--str-primary-tint: color-mix( in srgb, var( --str-primary ) 12%, #ffffff );
	--str-primary-tint-strong: color-mix( in srgb, var( --str-primary ) 20%, #ffffff );
	--str-ink: #101828;
	--str-muted: #667085;
	--str-border: #e4e7ec;
	--str-radius: 12px;
	--str-radius-lg: 16px;
	direction: rtl;
	text-align: right;
	font-family: inherit;
	max-width: 860px;
	margin: 0 auto;
	color: var( --str-ink );
	box-sizing: border-box;
}

.str-wizard * {
	box-sizing: border-box;
}

/* ---------------- تیتر و زیرتیتر بالای ویزارد ---------------- */

.str-wizard__header {
	text-align: center;
	margin-bottom: 22px;
}

.str-wizard__title {
	font-size: 28px;
	font-weight: 800;
	line-height: 1.4;
	margin: 0 0 8px;
	color: var( --str-ink );
}

.str-wizard__subtitle {
	font-size: 15px;
	color: var( --str-muted );
	margin: 0;
	line-height: 1.8;
}

/* ---------------- نوار مراحل شماره‌دار ---------------- */

.str-progress {
	display: flex;
	align-items: flex-start;
	margin-bottom: 26px;
	padding: 0 4px;
}

.str-progress__step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	width: 84px;
}

.str-progress__label {
	font-size: 11px;
	color: var( --str-muted );
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.str-progress__dot {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	background: #fff;
	border: 2px solid var( --str-border );
	color: var( --str-muted );
	transition: background .2s, border-color .2s, color .2s;
}

.str-progress__line {
	flex: 1 1 auto;
	height: 2px;
	background: var( --str-border );
	margin-top: 15px;
	min-width: 12px;
	transition: background .2s;
}

.str-progress__step.is-active .str-progress__label,
.str-progress__step.is-done .str-progress__label {
	color: var( --str-ink );
}

.str-progress__step.is-active .str-progress__dot {
	background: var( --str-primary );
	border-color: var( --str-primary );
	color: #fff;
	box-shadow: 0 0 0 4px var( --str-primary-tint );
}

.str-progress__step.is-done .str-progress__dot {
	background: var( --str-primary-tint-strong );
	border-color: var( --str-primary );
	color: var( --str-primary );
}

.str-progress__line.is-done {
	background: var( --str-primary );
}

@media ( max-width: 640px ) {
	.str-progress__label { display: none; }
	.str-progress__step { width: auto; }
}

/* ---------------- جستجو ---------------- */

.str-wizard__search {
	position: relative;
	margin-bottom: 24px;
}

.str-wizard__search-label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.str-input,
.str-select,
.str-textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #d0d5dd;
	border-radius: var(--str-radius);
	font-size: 15px;
	background: #fff;
}

.str-search-results {
	position: absolute;
	inset-inline: 0;
	top: 100%;
	background: #fff;
	border: 1px solid #d0d5dd;
	border-radius: var(--str-radius);
	margin-top: 4px;
	max-height: 280px;
	overflow-y: auto;
	z-index: 20;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.str-search-results__item {
	padding: 10px 14px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
}

.str-search-results__item:hover {
	background: #f5f8fb;
}

.str-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 30px 0;
	justify-content: center;
	color: #667085;
}

.str-spinner {
	width: 18px;
	height: 18px;
	border: 3px solid #d0d5dd;
	border-top-color: var(--str-primary);
	border-radius: 50%;
	animation: str-spin 0.8s linear infinite;
}

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

.str-step {
	background: #fff;
	border: 1px solid var( --str-border );
	border-radius: var(--str-radius-lg);
	padding: 22px;
	margin-bottom: 16px;
}

.str-step__title {
	font-size: 19px;
	font-weight: 700;
	margin: 0 0 16px;
}

/* ---------------- کارت‌های انتخاب (نوع دستگاه/برند/مدل/دسته‌بندی) ---------------- */

.str-option-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.str-option-card {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px solid var( --str-border );
	border-radius: var(--str-radius-lg);
	padding: 16px;
	text-align: right;
	cursor: pointer;
	background: #fff;
	transition: border-color .15s, box-shadow .15s, transform .1s;
}

.str-option-card:hover {
	border-color: var(--str-primary);
	box-shadow: 0 4px 14px rgba(16, 24, 40, .08);
	transform: translateY(-1px);
}

.str-option-card.is-selected {
	border-color: var(--str-primary);
	box-shadow: 0 0 0 2px var( --str-primary-tint );
}

.str-option-card__icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var( --str-primary-tint );
	color: var( --str-primary );
	display: flex;
	align-items: center;
	justify-content: center;
}

.str-option-card__icon svg {
	width: 22px;
	height: 22px;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	fill: none;
}

.str-option-card__icon .dashicons {
	width: 22px;
	height: 22px;
	font-size: 22px;
	line-height: 1;
}

.str-option-card__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.str-option-card__title {
	font-weight: 700;
	font-size: 15px;
	color: var( --str-ink );
}

.str-option-card__subtitle {
	font-size: 12px;
	color: var( --str-muted );
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.str-node {
	background: #fff;
	border: 1px solid var( --str-border );
	border-radius: var(--str-radius-lg);
	padding: 22px;
}

.str-node__title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 10px;
}

.str-node__description {
	line-height: 1.9;
	margin-bottom: 14px;
}

.str-node__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px;
}

.str-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #f2f4f7;
	font-size: 13px;
}

.str-node__tips,
.str-node__warning {
	border-radius: var(--str-radius);
	padding: 12px 14px;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.8;
}

.str-node__tips {
	background: #ecfdf3;
	border: 1px solid #abefc6;
}

.str-node__warning {
	background: #fef3f2;
	border: 1px solid #fecdca;
}

.str-node__media img,
.str-node__media video {
	max-width: 100%;
	border-radius: var(--str-radius);
	margin-bottom: 10px;
}

.str-node__images {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.str-node__images img {
	width: 120px;
	height: 90px;
	object-fit: cover;
	border-radius: 8px;
}

.str-solutions {
	margin: 16px 0;
}

.str-solution {
	border: 1px solid var( --str-border );
	border-radius: var(--str-radius);
	padding: 14px;
	margin-bottom: 10px;
}

.str-solution__title {
	font-weight: 700;
	margin-bottom: 6px;
}

.str-node__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.str-btn {
	border: none;
	border-radius: var(--str-radius);
	padding: 11px 22px;
	font-size: 15px;
	cursor: pointer;
	background: var(--str-primary);
	color: #fff;
	transition: opacity .15s;
}

.str-btn:hover {
	opacity: .9;
}

.str-btn--secondary {
	background: #f2f4f7;
	color: #1e1e1e;
}

.str-btn--success {
	background: #12b76a;
}

.str-btn--danger {
	background: #f04438;
}

.str-btn--rounded { border-radius: var(--str-radius); }
.str-btn--square { border-radius: 2px; }
.str-btn--pill { border-radius: 999px; }

.str-final-question {
	text-align: center;
	padding: 24px 0;
}

.str-final-question p {
	font-size: 17px;
	font-weight: 600;
	margin-bottom: 16px;
}

.str-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.str-form-grid .str-field--full {
	grid-column: 1 / -1;
}

.str-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.str-field .str-required {
	color: #f04438;
}

.str-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 14px;
	margin: 14px 0;
}

.str-alert {
	border-radius: var(--str-radius);
	padding: 12px 14px;
	margin-bottom: 14px;
	font-size: 14px;
}

.str-alert--success {
	background: #ecfdf3;
	border: 1px solid #abefc6;
	color: #067647;
}

.str-alert--error {
	background: #fef3f2;
	border: 1px solid #fecdca;
	color: #b42318;
}

@media (max-width: 600px) {
	.str-form-grid {
		grid-template-columns: 1fr;
	}
}
