/* Баннер и окно настроек колачића (inc/consent.php). Работает и на страницах
   старого дизайна, поэтому цвета заданы с запасными значениями. */
.dn-cc, .dn-cc-modal, .dn-embed-consent {
	--cc-accent: var(--dn-accent, #A8476A);
	--cc-accent-dark: var(--dn-accent-dark, #8E3657);
	--cc-text: var(--dn-text, #2A1F24);
	--cc-muted: var(--dn-muted, #5A4950);
	--cc-line: var(--dn-line, #EADDD9);
	--cc-rose: var(--dn-rose, #F5ECEA);
	font-family: var(--dn-sans, system-ui, -apple-system, 'Segoe UI', sans-serif);
	color: var(--cc-text);
}
.dn-cc[hidden], .dn-embed-consent iframe[hidden] { display: none !important; }

.dn-cc {
	position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000;
	display: flex; justify-content: center; pointer-events: none;
}
.dn-cc__box {
	pointer-events: auto; width: 100%; max-width: 760px; background: #fff; border: 1px solid var(--cc-line);
	border-radius: 20px; box-shadow: 0 18px 50px rgba(42,31,36,0.18); padding: 20px 22px;
	max-height: calc(100vh - 32px); overflow-y: auto;
}
.dn-cc__title { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.dn-cc__text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--cc-muted); }
.dn-cc a, .dn-cc-modal a { color: var(--cc-accent-dark) !important; text-decoration: underline; }
.dn-cc__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 16px; }

/* «Prihvati sve» и «Odbij sve» — одинаковые по виду и размеру. */
.dn-cc__btn {
	font: 700 15px/1.2 var(--dn-sans, system-ui, sans-serif); min-height: 46px; padding: 0 22px; border-radius: 999px; cursor: pointer;
	background: var(--cc-accent); color: #fff; border: 2px solid var(--cc-accent);
}
.dn-cc__btn:hover { background: var(--cc-accent-dark); border-color: var(--cc-accent-dark); }
/* «Prihvati sve» — зелёная (по просьбе владельца); «Odbij sve» остаётся такой же
   заметной сплошной кнопкой того же размера. */
.dn-cc__btn--accept { background: #2E7D4F; border-color: #2E7D4F; }
.dn-cc__btn--accept:hover { background: #236140; border-color: #236140; }
.dn-cc__btn--link { background: transparent; color: var(--cc-text); border-color: transparent; text-decoration: underline; padding: 0 10px; margin-right: auto; }
.dn-cc__btn--link:hover { background: transparent; border-color: transparent; color: var(--cc-accent-dark); }
.dn-cc__btn:focus-visible, .dn-cc-open:focus-visible, .dn-cc-modal__close:focus-visible, .dn-cc-switch:focus-visible {
	outline: 3px solid var(--cc-accent); outline-offset: 2px;
}

@media (max-width: 600px) {
	.dn-cc { left: 8px; right: 8px; bottom: 8px; }
	.dn-cc__box { padding: 16px; border-radius: 16px; }
	.dn-cc__text { font-size: 13px; }
	.dn-cc__actions { display: grid; grid-template-columns: 1fr 1fr; }
	.dn-cc__btn--link { grid-column: 1 / -1; order: 3; margin: 0; min-height: 40px; }
}

/* --- Окно настроек ------------------------------------------------------ */
.dn-cc-modal {
	width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 20px;
	box-shadow: 0 24px 60px rgba(42,31,36,0.25); background: #fff;
}
.dn-cc-modal::backdrop { background: rgba(42,31,36,0.45); }
.dn-cc-modal__form { padding: 22px; margin: 0; }
.dn-cc-modal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dn-cc-modal__title { margin: 0; font-size: 20px; font-weight: 700; font-family: inherit; color: inherit; }
.dn-cc-modal__close {
	width: 40px; height: 40px; flex: none; border: 0; border-radius: 999px; background: var(--cc-rose); color: var(--cc-text);
	display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.dn-cc-modal__text { font-size: 14px; line-height: 1.55; color: var(--cc-muted); margin: 10px 0 8px; }
.dn-cc-cat { border-top: 1px solid var(--cc-line); padding: 14px 0; }
.dn-cc-cat__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; margin: 0; }
.dn-cc-cat__name { font-size: 15px; font-weight: 700; }
.dn-cc-cat__always { font-size: 13px; font-weight: 600; color: var(--cc-accent-dark); }
.dn-cc-cat__desc { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--cc-muted); }
.dn-cc-modal__actions { border-top: 1px solid var(--cc-line); padding-top: 16px; margin-top: 0; }
@media (max-width: 600px) {
	.dn-cc-modal__actions { display: grid; grid-template-columns: 1fr; }
}

/* Переключатель */
.dn-cc-switch {
	appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
	width: 46px; height: 26px; border-radius: 999px; background: #CDB8B4; position: relative; transition: background-color .15s;
}
.dn-cc-switch::after {
	content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s;
}
.dn-cc-switch:checked { background: var(--cc-accent); }
.dn-cc-switch:checked::after { transform: translateX(20px); }

/* --- Ссылка в подвале --------------------------------------------------- */
.dn-cc-open {
	background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline;
}
.dn-site .dn-footer__links .dn-cc-open {
	display: inline-block; align-self: baseline; min-height: 0; height: auto; padding: 0; line-height: inherit; font-size: inherit;
	color: var(--dn-accent-dark, #8E3657);
}
@media (max-width: 768px) { .dn-site .dn-footer__links .dn-cc-open { padding: 10px 0; } }

/* --- Заглушка карты ------------------------------------------------------ */
.dn-embed-consent { position: relative; width: 100%; height: 100%; min-height: inherit; }
.dn-embed-consent iframe { width: 100%; height: 100%; min-height: inherit; border: 0; display: block; }
.dn-embed-consent.is-loaded .dn-embed-consent__ph { display: none; }
.dn-embed-consent__ph {
	height: 100%; min-height: 260px; box-sizing: border-box; padding: 24px; background: var(--cc-rose);
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
}
.dn-embed-consent__ph svg { color: var(--cc-accent); }
.dn-embed-consent__ph p { margin: 0; max-width: 340px; font-size: 14px; line-height: 1.5; color: var(--cc-muted); }
.dn-embed-consent__ph a { font-size: 14px; font-weight: 600; color: var(--cc-accent-dark) !important; }

/* Высота заглушки в существующих блоках карты */
.dn-map-info__map .dn-embed-consent__ph { min-height: 460px; border-radius: inherit; }
.dn-contacts__map .dn-embed-consent__ph { border-radius: inherit; }
@media (max-width: 768px) { .dn-map-info__map .dn-embed-consent__ph { min-height: 260px; } }
