/* Блокировка прокрутки страницы при открытой модалке настроек cookie */
html.cookie-consent-scroll-lock,
body.cookie-consent-scroll-lock {
	overflow: hidden !important;
}

body.cookie-consent-scroll-lock {
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
}

/* Цвета проекта (медцентр / aspro-medc2) — при смене бренда правьте здесь */
:root {
	--cookie-brand: #107bb1;
	--cookie-brand-hover: #0d6390;
	--cookie-brand-soft: rgba(16, 123, 177, 0.12);
	--cookie-border: #e7edf0;
	--cookie-bg-muted: #f5f8f9;
	--cookie-text: #1a1a1a;
	--cookie-text-muted: #555;
	/* отступ снизу для иконки cookie: над фикс. баннером «противопоказания» (.banner_warning, z-index 101) */
	--cookie-fab-bottom: 16px;
	--cookie-fab-bottom-with-banner: calc(16px + 5.75rem);
	/* моб. карточка баннера cookie над полосой противопоказаний */
	--cookie-bar-mobile-with-banner-bottom: calc(12px + 5.25rem);
}

/* Плавающая кнопка после выбора в баннере */
.cookie-consent-fab {
	display: none;
	position: fixed;
	left: 16px;
	bottom: var(--cookie-fab-bottom);
	z-index: 11990;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--cookie-border);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	color: var(--cookie-brand);
	cursor: pointer;
	transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

body.with_banner .cookie-consent-fab {
	bottom: var(--cookie-fab-bottom-with-banner);
}

.cookie-consent-fab.is-visible {
	display: flex;
}

.cookie-consent-fab:hover {
	background: var(--cookie-bg-muted);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
	transform: scale(1.03);
}

.cookie-consent-fab:focus {
	outline: 2px solid var(--cookie-brand);
	outline-offset: 2px;
}

.cookie-consent-fab__icon {
	display: block;
	width: 24px;
	height: 24px;
}

.cookie-consent-bar {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 12000;
	background: #fff;
	border-top: 1px solid var(--cookie-border);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
	padding: 12px 42px 18px 16px;
	max-height: 50vh;
	overflow-y: auto;
}

.cookie-consent-bar__close {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #888;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.cookie-consent-bar__close:hover {
	background: var(--cookie-bg-muted);
	color: var(--cookie-text);
}

.cookie-consent-bar.is-visible {
	display: block;
}

.cookie-consent-bar__inner {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
}

.cookie-consent-bar__text {
	flex: 1 1 280px;
	min-width: 0;
	max-width: 100%;
}

.cookie-consent-bar__title {
	font-weight: bold;
	font-size: 16px;
	margin: 0 0 8px;
}

.cookie-consent-bar__p {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--cookie-text);
}

.cookie-consent-bar__p a {
	color: var(--cookie-brand);
	text-decoration: underline;
}

.cookie-consent-bar__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 10px;
	flex: 0 1 auto;
}

.cookie-consent-bar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 6px 16px;
	font-size: 14px;
	line-height: 1.25;
	font-weight: 600;
	font-family: inherit;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	white-space: nowrap;
}

.cookie-consent-bar__btn--primary {
	border: 2px solid var(--cookie-brand);
	background: var(--cookie-brand);
	color: #fff;
}

.cookie-consent-bar__btn--primary:hover {
	background: var(--cookie-brand-hover);
	border-color: var(--cookie-brand-hover);
}

.cookie-consent-bar__btn--outline {
	border: 2px solid var(--cookie-brand);
	background: #fff;
	color: var(--cookie-brand);
}

.cookie-consent-bar__btn--outline:hover {
	background: var(--cookie-brand-soft);
}

.cookie-consent-bar__btn--neutral {
	border: 2px solid #c5cdd3;
	background: #fff;
	color: var(--cookie-text);
}

.cookie-consent-bar__btn--neutral:hover {
	border-color: #9aa5ad;
	background: var(--cookie-bg-muted);
}

