/* Dónde Puedo — Consentimiento de Cookies */

/* Blindaje contra estilos globales del tema (button { padding/border/... },
   resets de iconos SVG tipo "svg path { fill: none; stroke: currentColor }",
   etc.). Sin esto, un <button> con padding/box-sizing heredados del tema deja
   de ser cuadrado y border-radius:50% lo convierte en óvalo — es justo el
   bug que se vio en producción con el icono flotante. */
.dpcc-root button,
.dpcc-root .dpcc-btn,
.dpcc-floating,
.dpcc-modal-close,
.dp-cc-reopen-link {
	box-sizing: border-box;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
}

.dpcc-floating,
.dpcc-modal-close {
	padding: 0;
}

.dpcc-floating svg {
	fill: none; /* el color lo pone el <path>, no el <svg> */
	width: 18px !important;
	height: 18px !important;
	max-width: none !important;
	display: block;
	flex-shrink: 0;
}

.dpcc-floating svg path {
	fill: currentColor !important;
	stroke: none !important;
}

.dpcc-root {
	--dpcc-primary: #1a7f5a;
	--dpcc-text: #1f2937;
	--dpcc-muted: #6b7280;
	--dpcc-bg: #ffffff;
	--dpcc-border: #e5e7eb;
	position: fixed;
	inset: 0;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	pointer-events: none;
}

.dpcc-root[hidden] {
	display: none;
}

.dpcc-overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
	pointer-events: auto;
}

.dpcc-overlay[hidden] {
	display: none;
}

/* Barra inferior */
.dpcc-banner {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: auto;
	background: var(--dpcc-bg);
	border-top: 1px solid var(--dpcc-border);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.dpcc-banner[hidden] {
	display: none;
}

.dpcc-banner-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 20px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
}

.dpcc-banner-inner .dpcc-title {
	flex: 0 0 100%;
	margin: 0;
	font-weight: 700;
	font-size: 16px;
	color: var(--dpcc-text);
}

.dpcc-banner-inner .dpcc-description {
	flex: 1 1 420px;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--dpcc-muted);
}

.dpcc-banner-inner .dpcc-description a {
	color: var(--dpcc-primary);
	text-decoration: underline;
}

.dpcc-banner-inner .dpcc-actions {
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* Modal centrado */
.dpcc-modal {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 64px);
	overflow-y: auto;
	background: var(--dpcc-bg);
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	pointer-events: auto;
}

.dpcc-modal[hidden] {
	display: none;
}

.dpcc-modal-inner {
	padding: 28px;
	position: relative;
}

.dpcc-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	appearance: none;
	border: none;
	background: none;
	font-size: 24px;
	line-height: 1;
	color: var(--dpcc-muted);
	cursor: pointer;
	padding: 4px;
}

.dpcc-modal-close[hidden] {
	display: none;
}

.dpcc-modal-close:hover {
	color: var(--dpcc-text);
}

.dpcc-modal-inner h2 {
	margin: 0 0 12px;
	font-size: 18px;
	color: var(--dpcc-text);
}

.dpcc-modal-inner .dpcc-description {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--dpcc-muted);
}

.dpcc-modal-inner .dpcc-description a {
	color: var(--dpcc-primary);
	text-decoration: underline;
}

.dpcc-categories {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	border-top: 1px solid var(--dpcc-border);
}

.dpcc-category {
	padding: 14px 0;
	border-bottom: 1px solid var(--dpcc-border);
}

.dpcc-category-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.dpcc-category-label {
	font-weight: 600;
	font-size: 14px;
	color: var(--dpcc-text);
}

.dpcc-category-desc {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--dpcc-muted);
}

/* Switch */
.dpcc-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: 0 0 auto;
}

.dpcc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.dpcc-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #d1d5db;
	border-radius: 999px;
	transition: 0.15s;
}

.dpcc-slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: #fff;
	border-radius: 50%;
	transition: 0.15s;
}

.dpcc-switch input:checked + .dpcc-slider {
	background-color: var(--dpcc-primary);
}

.dpcc-switch input:checked + .dpcc-slider::before {
	transform: translateX(18px);
}

.dpcc-switch-disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Botones */
.dpcc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.dpcc-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.dpcc-btn-primary {
	background: var(--dpcc-primary);
	color: #fff;
}

.dpcc-btn-outline {
	background: transparent;
	border-color: var(--dpcc-border);
	color: var(--dpcc-text);
}

.dpcc-btn-ghost {
	background: transparent;
	color: var(--dpcc-muted);
	text-decoration: underline;
	padding-left: 4px;
	padding-right: 4px;
}

/* Enlace "Configurar cookies" reutilizable (shortcode / footer) */
.dp-cc-reopen-link {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

/* Icono flotante para reabrir las preferencias en cualquier momento.
   Deliberadamente pequeño y discreto (no es un botón de acción principal,
   es una salida de emergencia para cambiar de opinión). */
.dpcc-floating {
	--dpcc-primary: #1a7f5a;
	--dpcc-floating-bottom: 80px;
	--dpcc-floating-side: 16px;
	position: fixed !important;
	bottom: var(--dpcc-floating-bottom);
	top: auto !important;
	z-index: 999998;
	width: 34px !important;
	height: 34px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	line-height: 1 !important;
	border-radius: 50% !important;
	border: none !important;
	background: var(--dpcc-primary);
	color: #fff;
	display: flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	transition: transform 0.15s ease;
	opacity: 0.9;
}

.dpcc-floating:hover {
	transform: scale(1.08);
	opacity: 1;
}

.dpcc-floating[hidden] {
	display: none;
}

.dpcc-floating-bottom-left {
	left: var(--dpcc-floating-side);
}

.dpcc-floating-bottom-right {
	right: var(--dpcc-floating-side);
}

@media (max-width: 600px) {
	.dpcc-floating {
		width: 30px !important;
		height: 30px !important;
	}
}

@media (max-width: 600px) {
	.dpcc-banner-inner {
		padding: 16px;
	}
	.dpcc-banner-inner .dpcc-actions {
		width: 100%;
		justify-content: stretch;
	}
	.dpcc-banner-inner .dpcc-actions .dpcc-btn {
		flex: 1 1 auto;
	}
}
