#dbcc-root,
#dbcc-root * {
	box-sizing: border-box;
}

/* El navegador ya oculta [hidden] por defecto, pero .dbcc-modal fija su
   propio "display: flex" (necesario para su layout cuando está visible) y,
   al ser una regla de autor sin !important, gana siempre al comportamiento
   nativo de "hidden" — así que sin esto el modal se ve aunque tenga el
   atributo hidden puesto, incluso sin haber hecho ningún clic. */
#dbcc-banner[hidden],
#dbcc-modal[hidden] {
	display: none !important;
}

#dbcc-root {
	font-family: var(--dbcc-font, "DM Sans", sans-serif);
}

/* ---- Banner ---- */
.dbcc-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483647;
	background: #ffffff;
	border-top: 1px solid #eaeaea;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
	padding: 20px 24px;
}

.dbcc-banner-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.dbcc-banner-text {
	flex: 1 1 480px;
	color: #111827;
}

.dbcc-banner-text strong {
	display: block;
	font-size: 16px;
	margin-bottom: 4px;
}

.dbcc-banner-text p {
	margin: 0 0 6px;
	font-size: 14px;
	line-height: 1.5;
	color: #4b5563;
}
.dbcc-banner-text p:last-child {
	margin-bottom: 0;
}

.dbcc-banner-text a {
	color: var(--dbcc-brand, #e8315a);
	text-decoration: underline;
}

.dbcc-banner-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* ---- Botones ---- */
.dbcc-btn {
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 6px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.dbcc-btn-primary {
	background-color: var(--dbcc-brand, #e8315a);
	color: #ffffff;
}
.dbcc-btn-primary:hover {
	filter: brightness(0.9);
}

.dbcc-btn-outline {
	background-color: transparent;
	border-color: var(--dbcc-dark, #111827);
	color: var(--dbcc-dark, #111827);
}
.dbcc-btn-outline:hover {
	background-color: #f5f5f5;
}

/* Mismo peso visual que dbcc-btn-primary (relleno, mismo padding/tamaño),
   con otro color: Aceptar y Rechazar deben pesar igual, sin inducir a aceptar. */
.dbcc-btn-secondary {
	background-color: var(--dbcc-dark, #111827);
	color: #ffffff;
}
.dbcc-btn-secondary:hover {
	filter: brightness(1.2);
}

/* ---- Modal ---- */
.dbcc-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.dbcc-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.6);
}

.dbcc-modal-box {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	max-width: 760px;
	width: 100%;
	max-height: 85vh;
	overflow: hidden;
	display: flex;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dbcc-modal-side {
	background-color: var(--dbcc-dark, #111827);
	color: #d1d5db;
	width: 220px;
	flex-shrink: 0;
	padding: 24px 20px;
	display: none;
}

@media (min-width: 640px) {
	.dbcc-modal-side {
		display: block;
	}
}

.dbcc-modal-logo {
	max-width: 140px;
	margin-bottom: 16px;
}

.dbcc-modal-side-text {
	font-size: 13px;
	line-height: 1.6;
}

.dbcc-modal-main {
	flex: 1;
	padding: 32px;
	overflow-y: auto;
	position: relative;
}

.dbcc-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
}
.dbcc-modal-close:hover {
	color: var(--dbcc-brand, #e8315a);
}

.dbcc-category {
	padding: 18px 0;
	border-bottom: 1px solid #eaeaea;
}
.dbcc-category:last-of-type {
	border-bottom: none;
}

.dbcc-category-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.dbcc-category-head h3 {
	margin: 0;
	font-size: 15px;
	color: #111827;
}

.dbcc-always-on {
	font-size: 12px;
	font-weight: 600;
	color: #9ca3af;
}

.dbcc-category p {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: #4b5563;
}

/* ---- Contenido WYSIWYG (textos de cada sección) ---- */
.dbcc-rich-text {
	font-size: 13px;
	line-height: 1.6;
	color: #4b5563;
}
.dbcc-rich-text p {
	margin: 0 0 8px;
}
.dbcc-rich-text p:last-child {
	margin-bottom: 0;
}
.dbcc-rich-text a {
	color: var(--dbcc-brand, #e8315a);
}
.dbcc-rich-text ul,
.dbcc-rich-text ol {
	margin: 0 0 8px;
	padding-left: 18px;
}
.dbcc-rich-text h1,
.dbcc-rich-text h2,
.dbcc-rich-text h3,
.dbcc-rich-text h4,
.dbcc-rich-text h5,
.dbcc-rich-text h6 {
	margin: 12px 0 6px;
	font-size: 14px;
	font-weight: 600;
	color: #111827;
}

/* ---- Listado de cookies (WYSIWYG: puede ser tabla, lista o texto) ---- */
.dbcc-cookie-content {
	margin-top: 10px;
	font-size: 12px;
	line-height: 1.6;
	color: #6b7280;
}
.dbcc-cookie-content p {
	margin: 0 0 6px;
}
.dbcc-cookie-content ul,
.dbcc-cookie-content ol {
	margin: 0;
	padding-left: 18px;
}
.dbcc-cookie-content li {
	margin-bottom: 4px;
}
.dbcc-cookie-content table {
	width: 100%;
	border-collapse: collapse;
}
.dbcc-cookie-content th,
.dbcc-cookie-content td {
	text-align: left;
	padding: 6px 8px;
	border-bottom: 1px solid #eaeaea;
	vertical-align: top;
}
.dbcc-cookie-content th {
	font-weight: 600;
	color: #374151;
	background-color: #f9fafb;
}

.dbcc-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 24px;
}

/* ---- Interruptor (toggle) ---- */
.dbcc-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
}
.dbcc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.dbcc-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #d1d5db;
	border-radius: 999px;
	transition: background-color 0.2s ease;
}
.dbcc-slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	top: 3px;
	background-color: #ffffff;
	border-radius: 50%;
	transition: transform 0.2s ease;
}
.dbcc-switch input:checked + .dbcc-slider {
	background-color: var(--dbcc-brand, #e8315a);
}
.dbcc-switch input:checked + .dbcc-slider::before {
	transform: translateX(18px);
}

/* ---- Enlace "Gestionar cookies" (shortcode) ---- */
.dbcc-manage-link {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

/* ---- Móvil ---- */
@media (max-width: 640px) {
	.dbcc-banner-inner {
		flex-direction: column;
		align-items: stretch;
	}
	.dbcc-banner-actions {
		justify-content: stretch;
	}
	.dbcc-btn {
		flex: 1;
	}
}
