/* =====================================================
   WD COOKIE CONSENT
   Banner y panel de configuración de cookies
===================================================== */

:root {
	--wdcc-accent: #00A896;
	--wdcc-accent-dark: #007A6C;
	--wdcc-gray-50: #F8F9FA;
	--wdcc-gray-100: #EAECEF;
	--wdcc-gray-200: #D1D5DB;
	--wdcc-gray-400: #9BA3AE;
	--wdcc-gray-600: #5C6370;
	--wdcc-gray-700: #374151;
	--wdcc-gray-900: #1C2128;
	--wdcc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

#wdcc-cookies[hidden],
#wdccConfig[hidden],
#wdccWelcome[hidden],
.wdcc-info-row[hidden] {
	display: none !important;
}

#wdcc-cookies {
	position: fixed;
	inset: 0;
	z-index: 2147483645;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 20px;
	background: rgba(13, 27, 42, .38);
	box-sizing: border-box;
}

#wdcc-cookies * {
	box-sizing: border-box;
}

#wdcc-cookies .wdcc-dialog {
	width: min(100%, 860px);
	max-height: min(78vh, 680px);
	overflow: auto;
	background: #fff;
	color: var(--wdcc-gray-900);
	border: 1px solid var(--wdcc-gray-100);
	border-radius: 14px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
	font-family: var(--wdcc-font);
}

#wdcc-cookies .wdcc-container {
	padding: 24px;
}

#wdcc-cookies .wdcc-msg h5 {
	margin: 0 0 10px;
	color: var(--wdcc-gray-900);
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
}

#wdcc-cookies .wdcc-msg p,
#wdcc-cookies .wdcc-info-row td {
	margin: 0 0 10px;
	color: var(--wdcc-gray-600);
	font-size: 13px;
	line-height: 1.55;
}

#wdcc-cookies a {
	color: var(--wdcc-accent-dark);
	font-weight: 700;
	text-decoration: underline;
}

#wdcc-cookies .wdcc-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--wdcc-gray-100);
}

#wdcc-cookies .wdcc-more-link {
	margin-right: auto;
	color: var(--wdcc-gray-600);
	font-size: 12px;
	font-weight: 600;
}

#wdcc-cookies .wdcc-btn {
	border: 0;
	border-radius: 8px;
	padding: 9px 14px;
	font-family: var(--wdcc-font);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

#wdcc-cookies .wdcc-btn-secondary {
	background: var(--wdcc-gray-100);
	color: var(--wdcc-gray-700);
}

#wdcc-cookies .wdcc-btn-success {
	background: var(--wdcc-accent);
	color: #fff;
}

#wdcc-cookies .wdcc-btn:hover {
	filter: brightness(.96);
}

#wdcc-cookies .wdcc-selector {
	overflow-x: auto;
	margin-top: 14px;
}

#wdcc-cookies .wdcc-table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	font-size: 12px;
}

#wdcc-cookies .wdcc-table th,
#wdcc-cookies .wdcc-table td {
	padding: 11px 10px;
	border-bottom: 1px solid var(--wdcc-gray-100);
	text-align: left;
	vertical-align: top;
}

#wdcc-cookies .wdcc-table th {
	color: var(--wdcc-gray-900);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
}

#wdcc-cookies .wdcc-required {
	color: var(--wdcc-gray-400);
	font-weight: 700;
}

#wdcc-cookies .wdcc-info-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-left: 4px;
	border: 0;
	border-radius: 50%;
	background: var(--wdcc-gray-100);
	color: var(--wdcc-gray-700);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: transform .18s ease;
}

#wdcc-cookies .wdcc-info-btn.wdcc-rotate {
	transform: rotate(180deg);
}

#wdcc-cookies .wdcc-toggle {
	position: relative;
	display: inline-flex;
	width: 44px;
	height: 24px;
	cursor: pointer;
}

#wdcc-cookies .wdcc-toggle input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

#wdcc-cookies .wdcc-toggle span {
	position: relative;
	width: 44px;
	height: 24px;
	border-radius: 999px;
	background: var(--wdcc-gray-200);
	transition: background .2s ease;
}

#wdcc-cookies .wdcc-toggle span::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
	transition: transform .2s ease;
}

#wdcc-cookies .wdcc-toggle input:checked + span {
	background: var(--wdcc-accent);
}

#wdcc-cookies .wdcc-toggle input:checked + span::before {
	transform: translateX(20px);
}

@media screen and (hover: none) and (pointer: coarse), screen and (max-width: 768px) {
	#wdcc-cookies {
		align-items: flex-end;
		padding: 12px;
	}

	#wdcc-cookies .wdcc-dialog {
		max-height: 82vh;
		border-radius: 12px;
	}

	#wdcc-cookies .wdcc-container {
		padding: 18px;
	}

	#wdcc-cookies .wdcc-footer {
		align-items: stretch;
		flex-direction: column;
	}

	#wdcc-cookies .wdcc-more-link {
		margin-right: 0;
	}

	#wdcc-cookies .wdcc-btn {
		width: 100%;
	}
}

/* Botón "Gestionar cookies" para menús / footer / shortcode / theme footer.
   Sin colores ni tamaños propios a propósito: hereda el estilo del texto
   del footer donde se pegue (igual que un enlace normal de la lista). */
.wdcc-manage-link,
.wd-footer-cookies {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	text-align: left;
	color: inherit;
	cursor: pointer;
	text-decoration: underline;
}

/* Enlace flotante automático (alternativa a integrarlo en el footer del tema) */
.wdcc-floating-link {
	position: fixed;
	bottom: 16px;
	z-index: 2147483000;
	border: 1px solid var(--wdcc-gray-200);
	border-radius: 999px;
	background: #fff;
	color: var(--wdcc-gray-700);
	font-family: var(--wdcc-font);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	padding: 8px 14px;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
	transition: color .2s, border-color .2s;
}

.wdcc-floating-link:hover {
	color: var(--wdcc-accent-dark);
	border-color: var(--wdcc-accent-dark);
}

.wdcc-floating-left {
	left: 16px;
}

.wdcc-floating-right {
	right: 16px;
}

@media (max-width: 480px) {
	.wdcc-floating-link {
		font-size: 11px;
		padding: 7px 12px;
	}
}
