/* =========================================================================
   تماس با ما: callback form + map + contact details (fits one 15" laptop screen)
   Markup: modules/main-parts/map.tpl   Behaviour: js/contact.js, initLive() in js/site-ui.js
   Map is grey at rest and turns to colour on hover (site rule).
   ========================================================================= */
.rp-ct {
	--ct-red: #fb4848;
	--ct-ink: #29292B;
	--ct-muted: #6b6b72;
	--ct-line: #e6e6ea;
	--ct-ease: cubic-bezier(.22, 1, .36, 1);
	position: relative;
	padding: 64px 0 70px;
	background: #f6f6f7;
	direction: rtl;
	font-family: 'IranSans', sans-serif;
}
.rp-ct button { font-family: inherit; }

/* ---- head: title + live open/closed chip */
.rp-ct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.rp-ct-head .sec-title { margin-bottom: 0; padding-bottom: 0; }
.rp-ct .rp-live { display: block; flex: 0 0 auto; }
.rp-ct .rp-live-pill {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px 10px 18px;
	border: 1px solid var(--ct-line);
	border-radius: 999px;
	background: #fff;
	text-decoration: none !important;
	box-shadow: 0 10px 24px -18px rgba(25, 25, 30, .35);
	transition: background-color .25s, border-color .25s, transform .25s;
}
.rp-ct .rp-live-pill[hidden] { display: none; }
.rp-ct .rp-live-text { line-height: 1.5; }
.rp-ct .rp-live-text small { white-space: nowrap; }

/* ---- layout: form | place (both cards share one height) */
.rp-ct-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: stretch; }
.rp-ct-grid--solo { grid-template-columns: minmax(0, 1fr); }

/* ---- form card */
.rp-ct-form {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 30px 30px 26px;
	border-radius: 28px;
	background:
		radial-gradient(520px 260px at 100% 0%, rgba(251, 72, 72, .22), transparent 70%),
		#1b1b1d;
	color: #fff;
	overflow: hidden;
}
.rp-ct-badge {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .12);
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 12.5px;
}
.rp-ct-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--ct-red); box-shadow: 0 0 0 4px rgba(251, 72, 72, .25); }
.rp-ct-form h3 { margin: 14px 0 6px; font-family: 'IranSansBold', 'IranSans', sans-serif; font-weight: normal; font-size: 21px; line-height: 1.6; color: #fff; }
.rp-ct-form > p { margin: 0 0 20px; font-size: 13.5px; line-height: 1.9; color: rgba(255, 255, 255, .62); }
/* fields in two columns: name | phone, then time | send, then the optional note */
.rp-ct-form .uf-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
.rp-ct-form .uf-content > * { grid-column: 1 / -1; }
/* children: 1 name, 2 phone, 3 time, 4 note toggle (.dpd), 5 send */
.rp-ct-form .uf-content > .uf-field:nth-child(1), .rp-ct-form .uf-content > .uf-field:nth-child(2),
.rp-ct-form .uf-content > .uf-field:nth-child(3), .rp-ct-form .uf-content > .uf-field:nth-child(5) { grid-column: auto; }
.rp-ct-form .uf-content > .dpd { order: 6; }
.rp-ct-form .uf-content > .uf-field:nth-child(3) .uf-label { display: none; }
.rp-ct-form .uf-content > .uf-field:nth-child(5) .uf-btn { margin-top: 0; }

/* Uniform callback form, restyled for the dark card */
.rp-ct-form .uf-wrapper-inline, .rp-ct-form .uf-content { padding: 0; background: none; box-shadow: none; border: 0; }
.rp-ct-form .uf-field { margin: 0 0 12px; }
.rp-ct-form .uf-label { margin-bottom: 6px; font-family: 'IranSansMedium', 'IranSans', sans-serif; font-size: 13px; color: rgba(255, 255, 255, .7); text-align: right; }
.rp-ct-form .uf-input {
	width: 100%;
	height: 50px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 14px;
	background: rgba(255, 255, 255, .06);
	color: #fff;
	font-family: 'IranSans', sans-serif;
	font-size: 14.5px;
	text-align: right;
	direction: rtl;
	box-shadow: none;
	transition: border-color .25s, background-color .25s;
}
.rp-ct-form textarea.uf-input { height: auto; min-height: 96px; padding: 12px 16px; line-height: 1.9; }
.rp-ct-form select.uf-input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: 20px 22px, 15px 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 36px; }
.rp-ct-form select.uf-input option { color: var(--ct-ink); }
.rp-ct-form .uf-input::placeholder { color: rgba(255, 255, 255, .5); }
.rp-ct-form .uf-input:focus { outline: none; border-color: var(--ct-red); background-color: rgba(255, 255, 255, .09); }
.rp-ct-form input[name="phone"] { direction: ltr; text-align: left; }
.rp-ct-form input[name="phone"]::placeholder { text-align: right; }
.rp-ct-form .uf-input-error { border-color: var(--ct-red); }
.rp-ct-form .dpd__title { text-decoration: none; margin: 2px 0 10px; color: rgba(255, 255, 255, .78); font-family: 'IranSansMedium', 'IranSans', sans-serif; font-size: 13px; cursor: pointer; text-align: right; }
.rp-ct-form .dpd__title::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 8px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.rp-ct-form .dpd_active .dpd__title::before { content: "−"; }
.rp-ct-form .dpd br { display: none; }
.rp-ct-form .uf-field[style] { text-align: right !important; }
.rp-ct-form .uf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 52px;
	margin-top: 6px;
	border: 0;
	border-radius: 14px;
	background: var(--ct-red);
	color: #fff;
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 15px;
	box-shadow: 0 14px 30px -14px rgba(251, 72, 72, .9);
	transition: background-color .25s, transform .25s;
}
.rp-ct-form .uf-btn:hover { background: #e53d3d; transform: translateY(-2px); }
.rp-ct-form .uf-alert { border-radius: 14px; font-size: 13.5px; text-align: right; }
.rp-ct-form .uf-inline-loading { min-height: 170px; }

/* ---- place card: map on top (routes float on it), details below */
.rp-ct-place {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--ct-line);
	border-radius: 28px;
	background: #fff;
	overflow: hidden;
}
.rp-ct-map { position: relative; flex: 1 1 auto; min-height: 220px; background: #e9e9ec; isolation: isolate; }
.rp-ct-map .leaflet-tile-pane { filter: grayscale(1) contrast(1.05) brightness(1.02); transition: filter .6s ease; }
.rp-ct-map:hover .leaflet-tile-pane, .rp-ct-map:focus-within .leaflet-tile-pane { filter: none; }
.rp-ct-map .leaflet-container { width: 100%; height: 100%; position: absolute; inset: 0; font-family: 'IranSans', sans-serif; background: #e9e9ec; }
.rp-ct-map .leaflet-control-attribution { font-size: 10px; direction: ltr; background: rgba(255, 255, 255, .7); }
.rp-ct-map-ph {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 14px;
	color: var(--ct-muted);
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 13px;
	background:
		linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px) 0 0 / 34px 34px,
		linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px) 0 0 / 34px 34px,
		#e9e9ec;
}
.rp-ct-map.is-ready .rp-ct-map-ph { display: none; }
/* brand pin (also used as the Leaflet marker) */
.rp-ct-pin { position: relative; display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--ct-red); border: 4px solid #fff; box-shadow: 0 6px 16px rgba(251, 72, 72, .5); }
.rp-ct-pin::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid var(--ct-red); animation: rp-ct-pulse 2s ease-out infinite; }
@keyframes rp-ct-pulse { from { opacity: .8; transform: scale(.5); } to { opacity: 0; transform: scale(1.6); } }
.rp-ct-marker { background: none; border: 0; }
.rp-ct-label {
	position: absolute;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	padding: 8px 14px;
	border-radius: 12px;
	background: var(--ct-ink);
	color: #fff;
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 12.5px;
	white-space: nowrap;
	direction: rtl;
	box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
}
.rp-ct-label::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ct-ink); }

