/* Обратная связь: кнопка «Нашли ошибку?», модалка, общие элементы форм плагина. */

/* --- плавающая кнопка --- */
.ks-fb-btn {
	position: fixed; left: 18px; bottom: 18px; z-index: 90;
	padding: 9px 16px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--c-dark, #151C22); color: var(--c-antique, #EDE6E0);
	font-family: var(--font-display, inherit); font-size: 12px;
	text-transform: uppercase; letter-spacing: .07em;
	box-shadow: 0 4px 14px rgba(21, 28, 34, .3);
	opacity: .85; transition: opacity .15s, background .15s;
}
.ks-fb-btn:hover { opacity: 1; background: var(--c-sand, #CA9E67); color: #fff; }

@media (max-width: 980px) {
	.ks-fb-btn {
		left: 12px;
		bottom: calc(84px + env(safe-area-inset-bottom, 0px));
		font-size: 11px; padding: 8px 14px;
	}
}

/* Пока виден cookie-баннер (z-index выше) — поднимаем кнопку, чтобы не пряталась под ним */
body:has(#ks-cookie:not([hidden])) .ks-fb-btn { bottom: 76px; }
@media (max-width: 980px) {
	body:has(#ks-cookie:not([hidden])) .ks-fb-btn {
		bottom: calc(160px + env(safe-area-inset-bottom, 0px));
	}
}

/* --- модалка --- */
.ks-fb-overlay {
	position: fixed; inset: 0; z-index: 120;
	display: flex; align-items: center; justify-content: center;
	background: rgba(21, 28, 34, .55); padding: 16px;
}
.ks-fb-overlay[hidden] { display: none; }
body.ks-fb-lock { overflow: hidden; }

.ks-fb-modal {
	position: relative; width: 100%; max-width: 460px;
	max-height: 88vh; overflow: auto;
	background: var(--c-paper, #F7F2EC); color: var(--c-text, #2A3138);
	border-radius: 8px; padding: 22px;
	box-shadow: 0 12px 40px rgba(21, 28, 34, .35);
}
.ks-fb-close {
	position: absolute; top: 8px; right: 10px;
	border: 0; background: none; cursor: pointer;
	font-size: 26px; line-height: 1; color: var(--c-text, #2A3138); opacity: .55;
}
.ks-fb-close:hover { opacity: 1; }

.ks-fb-title {
	margin: 0 0 6px;
	font-family: var(--font-display, inherit); font-size: 20px;
}
.ks-fb-sub { margin: 0 0 14px; font-size: 13.5px; line-height: 1.45; opacity: .8; }

.ks-fb-modal textarea {
	width: 100%; box-sizing: border-box; resize: vertical;
	padding: 10px 12px; border: 1px solid var(--c-line, #E3D9CD); border-radius: 5px;
	background: #fff; color: var(--c-text, #2A3138);
	font: inherit; font-size: 14px;
}
.ks-fb-modal textarea:focus { outline: 2px solid var(--c-sand, #CA9E67); outline-offset: -1px; }

/* --- зона загрузки фото --- */
.ks-fb-drop {
	margin-top: 10px; padding: 12px;
	border: 1px dashed var(--c-line, #E3D9CD); border-radius: 5px;
	font-size: 13px; line-height: 1.4; opacity: .85; cursor: pointer;
}
.ks-fb-drop:hover { border-color: var(--c-sand, #CA9E67); opacity: 1; }
.ks-fb-file { color: var(--c-umbra, #67461D); text-decoration: underline; cursor: pointer; }

.ks-fb-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ks-fb-preview { position: relative; display: inline-block; }
.ks-fb-preview img {
	width: 72px; height: 72px; object-fit: cover;
	border-radius: 4px; border: 1px solid var(--c-line, #E3D9CD); display: block;
}
.ks-fb-preview__remove {
	position: absolute; top: -7px; right: -7px;
	width: 20px; height: 20px; border: 0; border-radius: 50%; cursor: pointer;
	background: var(--c-dark, #151C22); color: #fff;
	font-size: 13px; line-height: 20px; padding: 0; text-align: center;
}

/* --- отправка --- */
.ks-fb-submit {
	margin-top: 14px; min-height: 42px; padding: 10px 26px;
	border: 0; border-radius: 5px; cursor: pointer;
	background: var(--c-sand, #CA9E67); color: #fff;
	font-family: var(--font-display, inherit); font-size: 13px;
	text-transform: uppercase; letter-spacing: .08em;
}
.ks-fb-submit:hover { background: var(--c-umbra, #67461D); }
.ks-fb-submit:disabled { opacity: .6; cursor: default; }

.ks-fb-status { margin: 10px 0 0; font-size: 13px; min-height: 1.2em; }
.ks-fb-status--error { color: #A63A2B; }

/* --- блок «Пришлите фото дома» (в колонке карточки — под картой — и на хабах) --- */
.ks-fb-photoblock {
	margin: 16px 0 8px; padding: 16px 18px;
	border: 1px solid var(--c-line, #E3D9CD); border-radius: 8px;
	background: #fff;
}
.ks-fb-photoblock__title {
	margin: 0 0 6px;
	font-family: var(--font-display, inherit); font-size: 17px; line-height: 1.2;
}
.ks-fb-photoblock__sub { margin: 0 0 12px; font-size: 13px; line-height: 1.45; opacity: .8; }
.ks-fb-photoblock__adres { margin: 0 0 10px; font-size: 13.5px; }

.ks-fb-photo-form .ks-fb-drop { margin-top: 0; background: var(--c-paper, #F7F2EC); }
.ks-fb-label { display: block; margin-top: 12px; font-size: 13px; }
.ks-fb-label input {
	display: block; width: 100%; max-width: 100%; box-sizing: border-box;
	margin-top: 4px; padding: 8px 10px;
	border: 1px solid var(--c-line, #E3D9CD); border-radius: 5px;
	background: #fff; color: var(--c-text, #2A3138); font: inherit; font-size: 14px;
}
.ks-fb-label input:focus { outline: 2px solid var(--c-sand, #CA9E67); outline-offset: -1px; }

.ks-fb-consent {
	display: flex; gap: 8px; align-items: flex-start;
	margin-top: 12px; font-size: 13px; line-height: 1.4; cursor: pointer;
}
.ks-fb-consent input { margin-top: 2px; }

@media (max-width: 640px) {
	.ks-fb-photoblock { padding: 14px 14px; }
}

/* --- опрос намерений: крупная карточка по центру экрана с затемнением --- */
.ks-fb-survey-overlay {
	position: fixed; inset: 0; z-index: 130;
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
	background: rgba(21, 28, 34, .62);
	animation: ksfbOverlayIn .25s ease;
}
.ks-fb-survey-overlay[hidden] { display: none; }
@keyframes ksfbOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ksfbSurveyIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

.ks-fb-survey {
	position: relative; width: 480px; max-width: 100%;
	padding: 34px 40px 26px;
	background: var(--c-dark, #151C22); color: var(--c-antique, #EDE6E0);
	border-radius: 14px; overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
	font-size: 15px;
	animation: ksfbSurveyIn .35s cubic-bezier(.2, .7, .3, 1);
}

/* силуэт высотки — крупный водяной знак в углу */
.ks-fb-survey__tower {
	position: absolute; right: -24px; bottom: -18px; width: 188px; height: auto;
	color: var(--c-sand, #CA9E67); opacity: .12; pointer-events: none;
}

.ks-fb-survey__close {
	position: absolute; top: 12px; right: 16px; z-index: 2;
	border: 0; background: none; cursor: pointer;
	font-size: 28px; line-height: 1; color: var(--c-antique, #EDE6E0); opacity: .5;
}
.ks-fb-survey__close:hover { opacity: 1; }

.ks-fb-survey__top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ks-fb-survey__star { width: 26px; height: 26px; color: var(--c-sand, #CA9E67); flex: 0 0 auto; }
.ks-fb-survey__dots { display: flex; gap: 7px; }
.ks-fb-survey__dots span {
	width: 8px; height: 8px; border-radius: 50%;
	background: rgba(237, 230, 224, .22); transition: background .2s;
}
.ks-fb-survey__dots[data-step="found"] span:nth-child(1),
.ks-fb-survey__dots[data-step="what"]  span:nth-child(-n+2),
.ks-fb-survey__dots[data-step="who"]   span,
.ks-fb-survey__dots[data-step="final"] span { background: var(--c-sand, #CA9E67); }

.ks-fb-survey__q {
	position: relative; z-index: 1;
	margin: 0 0 18px; padding-right: 24px;
	font-family: var(--font-display, inherit); font-size: 25px; line-height: 1.22;
}
.ks-fb-survey__chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; }

.ks-fb-chip {
	padding: 11px 19px; border: 1px solid rgba(202, 158, 103, .55); border-radius: 999px;
	background: transparent; color: var(--c-antique, #EDE6E0); cursor: pointer;
	font: inherit; font-size: 15px; line-height: 1.3; transition: all .15s;
}
.ks-fb-chip:hover, .ks-fb-chip--active {
	border-color: var(--c-sand, #CA9E67); background: var(--c-sand, #CA9E67); color: var(--c-dark, #151C22);
}

.ks-fb-survey__other { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: 12px; }
.ks-fb-survey__other input {
	flex: 1 1 auto; min-width: 0; padding: 10px 13px;
	border: 1px solid rgba(237, 230, 224, .3); border-radius: 6px;
	background: rgba(255, 255, 255, .06); color: var(--c-antique, #EDE6E0);
	font: inherit; font-size: 15px;
}
.ks-fb-survey__other input::placeholder { color: rgba(237, 230, 224, .5); }

.ks-fb-survey__cta { position: relative; z-index: 1; margin: 0; font-size: 16px; }
.ks-fb-survey__cta a { color: var(--c-sand, #CA9E67); font-weight: 500; }

.ks-fb-survey__never {
	position: relative; z-index: 1;
	display: block; margin-top: 20px; padding: 0;
	border: 0; background: none; cursor: pointer;
	font-size: 12.5px; color: var(--c-antique, #EDE6E0); opacity: .4; text-decoration: underline;
}
.ks-fb-survey__never:hover { opacity: .75; }

@media (max-width: 560px) {
	.ks-fb-survey-overlay { padding: 14px; }
	.ks-fb-survey { padding: 28px 22px 22px; }
	.ks-fb-survey__q { font-size: 22px; }
	.ks-fb-survey__tower { width: 150px; }
}

/* --- скрытая ловушка (общая для форм плагина) --- */
.ks-fb-hp {
	position: absolute; left: -9999px; top: auto;
	width: 1px; height: 1px; overflow: hidden;
}