/* Модальное окно */
.cookie-consent-modal {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 12001;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 0.32s ease,
		visibility 0.32s ease;
}

.cookie-consent-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.cookie-consent-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.cookie-consent-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	overflow: hidden;
	background: #fff;
	padding: 0;
	border-radius: 12px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transform: translateY(20px) scale(0.97);
	transform-origin: center center;
	transition:
		opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-consent-modal__header {
	position: relative;
	flex-shrink: 0;
	padding: 24px 50px 16px 28px;
	border-bottom: 1px solid var(--cookie-border);
}

.cookie-consent-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 16px 28px 8px;
}

.cookie-consent-modal.is-open .cookie-consent-modal__dialog {
	opacity: 1;
	transform: translateY(0) scale(1);
	transition-delay: 0.04s;
}

@media (prefers-reduced-motion: reduce) {
	.cookie-consent-modal,
	.cookie-consent-modal__dialog {
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}

	.cookie-consent-modal__dialog {
		transform: none;
	}
}

.cookie-consent-modal__close {
	position: absolute;
	top: 18px;
	right: 16px;
	border: none;
	background: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #888;
	padding: 4px 8px;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
}

.cookie-consent-modal__close:hover {
	color: var(--cookie-text);
	background: var(--cookie-bg-muted);
}

.cookie-consent-modal__title {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	color: var(--cookie-text);
	line-height: 1.3;
}

.cookie-consent-modal__intro {
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 14px;
	color: var(--cookie-text-muted);
}

.cookie-consent-modal__legal {
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 20px;
	color: var(--cookie-text-muted);
}

.cookie-consent-modal__legal-prefix {
	margin-right: 4px;
}

.cookie-consent-modal__legal-sep {
	margin: 0 2px 0 0;
}

.cookie-consent-modal__link {
	color: var(--cookie-brand);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.15s, color 0.15s;
}

.cookie-consent-modal__link:hover {
	color: var(--cookie-brand-hover);
	border-bottom-color: var(--cookie-brand-hover);
}

/* Аккордеоны */
.cookie-consent-accordions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
}

.cookie-consent-accordion {
	border-radius: 10px;
	overflow: hidden;
	background: var(--cookie-bg-muted);
	border: 1px solid var(--cookie-border);
}

.cookie-consent-accordion__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	border: none;
	background: transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--cookie-text);
	text-align: left;
	cursor: pointer;
	transition: background 0.15s;
}

.cookie-consent-accordion__header:hover {
	background: rgba(0, 0, 0, 0.03);
}

.cookie-consent-accordion__title {
	flex: 1;
	padding-right: 12px;
}

.cookie-consent-accordion__chev {
	flex-shrink: 0;
	color: var(--cookie-text-muted);
	transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-consent-accordion.is-open .cookie-consent-accordion__chev {
	transform: rotate(180deg);
}

.cookie-consent-accordion__panel {
	max-height: 0;
	overflow: hidden;
	padding: 0 16px;
	border-top: 1px solid transparent;
	background: #fff;
	transition:
		max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
		padding 0.38s ease,
		border-color 0.25s ease;
}

.cookie-consent-accordion.is-open .cookie-consent-accordion__panel {
	max-height: 1200px;
	padding: 0 16px 16px;
	border-top-color: var(--cookie-border);
}

.cookie-consent-accordion__body {
	padding-top: 0;
}

@media (prefers-reduced-motion: reduce) {
	.cookie-consent-accordion__panel,
	.cookie-consent-accordion__chev {
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}
}

.cookie-consent-accordion__body .cookie-consent-accordion__text {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--cookie-text-muted);
}

.cookie-consent-accordion__body .cookie-consent-accordion__text:first-of-type {
	padding-top: 12px;
}

.cookie-consent-accordion__body .cookie-consent-accordion__text:last-of-type {
	margin-bottom: 0;
}

