/* تعمیرکار باهوش — floating widget + homepage section */

.rc-st,
.rc-st-panel,
.rc-st-float-tip {
	font-family: "Vazirmatn", "B Zar", Tahoma, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.rc-st-fab {
	position: fixed;
	z-index: 99980;
	left: 18px;
	bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	width: 58px;
	height: 58px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(145deg, #1a5cff 0%, #003366 100%);
	box-shadow: 0 10px 28px rgba(0, 51, 102, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .2s ease, box-shadow .2s ease;
	-webkit-tap-highlight-color: transparent;
}

.rc-st-fab:hover {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 14px 32px rgba(26, 92, 255, 0.4);
}

.rc-st-fab:active {
	transform: scale(.96);
}

.rc-st-fab svg {
	width: 26px;
	height: 26px;
}

.rc-st-fab__pulse {
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid rgba(26, 92, 255, 0.45);
	animation: rc-st-pulse 2s ease-out infinite;
	pointer-events: none;
}

@keyframes rc-st-pulse {
	0% { transform: scale(0.92); opacity: .8; }
	100% { transform: scale(1.25); opacity: 0; }
}

/* App / PWA: lift above bottom navigation */
body.rc-body-app .rc-st-fab,
body.rc-app-shell .rc-st-fab,
body.ach-has-native-nav .rc-st-fab,
body.rc-has-smart-tech.rc-body-app .rc-st-fab {
	bottom: calc(88px + env(safe-area-inset-bottom, 0px));
	left: 14px;
}

.rc-header-ai-btn {
	border: 0;
	background: linear-gradient(135deg, #1a5cff, #003366);
	color: #fff;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(26, 92, 255, 0.28);
	flex: 0 0 auto;
	-webkit-tap-highlight-color: transparent;
}

.rc-header-ai-btn svg {
	width: 18px;
	height: 18px;
}

.rc-st-panel {
	position: fixed;
	z-index: 99990;
	left: 12px;
	right: auto;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	width: min(420px, calc(100vw - 24px));
	max-width: 420px;
	height: min(74vh, 680px);
	max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(ellipse 90% 50% at 100% 0%, rgba(26, 92, 255, .08), transparent 55%),
		linear-gradient(180deg, #f4f8ff 0%, #eef3fa 100%);
	border: 1px solid rgba(197, 212, 232, .9);
	border-radius: 22px;
	box-shadow:
		0 28px 64px rgba(0, 26, 51, 0.28),
		0 2px 0 rgba(255, 255, 255, .55) inset;
	overflow: hidden;
	transform-origin: bottom left;
	animation: rc-st-in .24s cubic-bezier(.2, .8, .2, 1);
	direction: rtl;
	box-sizing: border-box;
}

@keyframes rc-st-in {
	from { opacity: 0; transform: translateY(16px) scale(.97); }
	to { opacity: 1; transform: none; }
}

body.rc-body-app .rc-st-panel,
body.rc-app-shell .rc-st-panel,
body.ach-has-native-nav .rc-st-panel {
	left: 10px;
	right: 10px;
	width: auto;
	max-width: none;
	bottom: calc(78px + env(safe-area-inset-bottom, 0px));
	height: min(68dvh, 620px);
	max-height: calc(100dvh - 90px - env(safe-area-inset-bottom, 0px));
	border-radius: 20px;
}

.rc-st-panel__head {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 8px 10px;
	padding: 14px 14px 12px;
	background:
		linear-gradient(135deg, #001526 0%, #003366 52%, #1654e8 100%);
	color: #e8f0fa;
	flex: 0 0 auto;
}

.rc-st-panel__head > div:first-child {
	min-width: 0;
}

.rc-st-panel__head h3 {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rc-st-panel__head p {
	margin: 3px 0 0;
	font-size: .72rem;
	opacity: .82;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rc-st-panel__close {
	border: 0;
	background: rgba(255,255,255,.14);
	color: #fff;
	width: 34px;
	height: 34px;
	border-radius: 11px;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	flex: 0 0 auto;
	-webkit-tap-highlight-color: transparent;
}

.rc-st-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 10px;
	font-weight: 700;
	padding: 4px 9px;
	border-radius: 999px;
	background: rgba(255,255,255,.16);
	white-space: nowrap;
	backdrop-filter: blur(6px);
}

.rc-st-messages {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overflow-x: hidden;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	scroll-behavior: smooth;
}

.rc-st-msg {
	max-width: 92%;
	padding: 11px 13px;
	border-radius: 16px;
	font-size: .9rem;
	line-height: 1.7;
	white-space: pre-wrap;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.rc-st-msg--plan {
	max-width: 100%;
	width: 100%;
	white-space: normal;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.rc-st-plan {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	min-width: 0;
}

.rc-st-plan__hero {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	border-radius: 18px;
	background:
		linear-gradient(135deg, rgba(26, 92, 255, .12), rgba(0, 51, 102, .06)),
		#fff;
	border: 1px solid rgba(197, 212, 232, .85);
	box-shadow: 0 8px 22px rgba(0, 51, 102, .06);
}

.rc-st-plan__hero-icon {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	background: linear-gradient(145deg, #1a5cff, #003366);
	box-shadow: 0 8px 18px rgba(26, 92, 255, .28);
}

.rc-st-plan__hero-text {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.rc-st-plan__hero-text strong {
	font-size: .98rem;
	font-weight: 800;
	color: #001a33;
	letter-spacing: -.01em;
}

.rc-st-plan__hero-text span {
	font-size: .78rem;
	line-height: 1.55;
	color: #4a5f7a;
	overflow-wrap: anywhere;
}

.rc-st-plan__day {
	border: 1px solid rgba(197, 212, 232, .9);
	border-radius: 18px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 10px 24px rgba(0, 51, 102, .05);
}

.rc-st-plan__day.is-empty {
	opacity: .88;
}

.rc-st-plan__day-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	background:
		linear-gradient(180deg, #f3f7fd 0%, #ebf2fb 100%);
	border-bottom: 1px solid #e4edf7;
}

.rc-st-plan__day-badge {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: .78rem;
	font-weight: 800;
	color: #fff;
	background: linear-gradient(145deg, #1a5cff, #003366);
	box-shadow: 0 6px 14px rgba(26, 92, 255, .25);
}

.rc-st-plan__day-title {
	min-width: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.rc-st-plan__day-title strong {
	font-size: .88rem;
	font-weight: 800;
	color: #003366;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.rc-st-plan__day-title em {
	font-style: normal;
	font-size: .72rem;
	font-weight: 600;
	color: #6b7c93;
}

.rc-st-plan__empty {
	padding: 14px 14px 16px;
	font-size: .82rem;
	color: #7a8ba3;
	text-align: center;
	background:
		repeating-linear-gradient(
			-45deg,
			transparent,
			transparent 6px,
			rgba(197, 212, 232, .18) 6px,
			rgba(197, 212, 232, .18) 12px
		);
}

.rc-st-plan__list {
	display: flex;
	flex-direction: column;
	padding: 6px;
	gap: 6px;
}

.rc-st-job {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 11px 10px;
	border: 1px solid transparent;
	border-radius: 14px;
	background: #f7faff;
	text-align: right;
	cursor: pointer;
	font: inherit;
	color: inherit;
	transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	box-sizing: border-box;
	min-width: 0;
}

.rc-st-job:hover,
.rc-st-job:focus-visible {
	background: #eef4ff;
	border-color: rgba(26, 92, 255, .28);
	box-shadow: 0 8px 20px rgba(26, 92, 255, .1);
	outline: none;
}

.rc-st-job:active {
	transform: scale(.985);
}

.rc-st-job__ord {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border-radius: 10px;
	background: linear-gradient(160deg, #003366, #001a33);
	color: #fff;
	font-size: .75rem;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 10px rgba(0, 26, 51, .2);
}

.rc-st-job__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: stretch;
}

.rc-st-job__title {
	font-size: .9rem;
	font-weight: 800;
	color: #0a1628;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: anywhere;
}

.rc-st-job__sub {
	font-size: .74rem;
	color: #5a6d86;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rc-st-job__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 2px;
}

.rc-st-chip {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: .68rem;
	font-weight: 700;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rc-st-chip--time {
	background: #e8f0ff;
	color: #1a5cff;
}

.rc-st-chip--status {
	background: #eef6ef;
	color: #1f7a4d;
}

.rc-st-chip--city {
	background: #f1f4f8;
	color: #4a5f7a;
}

.rc-st-chip--km {
	background: #fff4e8;
	color: #b35b00;
}

.rc-st-job__go {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #1a5cff;
	background: rgba(26, 92, 255, .08);
	transition: background .15s ease, transform .15s ease;
}

.rc-st-job:hover .rc-st-job__go,
.rc-st-job:focus-visible .rc-st-job__go {
	background: rgba(26, 92, 255, .16);
	transform: translateX(-2px);
}

.rc-st-plan__hint {
	margin: 0;
	font-size: .72rem;
	color: #6b7c93;
	padding: 2px 6px 4px;
	line-height: 1.6;
	text-align: center;
}

.rc-st-plan__hint span {
	display: inline-block;
	padding: 1px 7px;
	border-radius: 999px;
	background: #e8f0fa;
	color: #003366;
	font-weight: 700;
	margin: 0 2px;
}

.rc-st-float-tip {
	position: fixed;
	z-index: 100000;
	padding: 12px 14px;
	border-radius: 14px;
	background: linear-gradient(160deg, #001a33, #00284d);
	color: #e8f0fa;
	font-size: .8rem;
	line-height: 1.65;
	text-align: right;
	box-shadow: 0 16px 36px rgba(0, 26, 51, 0.4);
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px) scale(.98);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
	max-width: min(340px, calc(100vw - 20px));
	direction: rtl;
	border: 1px solid rgba(255,255,255,.1);
	box-sizing: border-box;
	overflow-wrap: anywhere;
}

.rc-st-float-tip.is-on {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.rc-st-msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #d7e3f2;
	color: #0a1628;
	border-bottom-right-radius: 5px;
	box-shadow: 0 4px 14px rgba(0, 51, 102, .04);
}

.rc-st-msg--user {
	align-self: flex-end;
	background: linear-gradient(145deg, #003366, #002244);
	color: #fff;
	border-bottom-left-radius: 5px;
	box-shadow: 0 8px 18px rgba(0, 51, 102, .18);
}

.rc-st-msg--meta {
	align-self: stretch;
	background: #eaf0f8;
	border: 1px dashed #b7c8de;
	font-size: .82rem;
	color: #334960;
}

.rc-st-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 12px 10px;
	flex: 0 0 auto;
}

.rc-st-actions button,
.rc-st-composer button {
	border: 0;
	border-radius: 12px;
	padding: 9px 12px;
	font-size: .8rem;
	cursor: pointer;
	background: #e8f0fa;
	color: #003366;
	font-weight: 700;
	font-family: inherit;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.rc-st-actions .rc-st-btn--primary,
.rc-st-composer .rc-st-btn--primary {
	background: linear-gradient(135deg, #1a5cff, #003366);
	color: #fff;
	box-shadow: 0 6px 14px rgba(26, 92, 255, .25);
}

.rc-st-composer {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 8px;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid #d7e3f2;
	background: rgba(255,255,255,.92);
	backdrop-filter: blur(8px);
	flex: 0 0 auto;
}

.rc-st-composer textarea {
	resize: none;
	min-height: 42px;
	max-height: 96px;
	border: 1px solid #c5d4e8;
	border-radius: 12px;
	padding: 10px 12px;
	font: inherit;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	background: #fff;
}

.rc-st-composer input[type="file"] {
	display: none;
}

.rc-st-thumb {
	width: 100%;
	max-height: 140px;
	object-fit: cover;
	border-radius: 10px;
	margin-top: 8px;
}

/* Homepage section */
.ach-smart-tech {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(ellipse 80% 60% at 10% 20%, rgba(26, 92, 255, .18), transparent 55%),
		radial-gradient(ellipse 70% 50% at 90% 80%, rgba(0, 51, 102, .14), transparent 50%),
		linear-gradient(180deg, #f5f8fc 0%, #eaf0f8 100%);
}

.ach-smart-tech__card {
	display: grid;
	grid-template-columns: 1.15fr .85fr;
	gap: 28px;
	align-items: center;
	padding: 8px 0 4px;
}

.ach-smart-tech__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #1a5cff;
	font-weight: 800;
	font-size: .85rem;
	margin-bottom: 10px;
}

.ach-smart-tech__title {
	margin: 0 0 10px;
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	color: #001a33;
	line-height: 1.25;
}

.ach-smart-tech__desc {
	margin: 0 0 18px;
	color: #4a5f7a;
	font-size: 1.02rem;
	line-height: 1.8;
	max-width: 36rem;
}

.ach-smart-tech__features {
	display: grid;
	gap: 10px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.ach-smart-tech__features li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	color: #0a1628;
	font-size: .95rem;
}

.ach-smart-tech__features span {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #1a5cff;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	margin-top: 2px;
}

.ach-smart-tech__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ach-smart-tech__visual {
	position: relative;
	min-height: 240px;
	border-radius: 24px;
	background: linear-gradient(160deg, #001a33 0%, #003366 45%, #1a5cff 100%);
	color: #e8f0fa;
	padding: 22px;
	box-shadow: 0 20px 48px rgba(0, 51, 102, .28);
	overflow: hidden;
}

.ach-smart-tech__visual::after {
	content: '';
	position: absolute;
	width: 180px;
	height: 180px;
	right: -40px;
	top: -40px;
	border-radius: 50%;
	background: rgba(255,255,255,.08);
}

.ach-smart-tech__bot {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
}

.ach-smart-tech__bubble {
	background: rgba(255,255,255,.12);
	border: 1px solid rgba(255,255,255,.18);
	border-radius: 14px;
	padding: 12px 14px;
	font-size: .9rem;
	line-height: 1.65;
	backdrop-filter: blur(6px);
}

.ach-smart-tech__bubble--user {
	align-self: flex-end;
	background: rgba(26, 92, 255, .35);
	max-width: 85%;
}

/* Mobile polish */
@media (max-width: 860px) {
	.ach-smart-tech__card {
		grid-template-columns: 1fr;
	}

	.rc-st-panel {
		left: 8px;
		right: 8px;
		width: auto;
		max-width: none;
		margin: 0;
		height: min(72dvh, 640px);
		max-height: calc(100dvh - 20px - env(safe-area-inset-bottom, 0px));
		border-radius: 20px;
	}

	body.rc-body-app .rc-st-panel,
	body.rc-app-shell .rc-st-panel,
	body.ach-has-native-nav .rc-st-panel {
		left: 8px;
		right: 8px;
		bottom: calc(76px + env(safe-area-inset-bottom, 0px));
		height: min(66dvh, 580px);
		max-height: calc(100dvh - 88px - env(safe-area-inset-bottom, 0px));
	}

	.rc-st-panel__head {
		padding: 12px;
		gap: 8px;
	}

	.rc-st-panel__head h3 {
		font-size: .95rem;
	}

	.rc-st-messages {
		padding: 10px;
		gap: 8px;
	}

	.rc-st-plan__hero {
		padding: 12px;
		border-radius: 16px;
	}

	.rc-st-plan__hero-icon {
		width: 40px;
		height: 40px;
		flex-basis: 40px;
		border-radius: 12px;
	}

	.rc-st-job {
		padding: 10px 9px;
		gap: 8px;
	}

	.rc-st-job__title {
		font-size: .86rem;
	}

	.rc-st-actions {
		padding: 0 10px 8px;
	}

	.rc-st-actions button,
	.rc-st-composer button {
		padding: 10px 12px;
		font-size: .78rem;
	}

	.rc-st-composer {
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 380px) {
	.rc-st-badge {
		display: none;
	}

	.rc-st-job__go {
		display: none;
	}

	.rc-st-plan__day-title strong {
		font-size: .82rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rc-st-fab,
	.rc-st-job,
	.rc-st-float-tip,
	.rc-st-panel {
		animation: none !important;
		transition: none !important;
	}
}
