/**
 * @package SP Cookie Consent
 * Cup of Air: Necessary / Analytics / Marketing categories.
 */

#sp-cookie-consent *,
#sp-cookie-consent *::before,
#sp-cookie-consent *::after {
	box-sizing: border-box;
}

#sp-cookie-consent {
	position: fixed;
	/*
	 * CLS: do not inherit Sofia Sans (display=swap). Webfont metrics swap was
	 * attributed as #sp-cookie-consent.position-bottom height collapse (e.g. 78→50)
	 * on cold RU 1280 loads (~0.15). System UI fonts paint stable from first frame.
	 */
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	bottom: 0;
	z-index: 10001;
	max-height: 48vh;
	overflow: auto;
}

#sp-cookie-consent.is-hidden {
	display: none !important;
}

#sp-cookie-consent a,
#sp-cookie-consent a:hover {
	text-decoration: underline;
}

#sp-cookie-consent.position-bottom_left,
#sp-cookie-consent.position-bottom_right {
	width: 380px;
	max-width: calc(100% - 24px);
	border-radius: 8px;
	bottom: 12px;
}

#sp-cookie-consent.position-bottom_left {
	left: 12px;
}

#sp-cookie-consent.position-bottom_right {
	right: 12px;
}

#sp-cookie-consent.position-bottom {
	left: 0;
	width: 100%;
}

#sp-cookie-consent > div {
	padding: 10px 14px;
	position: relative;
}

#sp-cookie-consent .sp-cookie-consent-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

#sp-cookie-consent .sp-cookie-consent-content {
	flex: 1 1 220px;
	min-width: 0;
}

#sp-cookie-consent .sp-cookie-consent-action {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	flex: 0 0 auto;
	margin-top: 0;
}

#sp-cookie-consent .sp-cookie-allow,
#sp-cookie-consent .sp-cookie-deny,
#sp-cookie-consent .sp-cookie-customize,
#sp-cookie-consent .sp-cookie-save,
#sp-cookie-consent .sp-cookie-back {
	display: inline-block;
	text-decoration: none !important;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	border-radius: 0.25rem;
	letter-spacing: 0.02em;
	transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
	cursor: pointer;
}

#sp-cookie-consent .sp-cookie-deny,
#sp-cookie-consent .sp-cookie-customize,
#sp-cookie-consent .sp-cookie-back {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.85);
	color: #fff !important;
}

#sp-cookie-consent .sp-cookie-deny:hover,
#sp-cookie-consent .sp-cookie-deny:focus,
#sp-cookie-consent .sp-cookie-deny:active,
#sp-cookie-consent .sp-cookie-customize:hover,
#sp-cookie-consent .sp-cookie-customize:focus,
#sp-cookie-consent .sp-cookie-customize:active,
#sp-cookie-consent .sp-cookie-back:hover,
#sp-cookie-consent .sp-cookie-back:focus,
#sp-cookie-consent .sp-cookie-back:active {
	background: rgba(255, 255, 255, 0.12);
	text-decoration: none !important;
}

#sp-cookie-consent .sp-cookie-allow:hover,
#sp-cookie-consent .sp-cookie-allow:focus,
#sp-cookie-consent .sp-cookie-allow:active,
#sp-cookie-consent .sp-cookie-save:hover,
#sp-cookie-consent .sp-cookie-save:focus,
#sp-cookie-consent .sp-cookie-save:active {
	text-decoration: none !important;
}

/* Customize panel */
#sp-cookie-consent .sp-cookie-panel {
	width: 100%;
}

#sp-cookie-consent .sp-cookie-panel[hidden] {
	display: none !important;
}

#sp-cookie-consent .sp-cookie-panel-lead {
	margin: 0 0 8px;
	opacity: 0.95;
}

#sp-cookie-consent .sp-cookie-cats {
	display: grid;
	gap: 8px;
	margin: 0 0 10px;
}

#sp-cookie-consent .sp-cookie-cat {
	display: block;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 6px;
	cursor: pointer;
}

#sp-cookie-consent .sp-cookie-cat-necessary {
	opacity: 0.9;
	cursor: default;
}

#sp-cookie-consent .sp-cookie-cat-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

#sp-cookie-consent .sp-cookie-cat-row input {
	margin: 0;
	flex: 0 0 auto;
}

#sp-cookie-consent .sp-cookie-cat-desc {
	display: block;
	margin-top: 4px;
	padding-left: 22px;
	font-size: 12px;
	font-weight: 400;
	opacity: 0.9;
}

#sp-cookie-consent .sp-cookie-panel-actions {
	justify-content: flex-start;
}

/* One-line bar on tablet/desktop so hero CTAs stay above it (1024×600) */
@media (min-width: 768px) {
	#sp-cookie-consent.position-bottom {
		max-height: 56px;
		overflow: hidden;
	}

	#sp-cookie-consent.position-bottom > div {
		padding: 6px 14px;
	}

	#sp-cookie-consent.position-bottom .sp-cookie-consent-main {
		flex-wrap: nowrap;
		align-items: center;
		gap: 8px 12px;
		min-height: 0;
		max-height: 44px;
	}

	#sp-cookie-consent.position-bottom .sp-cookie-consent-content {
		flex: 1 1 auto;
		min-width: 0;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	#sp-cookie-consent.position-bottom .sp-cookie-consent-action {
		flex: 0 0 auto;
		flex-wrap: nowrap;
	}

	#sp-cookie-consent.position-bottom .sp-cookie-allow,
	#sp-cookie-consent.position-bottom .sp-cookie-deny,
	#sp-cookie-consent.position-bottom .sp-cookie-customize {
		padding: 4px 10px;
		font-size: 12px;
	}

	#sp-cookie-consent.position-bottom.is-customizing {
		max-height: 56vh;
		overflow: auto;
	}
}

@media (min-width: 992px) {
	#sp-cookie-consent .sp-cookie-consent-content {
		flex: 1 1 auto;
		max-width: none;
	}

	#sp-cookie-consent.is-customizing {
		max-height: 56vh;
	}

	#sp-cookie-consent .sp-cookie-cats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	#sp-cookie-consent {
		font-size: 12px;
		line-height: 1.35;
		max-height: 42vh;
	}

	#sp-cookie-consent.is-customizing {
		max-height: 55vh;
	}

	#sp-cookie-consent > div {
		padding: 8px 12px;
	}

	#sp-cookie-consent .sp-cookie-consent-action {
		width: 100%;
		justify-content: stretch;
	}

	#sp-cookie-consent .sp-cookie-allow,
	#sp-cookie-consent .sp-cookie-deny,
	#sp-cookie-consent .sp-cookie-customize,
	#sp-cookie-consent .sp-cookie-save,
	#sp-cookie-consent .sp-cookie-back {
		flex: 1 1 auto;
		text-align: center;
		white-space: normal;
	}

	#sp-cookie-consent .sp-cookie-cat-desc {
		padding-left: 0;
	}
}