.cookie-consent-accordion__badge {
	display: inline-block;
	margin-top: 12px;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 6px;
	background: var(--cookie-brand-soft);
	color: var(--cookie-brand);
}

.cookie-consent-accordion__radios {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px 32px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--cookie-border);
}

.cookie-consent-radio {
	display: inline-flex;
	align-items: center;
	min-height: 18px;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: var(--cookie-text);
	user-select: none;
}

.cookie-consent-radio__input {
	width: 18px;
	height: 18px;
	margin: 0;
	flex-shrink: 0;
	accent-color: var(--cookie-brand);
	cursor: pointer;
}

.cookie-consent-radio__label {
	display: inline-flex;
	align-items: center;
	height: 18px;
	line-height: 1;
	transform: translateY(1px);
}

/* Кнопки футера модалки */
.cookie-consent-modal__footer {
	display: flex;
	flex-shrink: 0;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
	padding: 16px 28px 24px;
	border-top: 1px solid var(--cookie-border);
	background: #fff;
}

.cookie-consent-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 8px 24px;
	font-size: 14px;
	line-height: 1.25;
	font-weight: 600;
	font-family: inherit;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.cookie-consent-btn--primary {
	border: 2px solid var(--cookie-brand);
	background: var(--cookie-brand);
	color: #fff;
}

.cookie-consent-btn--primary:hover {
	background: var(--cookie-brand-hover);
	border-color: var(--cookie-brand-hover);
}

.cookie-consent-btn--primary:focus {
	outline: 2px solid var(--cookie-brand);
	outline-offset: 2px;
}

.cookie-consent-btn--ghost {
	border: 2px solid var(--cookie-brand);
	background: #fff;
	color: var(--cookie-brand);
}

.cookie-consent-btn--ghost:hover {
	background: var(--cookie-brand-soft);
}

.cookie-consent-btn--ghost:focus {
	outline: 2px solid var(--cookie-brand);
	outline-offset: 2px;
}

.cookie-settings-footer-link {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
	color: var(--cookie-brand);
}

.cookie-settings-footer-link:hover {
	text-decoration: none;
	color: var(--cookie-brand-hover);
}

footer .bottom-menu .item--cookie-settings {
	margin: 15px 0 0;
	font-size: 0.9333em;
	font-weight: bold;
	line-height: 1.286em;
}

footer .bottom-menu .item--cookie-settings .cookie-settings-footer-link {
	color: #333;
	text-decoration: none;
}

footer .bottom-menu .item--cookie-settings .cookie-settings-footer-link:hover {
	text-decoration: none;
	color: #333;
	opacity: 0.75;
}

@media (max-width: 767px) {
	.cookie-consent-bar {
		left: 12px;
		right: 12px;
		bottom: max(12px, env(safe-area-inset-bottom, 0px));
		width: auto;
		max-height: min(75vh, 560px);
		padding: 20px 40px 16px 16px;
		border-radius: 12px;
		border: 1px solid var(--cookie-border);
		border-top: 1px solid var(--cookie-border);
		box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	body.with_banner .cookie-consent-bar {
		bottom: max(var(--cookie-bar-mobile-with-banner-bottom), env(safe-area-inset-bottom, 0px));
	}

	.cookie-consent-bar__close {
		top: 10px;
		right: 10px;
	}

	.cookie-consent-bar__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding-top: 4px;
	}

	.cookie-consent-bar__text {
		flex: none;
		width: 100%;
		padding-right: 28px;
	}

	.cookie-consent-bar__actions {
		flex-direction: column;
		align-items: stretch;
		justify-content: stretch;
		width: 100%;
		gap: 10px;
	}

	.cookie-consent-bar__btn {
		width: 100%;
		min-height: 44px;
		white-space: normal;
		text-align: center;
	}

	.cookie-consent-modal__footer {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.cookie-consent-btn {
		width: 100%;
	}
}
