/* E3 Cookie Consent */
:root {
	--e3cc-primary: #1f5fbf;
	--e3cc-bg: #ffffff;
	--e3cc-fg: #1d2330;
	--e3cc-muted: #5b6474;
	--e3cc-line: #e3e6ec;
	--e3cc-soft: #f4f6f9;
	--e3cc-radius: 10px;
	--e3cc-shadow: 0 10px 40px rgba(16, 24, 40, .18);
}
.e3cc-theme-dark {
	--e3cc-bg: #1b1f27;
	--e3cc-fg: #eef1f6;
	--e3cc-muted: #a7afbd;
	--e3cc-line: #2f3542;
	--e3cc-soft: #242a35;
}

.e3cc, .e3cc *, .e3cc-fab { box-sizing: border-box; }
.e3cc { font-family: inherit; font-size: 15px; line-height: 1.5; color: var(--e3cc-fg); }
.e3cc [hidden], .e3cc[hidden] { display: none !important; }
.e3cc p { margin: 0 0 .6em; }
.e3cc-title { font-weight: 700; font-size: 1.05em; margin: 0 0 .35em !important; color: var(--e3cc-fg); }
.e3cc-a { color: var(--e3cc-primary); text-decoration: underline; }
.e3cc-theme-dark .e3cc-a { color: inherit; }

/* Banner */
.e3cc-banner {
	position: fixed; z-index: 2147483000;
	background: var(--e3cc-bg); box-shadow: var(--e3cc-shadow);
	animation: e3cc-in .25s ease-out;
}
.e3cc-banner .e3cc-msg { color: var(--e3cc-muted); font-size: .94em; }
.e3cc-banner .e3cc-msg p:last-child { margin-bottom: 0; }

.e3cc-pos-bar { left: 0; right: 0; bottom: 0; border-top: 1px solid var(--e3cc-line); }
.e3cc-pos-bar .e3cc-inner { max-width: 1240px; margin: 0 auto; padding: 18px 20px; display: flex; gap: 24px; align-items: center; }
.e3cc-pos-bar .e3cc-body { flex: 1 1 auto; }
.e3cc-pos-bar .e3cc-actions { flex: 0 0 auto; }

.e3cc-pos-box { left: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); border-radius: var(--e3cc-radius); border: 1px solid var(--e3cc-line); }
.e3cc-pos-box .e3cc-inner { padding: 20px; }
.e3cc-pos-box .e3cc-actions { margin-top: 14px; }

.e3cc-pos-center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); border-radius: var(--e3cc-radius); border: 1px solid var(--e3cc-line); animation: none; }
.e3cc-pos-center .e3cc-inner { padding: 24px; }
.e3cc-pos-center .e3cc-actions { margin-top: 16px; }

/* Botones: Aceptar y Rechazar comparten estilo (misma relevancia, Guía AEPD) */
.e3cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.e3cc-pos-box .e3cc-actions .e3cc-btn, .e3cc-pos-center .e3cc-actions .e3cc-btn { flex: 1 1 auto; }
.e3cc-btn {
	appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .93em;
	padding: 10px 18px; border-radius: 8px; border: 2px solid var(--e3cc-primary);
	line-height: 1.2; text-align: center; white-space: nowrap; transition: filter .15s, background .15s;
}
.e3cc-btn-main { background: var(--e3cc-primary); color: #fff; }
.e3cc-btn-main:hover { filter: brightness(1.08); }
.e3cc-btn-ghost { background: transparent; color: var(--e3cc-fg); border-color: var(--e3cc-line); }
.e3cc-btn-ghost:hover { background: var(--e3cc-soft); }
.e3cc-btn:focus-visible, .e3cc-x:focus-visible, .e3cc-cat-toggle:focus-visible, .e3cc-fab:focus-visible, .e3cc-switch input:focus-visible + .e3cc-slider {
	outline: 3px solid var(--e3cc-primary); outline-offset: 2px;
}

/* Modal de configuración */
.e3cc-modal { position: fixed; inset: 0; z-index: 2147483001; display: flex; align-items: center; justify-content: center; padding: 16px; }
.e3cc-overlay { position: absolute; inset: 0; background: rgba(10, 14, 22, .55); }
.e3cc-dialog {
	position: relative; background: var(--e3cc-bg); color: var(--e3cc-fg); border-radius: var(--e3cc-radius);
	box-shadow: var(--e3cc-shadow); width: min(680px, 100%); max-height: calc(100vh - 32px);
	display: flex; flex-direction: column; outline: none; animation: e3cc-in .2s ease-out;
}
.e3cc-dhead { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--e3cc-line); }
.e3cc-dhead .e3cc-title { margin: 0 !important; }
.e3cc-x { appearance: none; background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--e3cc-muted); padding: 2px 8px; border-radius: 6px; }
.e3cc-dbody { padding: 16px 20px; overflow-y: auto; }
.e3cc-intro { color: var(--e3cc-muted); font-size: .93em; }
.e3cc-dfoot { padding: 14px 20px; border-top: 1px solid var(--e3cc-line); }
.e3cc-dfoot .e3cc-actions { justify-content: flex-end; }
.e3cc-cid { margin: 10px 0 0 !important; font-size: .78em; color: var(--e3cc-muted); text-align: right; }
.e3cc-cid code { font-size: 1em; background: none; padding: 0; color: inherit; }