/* routes: a glass bar floating at the bottom of the map */
.rp-ct-routes {
	position: absolute;
	z-index: 500;
	right: 14px;
	bottom: 14px;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 5px;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 999px;
	background: rgba(255, 255, 255, .78);
	-webkit-backdrop-filter: blur(10px) saturate(1.4);
	backdrop-filter: blur(10px) saturate(1.4);
	box-shadow: 0 12px 28px -16px rgba(25, 25, 30, .45);
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 12.5px;
}
.rp-ct-routes span { padding: 0 10px 0 6px; color: var(--ct-muted); }
.rp-ct-routes a { padding: 6px 13px; border-radius: 999px; color: var(--ct-ink) !important; text-decoration: none !important; transition: background-color .25s, color .25s; }
.rp-ct-routes a:hover { background: var(--ct-ink); color: #fff !important; }

/* details: one tidy line each (label column + value) */
.rp-ct-info { margin: 0; padding: 6px 22px; list-style: none; }
.rp-ct-info li { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 6px 0; border-bottom: 1px solid var(--ct-line); }
.rp-ct-info li:last-child { border-bottom: 0; }
.rp-ct-k { flex: 0 0 116px; display: inline-flex; align-items: center; gap: 10px; font-family: 'IranSansMedium', 'IranSans', sans-serif; font-size: 13px; color: var(--ct-muted); }
.rp-ct-k i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(251, 72, 72, .1); color: var(--ct-red); font-size: 14px; }
.rp-ct-v { flex: 1 1 auto; min-width: 0; margin: 0; font-style: normal; font-size: 14px; line-height: 1.8; color: var(--ct-ink); }
a.rp-ct-v, .rp-ct-v a { color: var(--ct-ink) !important; text-decoration: none !important; transition: color .2s; }
a.rp-ct-v { text-align: right; }
a.rp-ct-v:hover, .rp-ct-v a:hover { color: var(--ct-red) !important; }
.rp-ct-phones { display: flex; flex-wrap: wrap; gap: 4px 0; }
.rp-ct-phones a { unicode-bidi: isolate; }
.rp-ct-phones a + a { margin-right: 12px; padding-right: 12px; border-right: 1px solid var(--ct-line); }
.rp-ct-sep { display: inline-block; width: 4px; height: 4px; margin: 0 8px 3px; border-radius: 50%; background: #c4c4ca; vertical-align: middle; }
.rp-ct-copy {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border: 1px solid var(--ct-line);
	border-radius: 999px;
	background: #fff;
	color: var(--ct-ink);
	font-family: 'IranSansMedium', 'IranSans', sans-serif;
	font-size: 12px;
	transition: background-color .25s, color .25s, border-color .25s;
}
.rp-ct-copy:hover { background: var(--ct-ink); border-color: var(--ct-ink); color: #fff; }
.rp-ct-copy.is-done { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.rp-ct a:focus-visible, .rp-ct button:focus-visible { outline: 2px solid var(--ct-red); outline-offset: 2px; }

@media (hover: none) { .rp-ct-map .leaflet-tile-pane { filter: none; } }
@media (max-width: 1199px) {
	.rp-ct-k { flex-basis: 100px; }
	.rp-ct-phones a + a { margin-right: 8px; padding-right: 8px; }
}
@media (max-width: 991px) {
	.rp-ct { padding: 56px 0 64px; }
	.rp-ct-grid { grid-template-columns: minmax(0, 1fr); }
	.rp-ct-map { min-height: 280px; }
}
@media (max-width: 767px) {
	.rp-ct { padding: 48px 0 56px; }
	.rp-ct-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
	.rp-ct-form { padding: 24px 18px 18px; border-radius: 22px; }
	.rp-ct-form h3 { font-size: 18px; }
	.rp-ct-form .uf-content { grid-template-columns: minmax(0, 1fr); }
	.rp-ct-place { border-radius: 22px; }
	.rp-ct-map { min-height: 250px; }
	.rp-ct-routes { right: 10px; left: 10px; bottom: 10px; justify-content: space-between; }
	.rp-ct-routes span { display: none; }
	.rp-ct-routes a { flex: 1 1 0; padding: 7px 4px; text-align: center; }
	.rp-ct-info { padding: 4px 16px; }
	.rp-ct-info li { flex-wrap: wrap; gap: 4px 12px; padding: 10px 0; }
	.rp-ct-k { flex-basis: 100%; }
	.rp-ct-v { flex-basis: 0; }
	.rp-ct .rp-live-text small { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .rp-ct-pin::after { animation: none; } }

/* ---- submit button: same hover as the services "جزئیات و تعرفه" button, without the running light.
   Red square on the left grows to fill the button; the label slides out and a white label with an arrow slides in. */
.rp-ct-form .uf-btn.rp-fx-btn {
	position: relative;
	display: block;
	padding: 0;
	overflow: hidden;
	background: rgba(255, 255, 255, .05);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
	transform: none;
}
.rp-ct-form .uf-btn.rp-fx-btn:hover { background: rgba(255, 255, 255, .05); transform: none; }
.rp-ct-form .rp-fx-btn .ladda-label { /* beats Ladda's .ladda-button[data-style] .ladda-label inline-block */
	position: relative;
	z-index: 1;
	display: flex !important;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	padding: 0 20px 0 7px;
	isolation: isolate;
}
.rp-fx-fill {
	position: absolute;
	z-index: -1;
	left: 7px;
	top: 7px;
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: var(--ct-red);
	transition: all .3s cubic-bezier(.4, 0, .2, 1);
}
.rp-fx-btn:hover .rp-fx-fill, .rp-fx-btn:focus-visible .rp-fx-fill { left: 0; top: 0; width: 100%; height: 100%; border-radius: 14px; transform: scale(1.8); }
.rp-fx-text, .rp-fx-ico { transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .3s; }
.rp-fx-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--ct-red); color: #fff; font-size: 15px; }
.rp-fx-alt {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: #fff;
	opacity: 0;
	transform: translateX(48px);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .3s;
}
.rp-fx-btn:hover .rp-fx-text, .rp-fx-btn:focus-visible .rp-fx-text { transform: translateX(-48px); opacity: 0; }
.rp-fx-btn:hover .rp-fx-ico, .rp-fx-btn:focus-visible .rp-fx-ico { opacity: 0; }
.rp-fx-btn:hover .rp-fx-alt, .rp-fx-btn:focus-visible .rp-fx-alt { transform: translateX(4px); opacity: 1; }
.rp-fx-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .rp-fx-fill, .rp-fx-text, .rp-fx-ico, .rp-fx-alt { transition: none; } }
