/* Banner de consentimiento — tarjeta blanca, navy #01163d, azul #014fd7. */

.dp-consent {
	position: fixed;
	z-index: 60;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0;
}

.dp-consent[hidden] {
	display: none !important;
}

.dp-consent__card {
	box-sizing: border-box;
	background: #fff;
	color: #01163d;
	border-radius: 12px 12px 0 0;
	box-shadow: 0 8px 32px rgba(1, 22, 61, 0.12);
	padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
	max-height: 45vh;
	overflow-y: auto;
	width: 100%;
	animation: dp-consent-in 220ms ease-out;
}

.dp-consent__title {
	margin: 0 0 8px;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: #01163d;
	line-height: 1.3;
}

.dp-consent__text {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.5;
	color: #01163d;
}

.dp-consent__text a {
	color: #014fd7;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.dp-consent__text a:hover {
	color: #013da8;
}

.dp-consent__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.dp-consent__btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 10px 16px;
	border-radius: 12px;
	font-family: Figtree, system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.dp-consent__btn--accept {
	background: #014fd7;
	border: 1px solid #014fd7;
	color: #fff;
}

.dp-consent__btn--accept:hover {
	background: #013da8;
	border-color: #013da8;
	color: #fff;
}

.dp-consent__btn--reject {
	background: #fff;
	border: 1px solid #01163d;
	color: #01163d;
}

.dp-consent__btn--reject:hover {
	background: #eef3ff;
	color: #01163d;
}

.dp-consent__btn--manage {
	background: transparent;
	border: 1px solid transparent;
	color: #01163d;
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 600;
}

.dp-consent__btn--manage:hover {
	color: #014fd7;
}

.dp-consent__cats {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 16px;
}

.dp-consent__cat {
	padding: 12px 0 0;
	border-top: 1px solid #e3e8f2;
}

.dp-consent__cat:first-child {
	padding-top: 0;
	border-top: 0;
}

.dp-consent__cat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.dp-consent__cat-name {
	font-size: 14px;
	font-weight: 600;
	color: #01163d;
}

.dp-consent__cat-help {
	margin: 4px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #38425a;
}

.dp-consent__switch {
	appearance: none;
	box-sizing: border-box;
	position: relative;
	flex-shrink: 0;
	width: 44px;
	height: 24px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 999px;
	background: #d5dbe8;
	cursor: pointer;
}

.dp-consent__switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(1, 22, 61, 0.16);
	transition: transform 0.16s ease-out;
}

.dp-consent__switch[aria-checked="true"] {
	background: #014fd7;
}

.dp-consent__switch[aria-checked="true"]::after {
	transform: translateX(20px);
}

.dp-consent__switch:disabled,
.dp-consent__switch[aria-disabled="true"] {
	opacity: 0.7;
	cursor: not-allowed;
}

.dp-consent button:focus,
.dp-consent button:focus-visible,
.dp-consent a:focus,
.dp-consent a:focus-visible,
.dp-consent button:focus-visible:not(input):not(select):not(textarea):not(.form-field),
.dp-consent a:focus-visible:not(input):not(select):not(textarea):not(.form-field) {
	outline: none !important;
	outline-offset: 0 !important;
	border-color: #014fd7 !important;
	box-shadow: 0 0 0 4px rgba(1, 79, 215, 0.14) !important;
}

button.dp-consent-prefs {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-align: inherit;
}

@keyframes dp-consent-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.dp-consent__card {
		animation: none;
	}

	.dp-consent__switch::after {
		transition: none;
	}
}

@media (min-width: 768px) {
	.dp-consent {
		left: 16px;
		right: auto;
		bottom: 16px;
		width: min(420px, calc(100vw - 32px));
	}

	.dp-consent__card {
		border-radius: 12px;
		max-height: min(80vh, 560px);
		padding: 20px;
		width: 100%;
	}
}

body.dp-consent-visible .wa-fab,
body.dp-consent-visible .wa-btn {
	bottom: calc(45vh + 12px);
}

@media (min-width: 768px) {
	body.dp-consent-visible .wa-fab,
	body.dp-consent-visible .wa-btn {
		bottom: 24px;
	}
}