.e3cc-cat { border: 1px solid var(--e3cc-line); border-radius: 8px; margin-top: 10px; }
.e3cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.e3cc-cat-toggle { appearance: none; background: none; border: 0; padding: 4px 0; cursor: pointer; font: inherit; font-weight: 600; color: var(--e3cc-fg); text-align: left; display: flex; align-items: center; gap: 8px; }
.e3cc-chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.e3cc-cat-toggle[aria-expanded="true"] .e3cc-chev { transform: rotate(45deg); }
.e3cc-count { color: var(--e3cc-muted); font-weight: 400; }
.e3cc-always { font-size: .82em; font-weight: 600; color: var(--e3cc-primary); white-space: nowrap; }
.e3cc-theme-dark .e3cc-always { color: var(--e3cc-fg); }
.e3cc-cat-body { padding: 0 14px 12px; font-size: .9em; color: var(--e3cc-muted); }
.e3cc-none { font-style: italic; }

.e3cc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.e3cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.e3cc-slider { position: absolute; inset: 0; background: #b8bfcc; border-radius: 24px; transition: background .15s; }
.e3cc-slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.e3cc-switch input:checked + .e3cc-slider { background: var(--e3cc-primary); }
.e3cc-switch input:checked + .e3cc-slider::before { transform: translateX(20px); }

.e3cc-tscroll { overflow-x: auto; margin-top: 8px; }
.e3cc-ctable { width: 100%; border-collapse: collapse; font-size: .92em; }
.e3cc-ctable th, .e3cc-ctable td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--e3cc-line); vertical-align: top; color: var(--e3cc-fg); }
.e3cc-ctable th { background: var(--e3cc-soft); font-weight: 600; }
.e3cc-ctable code { font-size: .95em; word-break: break-all; background: none; padding: 0; color: inherit; }

/* Botón flotante para cambiar/retirar el consentimiento */
.e3cc-fab {
	position: fixed; left: 16px; bottom: 16px; z-index: 2147482999;
	width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--e3cc-line);
	background: var(--e3cc-bg); color: var(--e3cc-primary); box-shadow: 0 4px 16px rgba(16, 24, 40, .18);
	display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.e3cc-fab.e3cc-theme-dark { color: var(--e3cc-fg); }
.e3cc-fab:hover { transform: scale(1.06); }

