/* Культурный код-78: cookie-баннер и форма. Цвета берутся из темы (CSS-переменные) с запасными значениями. */
.kk78-cookie {
	position: fixed; z-index: 9999; left: 16px; right: 16px; bottom: 16px;
	max-width: 560px; margin-left: auto;
	background: var(--kk-ink, #111114); color: var(--kk-paper, #f5f2ea);
	border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
	transform: translateY(20px); opacity: 0; transition: opacity .25s ease, transform .25s ease;
}
.kk78-cookie[hidden], .kk78-cookie [hidden] { display: none !important; }
.kk78-cookie.is-visible { transform: none; opacity: 1; }
.kk78-cookie__inner { padding: 22px 24px; }
.kk78-cookie__title { margin: 0 0 6px; font-weight: 700; font-size: 1rem; }
.kk78-cookie__text { margin: 0 0 14px; font-size: .875rem; line-height: 1.5; opacity: .85; }
.kk78-cookie__text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.kk78-cookie__prefs { display: grid; gap: 8px; margin: 0 0 14px; font-size: .875rem; }
.kk78-cookie__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kk78-switch { display: flex; gap: 10px; align-items: center; }
.kk78-switch input { width: 18px; height: 18px; accent-color: var(--kk-accent, #ff4b2b); }

.kk78-btn {
	appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .875rem;
	padding: 11px 18px; border-radius: 999px; border: 1px solid currentColor;
	background: transparent; color: inherit; transition: background .2s, color .2s, border-color .2s;
}
.kk78-btn:hover { background: rgba(127, 127, 127, .15); }
.kk78-btn--primary { background: var(--kk-accent, #ff4b2b); border-color: var(--kk-accent, #ff4b2b); color: #fff; }
.kk78-btn--primary:hover { background: var(--kk-accent-dark, #d93a1d); border-color: var(--kk-accent-dark, #d93a1d); }
.kk78-btn--link { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.kk78-btn:focus-visible, .kk78-cookie-reopen:focus-visible { outline: 3px solid var(--kk-accent, #ff4b2b); outline-offset: 2px; }
.kk78-btn.is-loading { opacity: .6; pointer-events: none; }
.kk78-cookie-reopen { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Форма */
.kk78-form { display: grid; gap: 18px; max-width: 760px; }
.kk78-form__title { margin: 0; }
.kk78-form__grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kk78-field { display: grid; gap: 6px; font-size: .875rem; font-weight: 600; }
.kk78-field--wide { grid-column: 1 / -1; }
.kk78-field input, .kk78-field textarea {
	font: inherit; font-weight: 400; font-size: 1rem; width: 100%; box-sizing: border-box;
	padding: 13px 16px; border-radius: 12px;
	border: 1.5px solid var(--kk-line, #d9d4c7); background: var(--kk-field, #fff); color: var(--kk-text, #111114);
	transition: border-color .2s, box-shadow .2s;
}
.kk78-field input:focus, .kk78-field textarea:focus { outline: none; border-color: var(--kk-accent, #ff4b2b); box-shadow: 0 0 0 4px rgba(255, 75, 43, .15); }
.kk78-field [aria-invalid="true"] { border-color: #c62828; }
.kk78-consent { display: flex; gap: 12px; align-items: flex-start; font-size: .875rem; line-height: 1.5; }
.kk78-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--kk-accent, #ff4b2b); }
.kk78-consent a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.kk78-consent .kk78-error { display: block; }
.kk78-form__submit { justify-self: start; padding: 15px 30px; font-size: 1rem; }
.kk78-form__note { margin: 0; font-size: .8rem; opacity: .65; }
.kk78-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.kk78-error { color: #c62828; font-size: .8rem; font-weight: 500; }
.kk78-form__notice { padding: 14px 18px; border-radius: 12px; background: rgba(127, 127, 127, .1); font-weight: 500; }
.kk78-form__notice.is-ok { background: #e7f5ea; color: #1b5e20; }
.kk78-form__notice.is-error { background: #fdecea; color: #8e1c1c; }

@media (max-width: 640px) {
	.kk78-form__grid { grid-template-columns: 1fr; }
	.kk78-cookie { left: 8px; right: 8px; bottom: 8px; }
	.kk78-cookie__actions .kk78-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
	.kk78-cookie { transition: none; }
}
