/**
 * Cookie consent — RGPD.
 * Usa las variables de color/tipografía ya definidas en main.css.
 */

.hp-cookie-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	background: var(--hp-color-dark-soft, #111111);
	color: var(--hp-color-on-dark, #ffffff);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, .25);
	transform: translateY(100%);
	transition: transform .3s ease;
	font-family: var(--hp-font-body, sans-serif);
}
.hp-cookie-banner--visible {
	transform: translateY(0);
}
.hp-cookie-banner__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.25rem 1.5rem;
}
.hp-cookie-banner__text {
	margin: 0 0 1rem;
	font-size: var(--hp-fs-sm, .875rem);
	line-height: 1.5;
	color: var(--hp-color-on-dark-mut, #cccccc);
}
.hp-cookie-banner__link {
	color: var(--hp-color-on-dark, #ffffff);
	text-decoration: underline;
}
.hp-cookie-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	justify-content: flex-end;
}
.hp-cookie-btn {
	border: none;
	border-radius: 8px;
	padding: .6rem 1.1rem;
	font-size: var(--hp-fs-sm, .875rem);
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}
.hp-cookie-btn--primary {
	background: var(--hp-color-primary, #3B82F6);
	color: #fff;
}
.hp-cookie-btn--primary:hover {
	background: var(--hp-color-primary-dark, #2563eb);
}
.hp-cookie-btn--outline {
	background: transparent;
	color: var(--hp-color-on-dark, #ffffff);
	border: 1px solid rgba(255, 255, 255, .3);
}
.hp-cookie-btn--outline:hover {
	border-color: rgba(255, 255, 255, .6);
}
.hp-cookie-btn--ghost {
	background: transparent;
	color: var(--hp-color-on-dark-mut, #cccccc);
	text-decoration: underline;
	padding: .6rem .4rem;
}

.hp-cookie-banner__title {
	margin: 0 0 1rem;
	font-family: var(--hp-font-heading, sans-serif);
	font-size: var(--hp-fs-lg, 1.125rem);
}

.hp-cookie-cat {
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding: .85rem 0;
}
.hp-cookie-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
}
.hp-cookie-cat__name {
	font-weight: 600;
}
.hp-cookie-cat__badge {
	font-size: var(--hp-fs-xs, .75rem);
	color: var(--hp-color-on-dark-mut, #cccccc);
}
.hp-cookie-cat__desc {
	margin: .35rem 0 0;
	font-size: var(--hp-fs-xs, .75rem);
	color: var(--hp-color-on-dark-mut, #cccccc);
	line-height: 1.5;
}

.hp-cookie-toggle {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}
.hp-cookie-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}
.hp-cookie-toggle__slider {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, .25);
	border-radius: 999px;
	transition: background .2s ease;
	cursor: pointer;
}
.hp-cookie-toggle__slider::before {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
}
.hp-cookie-toggle input:checked + .hp-cookie-toggle__slider {
	background: var(--hp-color-primary, #3B82F6);
}
.hp-cookie-toggle input:checked + .hp-cookie-toggle__slider::before {
	transform: translateX(18px);
}

.hp-cookie-prefs-link {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
	font-size: var(--hp-fs-xs, .75rem);
}

@media (max-width: 640px) {
	.hp-cookie-banner__actions {
		justify-content: stretch;
	}
	.hp-cookie-btn {
		flex: 1;
	}
	.hp-cookie-btn--ghost {
		flex: none;
	}
}