/* Contenido de terceros bloqueado */
iframe[data-e3cc-blocked] { display: none !important; }
.e3cc-placeholder { width: 100%; min-height: 200px; background: #f1f3f6; border: 1px dashed #c3c9d4; border-radius: 8px; display: flex; align-items: center; justify-content: center; text-align: center; margin: 0 0 1em; color: #333; }
.e3cc-ph-in { padding: 20px; max-width: 460px; font-size: 14px; line-height: 1.5; }
.e3cc-ph-in p { margin: 0 0 12px; }
.e3cc-ph-in .e3cc-btn { border: 2px solid var(--e3cc-primary); background: var(--e3cc-primary); color: #fff; }
.e3cc-ph-more { font-size: 12px; margin: 10px 0 0 !important; }
.e3cc-ph-more a { color: var(--e3cc-primary); }

/* Shortcodes */
.e3cc-link-btn { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.e3cc-footer-links { text-align: center; padding: 14px 16px 70px; font-size: 13px; }
.e3cc-legal-links a { color: inherit; }
.e3cc-table-scroll { overflow-x: auto; margin-bottom: 1.5em; }
.e3cc-table { width: 100%; border-collapse: collapse; font-size: .93em; }
.e3cc-table th, .e3cc-table td { border: 1px solid #dfe3ea; padding: 8px 10px; text-align: left; vertical-align: top; }
.e3cc-table th { background: rgba(0, 0, 0, .04); }
.e3cc-table code { word-break: break-all; }

html.e3cc-lock, html.e3cc-lock body { overflow: hidden; }

@keyframes e3cc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.e3cc-pos-center { animation: none; }

@media (max-width: 782px) {
	.e3cc-pos-bar .e3cc-inner { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
	.e3cc-actions .e3cc-btn { flex: 1 1 auto; }
	.e3cc-dfoot .e3cc-actions { justify-content: stretch; }
	.e3cc-ctable thead { display: none; }
	.e3cc-ctable tr { display: block; border-bottom: 1px solid var(--e3cc-line); padding: 6px 0; }
	.e3cc-ctable td { display: block; border: 0; padding: 2px 4px; }
}
@media (prefers-reduced-motion: reduce) {
	.e3cc-banner, .e3cc-dialog { animation: none; }
}

/* Blindaje frente a estilos globales de botones del tema */
.e3cc button, .e3cc-fab, .e3cc-placeholder button, button.e3cc-link-btn {
	text-transform: none !important; letter-spacing: normal !important; box-shadow: none !important;
	min-height: 0 !important; min-width: 0 !important; width: auto; margin: 0; text-decoration: none;
	font-family: inherit !important;
}
.e3cc .e3cc-btn, .e3cc-placeholder .e3cc-btn {
	font-size: 14px !important; font-weight: 600 !important; line-height: 1.2 !important;
	padding: 10px 18px !important; border-radius: 8px !important; border: 2px solid var(--e3cc-primary) !important;
}
.e3cc .e3cc-btn-main, .e3cc .e3cc-btn-main:hover, .e3cc .e3cc-btn-main:focus,
.e3cc-placeholder .e3cc-btn-main, .e3cc-placeholder .e3cc-btn-main:hover, .e3cc-placeholder .e3cc-btn-main:focus {
	background: var(--e3cc-primary) !important; color: #fff !important; border-color: var(--e3cc-primary) !important;
}
.e3cc .e3cc-btn-ghost, .e3cc .e3cc-btn-ghost:focus { background: transparent !important; color: var(--e3cc-fg) !important; border-color: var(--e3cc-line) !important; }
.e3cc .e3cc-btn-ghost:hover { background: var(--e3cc-soft) !important; color: var(--e3cc-fg) !important; }
.e3cc .e3cc-cat-toggle, .e3cc .e3cc-cat-toggle:hover, .e3cc .e3cc-cat-toggle:focus {
	background: transparent !important; color: var(--e3cc-fg) !important; border: 0 !important; padding: 4px 0 !important;
	font-size: 15px !important; font-weight: 600 !important; line-height: 1.4 !important;
}
.e3cc .e3cc-x, .e3cc .e3cc-x:hover, .e3cc .e3cc-x:focus {
	background: transparent !important; color: var(--e3cc-muted) !important; border: 0 !important;
	font-size: 26px !important; line-height: 1 !important; padding: 2px 8px !important;
}
.e3cc-fab, .e3cc-fab:hover, .e3cc-fab:focus {
	background: var(--e3cc-bg) !important; color: var(--e3cc-primary) !important; border: 1px solid var(--e3cc-line) !important;
	width: 44px !important; height: 44px !important; padding: 0 !important; border-radius: 50% !important;
	box-shadow: 0 4px 16px rgba(16, 24, 40, .18) !important;
}
.e3cc-fab.e3cc-theme-dark { --e3cc-bg: #1b1f27; --e3cc-line: #2f3542; color: #eef1f6 !important; }
button.e3cc-link-btn, button.e3cc-link-btn:hover, button.e3cc-link-btn:focus {
	background: none !important; border: 0 !important; padding: 0 !important; color: inherit !important;
	font-size: inherit !important; font-weight: inherit !important; text-decoration: underline !important;
}
.e3cc .e3cc-ctable, .e3cc .e3cc-ctable th, .e3cc .e3cc-ctable td { border-left: 0 !important; border-right: 0 !important; border-top: 0 !important; }
.e3cc .e3cc-ctable { border: 0 !important; }
