/* ==========================================================================
   Roadside Assist Pro — استایل فرم مشتری
   جهت‌گیری بصری: «برگه سفارش امداد جاده‌ای» — بند راهنمای جاده‌ای شب‌رنگ
   با شاخص چراغ چرخان کهربایی (beacon) به‌عنوان رنگ اصلی اکشن،
   و نشانگرهای دایره‌ای شماره‌دار مانند تابلوهای کیلومتر بزرگراه که با
   خط‌چین عمودی (شبیه خط وسط جاده) به هم متصل می‌شوند.
   ========================================================================== */

.rap-order-app {
	--rap-ink: #0b1220;
	--rap-steel: #1e293b;
	--rap-amber: #f59e0b;
	--rap-amber-dark: #b45309;
	--rap-teal: #0ea5e9;
	--rap-success: #16a34a;
	--rap-success-bg: #f0fdf4;
	--rap-danger: #dc2626;
	--rap-danger-bg: #fef2f2;
	--rap-line: #e2e8f0;
	--rap-text: #0f172a;
	--rap-text-muted: #64748b;
	--rap-paper: #ffffff;
	--rap-radius: 14px;

	direction: rtl;
	font-family: 'Vazirmatn', Tahoma, sans-serif;
	color: var(--rap-text);
	max-width: 640px;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.6;
}

.rap-order-app * {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------------- */
/* بدنه اصلی برگه سفارش                                                    */
/* ---------------------------------------------------------------------- */

.rap-ticket {
	background: var(--rap-paper);
	border-radius: var(--rap-radius);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px -16px rgba(15, 23, 42, 0.25);
	border: 1px solid var(--rap-line);
}

.rap-ticket__header {
	background: var(--rap-ink);
	background-image: radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.18), transparent 55%);
	padding: 24px 26px 22px;
	color: #fff;
}

.rap-ticket__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--rap-amber);
	text-transform: uppercase;
}

.rap-ticket__eyebrow::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--rap-amber);
	box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
}

.rap-ticket__title {
	margin: 8px 0 0;
	font-size: 21px;
	font-weight: 800;
	color: #fff;
}

.rap-step {
	padding: 26px;
}

/* ---------------------------------------------------------------------- */
/* «جاده» — ردیف ایستگاه‌های شماره‌دار با خط‌چین اتصال                     */
/* ---------------------------------------------------------------------- */

.rap-road {
	position: relative;
	padding-inline-start: 40px;
}

.rap-road::before {
	content: '';
	position: absolute;
	top: 6px;
	bottom: 30px;
	inset-inline-start: 15px;
	width: 0;
	border-inline-start: 2px dashed var(--rap-line);
}

.rap-station {
	position: relative;
	margin-bottom: 28px;
}

.rap-station--last {
	margin-bottom: 0;
}

.rap-station__marker {
	position: absolute;
	inset-inline-start: -40px;
	top: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--rap-ink);
	color: var(--rap-amber);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 13px;
	z-index: 1;
	box-shadow: 0 0 0 4px var(--rap-paper);
}

.rap-station__body {
	padding-top: 2px;
}

/* ---------------------------------------------------------------------- */
/* فیلدهای عمومی                                                          */
/* ---------------------------------------------------------------------- */

.rap-field-group {
	margin-bottom: 14px;
}

.rap-field-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.rap-field-row .rap-field-group {
	flex: 1 1 200px;
}

.rap-field-row--inline {
	flex-wrap: nowrap;
}

.rap-label {
	display: block;
	font-weight: 700;
	margin-bottom: 8px;
	font-size: 14px;
	color: var(--rap-text);
}

.rap-label--section {
	margin: 22px 0 10px;
}

