/* JD CMP — estilos del banner y panel. Sobrios, accesibles y con los tres
   botones de la primera capa en IGUALDAD de prominencia (criterio AEPD). */

.jdcmp-banner {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 99999;
	background: #1c1c1c;
	color: #f5f5f5;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.35);
	font-size: 15px;
	line-height: 1.5;
}
.jdcmp-banner[hidden], .jdcmp-overlay[hidden] { display: none; }
.jdcmp-banner__inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 18px 20px 20px;
}
.jdcmp-banner__title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	color: inherit;
}
.jdcmp-banner__text { margin: 0 0 14px; }
.jdcmp-banner__policy { color: #c9c9c9; text-decoration: underline; }
.jdcmp-banner__buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* Mismo estilo para Aceptar, Rechazar y Configurar: sin jerarquía visual. */
.jdcmp-btn {
	flex: 1 1 160px;
	padding: 11px 18px;
	border: 1px solid #f5f5f5;
	border-radius: 4px;
	background: transparent;
	color: #f5f5f5;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
}
.jdcmp-btn:hover, .jdcmp-btn:focus-visible {
	background: #f5f5f5;
	color: #1c1c1c;
	outline: 2px solid #f5f5f5;
	outline-offset: 2px;
}

/* Panel (segunda capa) */
.jdcmp-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.jdcmp-panel {
	background: #fff;
	color: #1c1c1c;
	max-width: 640px;
	width: 100%;
	max-height: 85vh;
	overflow: auto;
	border-radius: 6px;
	padding: 24px;
	font-size: 15px;
	line-height: 1.5;
}
.jdcmp-panel__title { margin: 0 0 16px; font-size: 19px; }
.jdcmp-cat { border-top: 1px solid #e2e2e2; padding: 12px 0; }
.jdcmp-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jdcmp-cat__label { margin: 0; font-size: 16px; }
.jdcmp-cat__always { font-size: 13px; color: #666; }
.jdcmp-cat__services { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: #444; }
.jdcmp-cat__services li { margin-bottom: 4px; }

/* Interruptor */
.jdcmp-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.jdcmp-switch input { opacity: 0; width: 0; height: 0; }
.jdcmp-switch__slider {
	position: absolute;
	inset: 0;
	background: #bbb;
	border-radius: 26px;
	transition: background 0.15s;
}
.jdcmp-switch__slider::before {
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.15s;
}
.jdcmp-switch input:checked + .jdcmp-switch__slider { background: #2e7d32; }
.jdcmp-switch input:checked + .jdcmp-switch__slider::before { transform: translateX(20px); }
.jdcmp-switch input:focus-visible + .jdcmp-switch__slider { outline: 2px solid #1c1c1c; outline-offset: 2px; }

.jdcmp-panel__buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.jdcmp-panel .jdcmp-btn { border-color: #1c1c1c; color: #1c1c1c; }
.jdcmp-panel .jdcmp-btn:hover, .jdcmp-panel .jdcmp-btn:focus-visible { background: #1c1c1c; color: #fff; }

/* Enlace fijo de revocación */
.jdcmp-footer-link {
	position: fixed;
	left: 10px;
	bottom: 10px;
	z-index: 99990;
	background: rgba(28, 28, 28, 0.85);
	color: #fff;
	border: none;
	border-radius: 3px;
	padding: 6px 10px;
	font-size: 12px;
	cursor: pointer;
}
.jdcmp-footer-link:hover, .jdcmp-footer-link:focus-visible { background: #1c1c1c; }

/* Placeholder de embeds bloqueados */
.jdcmp-embed-placeholder {
	background: #f0f0f0;
	border: 1px dashed #bbb;
	border-radius: 4px;
	padding: 28px 20px;
	text-align: center;
	margin: 10px 0;
}
.jdcmp-embed-load {
	padding: 10px 18px;
	border: 1px solid #1c1c1c;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.jdcmp-embed-load:hover { background: #1c1c1c; color: #fff; }
.jdcmp-embed-note { margin: 10px 0 0; font-size: 12.5px; color: #666; }

/* Tabla de la política de cookies */
.jdcmp-cookies-table { border-collapse: collapse; width: 100%; margin: 12px 0 24px; font-size: 14px; }
.jdcmp-cookies-table th, .jdcmp-cookies-table td { border: 1px solid #ddd; padding: 8px 10px; text-align: left; }
.jdcmp-cookies-table th { background: #f5f5f5; }

@media (max-width: 600px) {
	.jdcmp-banner__buttons { flex-direction: column; }
	.jdcmp-btn { flex-basis: auto; }
}
