/* Задача №19 — кнопка «Запросить КП» и всплывающая форма. Префикс kp- */
.kp-btn {
	display: inline-flex; align-items: center; gap: 6px;
	margin: 0 0 0 -8px; padding: 6px 12px; flex: none;
	background: #3A9BDC; color: #fff; border: 0; border-radius: 10px;
	font: 700 13px/1.2 "PT Sans", Arial, sans-serif; cursor: pointer; white-space: nowrap;
	transition: background-color .15s;
}
.kp-btn:hover, .kp-btn:focus-visible { background: #2E86C1; }
.kp-has-btn > a[href^="tel:"] { white-space: nowrap; flex: none; }
/* адрес в верхней строке: если места не хватает — многоточие, а не перенос с обрезкой */
.kp-info > p { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-info > p img { vertical-align: middle; margin-right: 5px; }
.kp-btn:focus-visible, .kp-fab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.kp-fab {
	position: fixed; right: 16px; bottom: 16px; z-index: 9990;
	width: 56px; height: 56px; border-radius: 50%; border: 0;
	display: none; align-items: center; justify-content: center; flex-direction: column;
	background: #3A9BDC; color: #fff; cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,.35);
	font: 700 11px/1 "PT Sans", Arial, sans-serif;
}
.kp-fab:hover { background: #2E86C1; }
.kp-fab svg { width: 22px; height: 22px; margin-bottom: 2px; }
.kp-fab.kp-fab--always { display: flex; }
@media (max-width: 480px) {
	.kp-btn { display: none; }
	.kp-fab { display: flex; }
}

/* окно */
.kp-overlay {
	position: fixed; inset: 0; z-index: 9999;
	background: rgba(0,0,0,.6);
	display: flex; align-items: center; justify-content: center;
	padding: 16px; overflow-y: auto;
}
.kp-overlay[hidden] { display: none; }
html.kp-lock, html.kp-lock body { overflow: hidden; }
.kp-card {
	position: relative; width: 480px; max-width: 100%; margin: auto;
	background: #fff; color: #263238; border-radius: 10px;
	padding: 28px 28px 22px; box-sizing: border-box;
	font: 400 15px/1.4 "PT Sans", Arial, sans-serif; text-align: left;
}
.kp-card *, .kp-card *::before, .kp-card *::after { box-sizing: border-box; }
.kp-close {
	position: absolute; top: 10px; right: 10px; width: 36px; height: 36px;
	border: 0; background: transparent; color: #607D8B; cursor: pointer;
	font-size: 28px; line-height: 36px; border-radius: 8px;
}
.kp-close:hover { background: #F5F5F5; color: #263238; }
.kp-title { margin: 0 32px 8px 0; font: 700 22px/1.25 "PT Sans", Arial, sans-serif; color: #263238; }
.kp-sub { margin: 0 0 18px; color: #455A64; font-size: 14px; }
.kp-field { margin: 0 0 12px; }
.kp-label { display: block; margin: 0 0 4px; font-weight: 700; font-size: 14px; color: #263238; }
.kp-req { color: #C62828; }
.kp-input, .kp-textarea {
	display: block; width: 100%; padding: 9px 12px;
	border: 1px solid #B0BEC5; border-radius: 8px; background: #fff; color: #263238;
	font: 400 15px/1.3 "PT Sans", Arial, sans-serif;
}
.kp-textarea { min-height: 84px; resize: vertical; }
.kp-input:focus, .kp-textarea:focus { outline: none; border-color: #3A9BDC; box-shadow: 0 0 0 3px rgba(58,155,220,.25); }
.kp-input.kp-invalid, .kp-textarea.kp-invalid { border-color: #C62828; }
.kp-hint { margin: -6px 0 12px; font-size: 13px; color: #607D8B; }
.kp-err { display: block; margin-top: 4px; font-size: 13px; color: #C62828; }
.kp-err:empty { display: none; }
.kp-file { font-size: 14px; }
.kp-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.kp-check input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.kp-check a { color: #2E86C1; }
.kp-captcha img { display: block; margin: 0 0 6px; border-radius: 6px; }
.kp-submit {
	display: block; width: 100%; margin-top: 16px; padding: 12px 20px;
	background: #3A9BDC; color: #fff; border: 0; border-radius: 10px; cursor: pointer;
	font: 700 16px/1.2 "PT Sans", Arial, sans-serif;
}
.kp-submit:hover { background: #2E86C1; }
.kp-submit[disabled] { opacity: .6; cursor: default; }
.kp-general { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #FFEBEE; color: #B71C1C; font-size: 14px; }
.kp-general[hidden] { display: none; }
.kp-general a, .kp-call a { color: #2E86C1; white-space: nowrap; }
.kp-call { margin: 10px 0 0; text-align: center; font-size: 13px; color: #607D8B; }
.kp-success { text-align: center; padding: 24px 0 8px; }
.kp-success svg { width: 64px; height: 64px; }
.kp-success p { margin: 14px 0 0; font: 700 18px/1.35 "PT Sans", Arial, sans-serif; color: #263238; }
.kp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 480px) {
	.kp-overlay { padding: 0; align-items: stretch; }
	.kp-card { width: 100%; min-height: 100%; border-radius: 0; padding: 22px 18px 18px; }
}