.rap-input {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid var(--rap-line);
	border-radius: 10px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	color: var(--rap-text);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.rap-input::placeholder {
	color: #9aa5b1;
}

.rap-input:focus {
	outline: none;
	border-color: var(--rap-teal);
	box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.rap-input--ltr {
	text-align: left;
	direction: ltr;
}

.rap-input--file {
	padding: 8px 14px;
}

.rap-hint {
	font-size: 12.5px;
	color: var(--rap-text-muted);
	display: block;
	margin-top: 6px;
}

/* ---------------------------------------------------------------------- */
/* انتخاب نوع خدمت                                                        */
/* ---------------------------------------------------------------------- */

.rap-service-types {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.rap-service-type {
	position: relative;
	border: 1.5px solid var(--rap-line);
	border-radius: 12px;
	padding: 14px 12px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	transition: 0.15s;
	text-align: center;
}

.rap-service-type input {
	position: absolute;
	opacity: 0;
	inset: 0;
	margin: 0;
	cursor: pointer;
}

.rap-service-type__icon {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	color: var(--rap-text-muted);
	transition: 0.15s;
}

.rap-service-type__icon svg {
	width: 19px;
	height: 19px;
}

.rap-service-type:has(input:checked) {
	border-color: var(--rap-amber);
	background: #fffbeb;
	color: var(--rap-amber-dark);
}

.rap-service-type:has(input:checked) .rap-service-type__icon {
	background: var(--rap-amber);
	color: var(--rap-ink);
}

.rap-service-type:has(input:focus-visible) {
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

/* ---------------------------------------------------------------------- */
/* تب انتخاب حالت: نقشه یا ورود دستی مسافت                                */
/* ---------------------------------------------------------------------- */

.rap-mode-tabs {
	display: flex;
	gap: 6px;
	background: #f1f5f9;
	border-radius: 10px;
	padding: 4px;
	margin-bottom: 14px;
}

.rap-mode-tab {
	flex: 1;
	border: none;
	background: transparent;
	padding: 9px 10px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	color: var(--rap-text-muted);
	cursor: pointer;
	transition: 0.15s;
}

.rap-mode-tab--active {
	background: #fff;
	color: var(--rap-ink);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

/* ---------------------------------------------------------------------- */
/* کنترل‌های نقشه                                                         */
/* ---------------------------------------------------------------------- */

.rap-map-controls {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.rap-chip {
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	border: 1.5px solid var(--rap-line);
	cursor: pointer;
	background: #fff;
	color: var(--rap-text-muted);
	transition: 0.15s;
	font-family: inherit;
}

.rap-chip--ghost {
	border-color: transparent;
	background: #f1f5f9;
}

.rap-chip--active.rap-chip--origin {
	border-color: var(--rap-teal);
	color: var(--rap-teal);
	background: #f0f9ff;
}

.rap-chip--active.rap-chip--destination {
	border-color: var(--rap-amber);
	color: var(--rap-amber-dark);
	background: #fffbeb;
}

.rap-map-frame {
	border-radius: 12px;
	overflow: hidden;
	border: 1.5px solid var(--rap-line);
	margin-bottom: 12px;
}

.rap-map {
	width: 100%;
	height: 300px;
	display: block;
}

/* ---------------------------------------------------------------------- */
/* نمایش آدرس مبدأ/مقصد                                                   */
/* ---------------------------------------------------------------------- */

.rap-addresses {
	background: #f8fafc;
	border: 1px solid var(--rap-line);
	border-radius: 12px;
	padding: 14px 16px;
	font-size: 13px;
}

.rap-address-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.rap-address-connector {
	width: 0;
	height: 12px;
	border-inline-start: 2px dotted #cbd5e1;
	margin-inline-start: 4px;
}

.rap-address-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.rap-address-dot--origin {
	background: var(--rap-teal);
}

.rap-address-dot--destination {
	background: var(--rap-amber);
}

.rap-address-text {
	color: var(--rap-text);
}

.rap-distance-info {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed var(--rap-line);
	font-weight: 700;
	color: var(--rap-ink);
	font-size: 13.5px;
}

.rap-distance-info__sep {
	margin: 0 6px;
	color: var(--rap-text-muted);
}

/* ---------------------------------------------------------------------- */
/* جعبه قیمت                                                              */
/* ---------------------------------------------------------------------- */

.rap-price-box {
	background: var(--rap-ink);
	border-radius: 12px;
	padding: 18px 20px;
	margin-top: 16px;
	color: #fff;
}

.rap-price-box__title {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	color: var(--rap-amber);
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.rap-price-breakdown {
	font-size: 13px;
	color: #cbd5e1;
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 12px;
}

.rap-price-breakdown div {
	display: flex;
	justify-content: space-between;
}

.rap-price-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 15px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding-top: 12px;
}

.rap-price-total strong {
	font-size: 22px;
	font-weight: 800;
	color: var(--rap-amber);
}

/* ---------------------------------------------------------------------- */
/* دکمه‌ها                                                                */
/* ---------------------------------------------------------------------- */

.rap-btn {
	border-radius: 10px;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 700;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: 0.15s;
	background: #f1f5f9;
	color: var(--rap-text);
	font-family: inherit;
	white-space: nowrap;
}

.rap-btn--outline {
	background: #fff;
	border-color: var(--rap-line);
	color: var(--rap-text);
}

.rap-btn--outline:hover {
	border-color: var(--rap-teal);
	color: var(--rap-teal);
}

.rap-btn--primary {
	background: var(--rap-amber);
	color: var(--rap-ink);
	padding: 14px 20px;
	font-size: 15.5px;
	margin-top: 22px;
	box-shadow: 0 8px 20px -8px rgba(245, 158, 11, 0.6);
}

.rap-btn--primary:hover {
	background: var(--rap-amber-dark);
	color: #fff;
}

.rap-btn--block {
	width: 100%;
}

.rap-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
}

/* ---------------------------------------------------------------------- */
/* پیام‌ها                                                                */
/* ---------------------------------------------------------------------- */

.rap-alert {
	padding: 14px 16px;
	border-radius: 10px;
	font-size: 13.5px;
	margin-top: 16px;
}

.rap-alert--error {
	background: var(--rap-danger-bg);
	color: var(--rap-danger);
	border: 1px solid #fecaca;
}

.rap-alert--success {
	background: var(--rap-success-bg);
	color: var(--rap-success);
	border: 1px solid #bbf7d0;
}

.rap-order-number-row {
	margin-top: 6px;
	font-size: 13px;
}

.rap-order-number {
	font-weight: 800;
	letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------------- */
/* انتخاب درگاه پرداخت                                                    */
/* ---------------------------------------------------------------------- */

.rap-gateways {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rap-gateway-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 1.5px solid var(--rap-line);
	border-radius: 12px;
	padding: 15px 18px;
	cursor: pointer;
	background: #fff;
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	color: var(--rap-text);
	transition: 0.15s;
}

.rap-gateway-option:hover {
	border-color: var(--rap-amber);
	background: #fffbeb;
	color: var(--rap-amber-dark);
}

/* ---------------------------------------------------------------------- */
/* واکنش‌گرا                                                               */
/* ---------------------------------------------------------------------- */

/* ---------------------------------------------------------------------- */
/* نتیجه پیگیری سفارش                                                    */
/* ---------------------------------------------------------------------- */

.rap-track-result {
	margin-top: 22px;
	padding-top: 22px;
	border-top: 1px dashed var(--rap-line);
}

.rap-track-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.rap-track-order-number {
	font-size: 16px;
	font-weight: 800;
	color: var(--rap-ink);
	margin-top: 2px;
}

.rap-badge {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 700;
}

.rap-badge--pending { background: #fef3c7; color: #92400e; }
.rap-badge--accepted { background: #dbeafe; color: #1e40af; }
.rap-badge--in_progress { background: #e0e7ff; color: #3730a3; }
.rap-badge--completed { background: #d1fae5; color: #065f46; }
.rap-badge--cancelled { background: #fee2e2; color: #991b1b; }

.rap-track-driver {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f8fafc;
	border: 1px solid var(--rap-line);
	border-radius: 10px;
	padding: 12px 14px;
	margin-top: 12px;
	font-size: 13.5px;
}

.rap-track-driver__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--rap-ink);
	color: var(--rap-amber);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	flex-shrink: 0;
}

/* ---------------------------------------------------------------------- */
/* تایم‌لاین روند سفارش (با همان زبان بصری «جاده» فرم ثبت سفارش)           */
/* ---------------------------------------------------------------------- */

.rap-timeline {
	position: relative;
	padding-inline-start: 30px;
}

.rap-timeline::before {
	content: '';
	position: absolute;
	top: 4px;
	bottom: 4px;
	inset-inline-start: 9px;
	border-inline-start: 2px dashed var(--rap-line);
}

.rap-timeline-item {
	position: relative;
	padding-bottom: 18px;
}

.rap-timeline-item:last-child {
	padding-bottom: 0;
}

.rap-timeline-item::before {
	content: '';
	position: absolute;
	inset-inline-start: -30px;
	top: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--rap-amber);
	box-shadow: 0 0 0 4px var(--rap-paper);
}

.rap-timeline-item__label {
	font-weight: 700;
	font-size: 13.5px;
	color: var(--rap-text);
}

.rap-timeline-item__time {
	font-size: 12px;
	color: var(--rap-text-muted);
	margin-top: 2px;
}
	.rap-step {
		padding: 20px 16px;
	}

	.rap-road {
		padding-inline-start: 34px;
	}

	.rap-station__marker {
		inset-inline-start: -34px;
		width: 28px;
		height: 28px;
		font-size: 12px;
	}

	.rap-field-row {
		flex-direction: column;
	}

	.rap-field-row--inline {
		flex-direction: row;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rap-order-app * {
		transition: none !important;
	}
}
