/**
 * Плавающая «Помощь»: белая карточка, ×, 4 строки (тёмный текст / зелёный звонок).
 * Макет: первые три пункта — уголь/синь; «Позвонить» — зелёный акцент.
 */

.rs-help {
	--rs-help-ink: #1e293b;
	--rs-help-green: #0d9488;

	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	pointer-events: none;
}

.rs-help > * {
	pointer-events: auto;
}

.rs-help__panel {
	width: min(300px, calc(100vw - 36px));
	background: #fff;
	color: var(--rs-help-ink);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.06);
	overflow: hidden;
	transform-origin: bottom right;
	animation: rs-help-in 0.2s ease-out;
}

@keyframes rs-help-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.rs-help__panel[hidden] {
	display: none !important;
}

.rs-help__toolbar {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	min-height: 40px;
	padding: 12px 12px 0 20px;
}

.rs-help__x {
	border: 0;
	background: transparent;
	color: var(--rs-help-ink);
	font-size: 1.4rem;
	line-height: 1;
	width: 36px;
	height: 32px;
	padding: 0;
	cursor: pointer;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 300;
}

.rs-help__x:hover {
	background: rgba(44, 62, 80, 0.08);
}

.rs-help__list {
	display: flex;
	flex-direction: column;
	padding: 4px 20px 20px;
	gap: 2px;
}

.rs-help__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 10px;
	margin: 0 -6px;
	border-radius: 8px;
	text-decoration: none;
	color: var(--rs-help-ink);
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.4;
	transition: background 0.12s ease;
}

.rs-help__item:hover {
	background: rgba(44, 62, 80, 0.06);
	color: var(--rs-help-ink);
}

.rs-help__icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--rs-help-ink);
}

.rs-help__icon svg {
	display: block;
}

.rs-help__item--phone {
	color: var(--rs-help-green);
}

.rs-help__item--phone .rs-help__icon {
	color: var(--rs-help-green);
}

.rs-help__item--phone:hover {
	background: rgba(13, 148, 136, 0.1);
	color: var(--rs-help-green);
}

.rs-help__label {
	flex: 1;
	min-width: 0;
	text-align: left;
}

button.rs-help__item {
	font: inherit;
	border: 0;
	background: transparent;
	width: 100%;
	cursor: pointer;
	text-align: left;
}

/* Модальные окна заявки и чата */
.rs-help__overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(15, 23, 42, 0.5);
	pointer-events: auto;
}

.rs-help__overlay[hidden] {
	display: none !important;
}

.rs-help__modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(16px, env(safe-area-inset-top));
	pointer-events: none;
}

.rs-help__modal[hidden] {
	display: none !important;
}

.rs-help__modal:not([hidden]) {
	display: flex;
}

.rs-help__modal-box {
	position: relative;
	width: min(400px, calc(100vw - 32px));
	max-height: min(90vh, 640px);
	overflow: auto;
	background: #fff;
	color: var(--rs-help-ink);
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	padding: 22px 22px 20px;
	pointer-events: auto;
}

.rs-help__modal-x {
	position: absolute;
	top: 10px;
	right: 10px;
	border: 0;
	background: transparent;
	color: var(--rs-help-ink);
	font-size: 1.35rem;
	line-height: 1;
	width: 36px;
	height: 36px;
	cursor: pointer;
	border-radius: 8px;
}

.rs-help__modal-x:hover {
	background: rgba(44, 62, 80, 0.08);
}

.rs-help__modal-title {
	margin: 0 36px 8px 0;
	font-size: 1.15rem;
	font-weight: 700;
}

.rs-help__modal-lead {
	margin: 0 0 16px;
	font-size: 0.85rem;
	color: #64748b;
	line-height: 1.45;
}

.rs-help__field {
	margin: 0 0 12px;
}

.rs-help__field label {
	display: block;
	font-size: 0.82rem;
	font-weight: 600;
	margin-bottom: 4px;
}

.rs-help__field input[type="text"],
.rs-help__field input[type="email"],
.rs-help__field textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font: inherit;
	font-size: 0.9rem;
}

.rs-help__field textarea {
	resize: vertical;
	min-height: 88px;
}

.rs-help__field--captcha .rs-help__captcha-img {
	display: block;
	vertical-align: top;
	margin-bottom: 6px;
	border-radius: 4px;
}

.rs-help__captcha-refresh {
	margin: 0 0 8px;
	padding: 4px 0;
	border: 0;
	background: none;
	color: #0d9488;
	font-size: 0.82rem;
	cursor: pointer;
	text-decoration: underline;
}

.rs-help__form {
	position: relative;
}

.rs-help__form-actions {
	margin: 16px 0 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.rs-help__submit {
	padding: 10px 20px;
	border: 0;
	border-radius: 8px;
	background: #0d9488;
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.rs-help__submit:hover {
	background: #0f766e;
}

.rs-help__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.rs-help__form-result {
	font-size: 0.88rem;
	flex: 1;
	min-width: 140px;
}

.rs-help__form-result .error,
.rs-help__err {
	color: #b91c1c;
}

.rs-help__form-result .success {
	color: #15803d;
}

.relsoft-captcha-fallback {
	margin-top: 4px;
}

.relsoft-captcha-label {
	display: block;
	font-size: 0.82rem;
	font-weight: 600;
	margin-bottom: 6px;
}

.relsoft-captcha-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	margin-bottom: 8px;
}

.relsoft-captcha-img {
	display: block;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
}

.relsoft-captcha-input {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font: inherit;
	font-size: 0.95rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.relsoft-turnstile-wrap {
	margin-bottom: 8px;
}

.relsoft-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	pointer-events: none;
}

body.rs-help-modal-open {
	overflow: hidden;
}

.rs-help__fab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px 12px 16px;
	border: 0;
	border-radius: 14px;
	background: #0f766e;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: 0 4px 18px rgba(13, 148, 136, 0.35);
	transition: background 0.15s ease, transform 0.12s ease;
}

.rs-help__fab:hover {
	background: #0d9488;
}

.rs-help__fab:active {
	transform: scale(0.98);
}

.rs-help__fab::after {
	content: "";
	position: absolute;
	right: 18px;
	bottom: -7px;
	width: 0;
	height: 0;
	border-left: 7px solid transparent;
	border-right: 7px solid transparent;
	border-top: 8px solid #0f766e;
	filter: drop-shadow(0 2px 2px rgba(13, 148, 136, 0.2));
}

.rs-help__fab:hover::after {
	border-top-color: #0d9488;
}

.rs-help__fab-q {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1;
}

.rs-help__fab-t {
	padding-right: 2px;
}

@media (max-width: 480px) {
	.rs-help {
		right: 12px;
		bottom: 12px;
	}

	.rs-help__fab {
		padding: 10px 16px 10px 14px;
		font-size: 0.88rem;
	}
}
