/* Banner cookies + enlaces legales (VideoVault) */
.vv-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 96;
  padding: 10px 14px 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--cookie-bg, rgba(18, 18, 28, 0.97));
  border-top: 1px solid var(--cookie-border, rgba(255, 255, 255, 0.1));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.28);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--cookie-text, #ececf1);
  display: none;
  max-height: min(42vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.vv-cookie-banner.vv-visible {
  display: block;
}
.vv-cookie-banner-inner {
  max-width: 920px;
  margin: 0 auto;
}
.vv-cookie-banner p {
  margin: 0 0 10px;
  color: var(--cookie-muted, #a8adb8);
}
.vv-cookie-banner p strong {
  color: var(--cookie-text, #ececf1);
  font-weight: 600;
}
.vv-cookie-banner a {
  color: var(--cookie-accent, #d6ea6a);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.vv-cookie-banner a:hover {
  opacity: 0.92;
}
.vv-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.vv-cookie-btn {
  padding: 10px 16px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--cookie-border, rgba(255, 255, 255, 0.15));
  background: transparent;
  color: var(--cookie-text, #ececf1);
  transition: border-color 0.15s, background 0.15s;
}
.vv-cookie-btn:hover {
  border-color: var(--cookie-accent, #d6ea6a);
  background: rgba(214, 234, 106, 0.08);
}
.vv-cookie-btn-primary {
  background: var(--cookie-accent, #d6ea6a);
  color: #0a0a0f;
  border-color: transparent;
}
.vv-cookie-btn-primary:hover {
  filter: brightness(1.05);
  background: var(--cookie-accent, #d6ea6a);
}

/* Reserva espacio al scroll para que el curso / contenido no quede bajo la franja */
body.vv-cookie-banner-active {
  padding-bottom: calc(var(--vv-cookie-strip-height, 108px) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .vv-cookie-banner {
    font-size: 12px;
    padding: 10px 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .vv-cookie-btn {
    padding: 9px 12px;
    font-size: 12px;
    flex: 1 1 auto;
    min-width: 100px;
  }
}
.vv-cookie-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--cookie-border, rgba(255, 255, 255, 0.08));
  display: none;
}
.vv-cookie-panel.vv-open {
  display: block;
}
.vv-cookie-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.vv-cookie-row small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--cookie-muted, #9095a5);
  max-width: 520px;
}
.vv-cookie-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  border: none;
  padding: 0;
}
.vv-cookie-switch.vv-on {
  background: var(--cookie-accent, #d6ea6a);
}
.vv-cookie-switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}
.vv-cookie-switch.vv-on::after {
  transform: translateX(20px);
}
.vv-cookie-switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.light .vv-cookie-banner {
  --cookie-bg: rgba(255, 255, 255, 0.98);
  --cookie-border: rgba(15, 23, 42, 0.12);
  --cookie-text: #111118;
  --cookie-muted: #5c6470;
  /* El acento oscuro no debe usarse como fondo del botón principal (mala lectura) */
  --cookie-accent: #d6ea6a;
}

body.light .vv-cookie-banner a {
  color: #0b5cad;
  font-weight: 600;
}

body.light .vv-cookie-btn:not(.vv-cookie-btn-primary) {
  background: #ffffff;
  color: #111118;
  border-color: rgba(15, 23, 42, 0.22);
}

body.light .vv-cookie-btn:not(.vv-cookie-btn-primary):hover {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.32);
}

/* Botón principal: contraste alto en tema claro */
body.light .vv-cookie-btn-primary {
  background: linear-gradient(180deg, #ecf59a 0%, #d6ea6a 100%);
  color: #0a0a0f;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

body.light .vv-cookie-btn-primary:hover {
  filter: brightness(0.98);
  background: linear-gradient(180deg, #e8f082 0%, #ccdf58 100%);
}

body.light .vv-cookie-switch.vv-on {
  background: #3d6b2a;
}

body.light .vv-cookie-switch:not(:disabled):not(.vv-on) {
  background: rgba(15, 23, 42, 0.15);
}

/* Pie global al final de la página (flujo documento; no tapa el contenido) */
.vv-site-footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  padding: 14px max(16px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left));
  text-align: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  color: var(--muted, #9095a5);
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.09));
  background: var(--bg, #09090f);
  pointer-events: auto;
}
body.light .vv-site-footer {
  background: var(--bg, #f0f1f4);
}
.vv-site-footer .vv-content-notice {
  margin-left: auto;
  margin-right: auto;
}

/* Enlaces legales en pie / cabecera */
.vv-legal-strip {
  font-size: 12px;
  color: var(--muted, #9095a5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  padding: 8px 12px;
  pointer-events: auto;
}
.vv-legal-strip a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.vv-legal-strip a:hover {
  color: var(--text, #ececf1);
}
body.light .vv-legal-strip a:hover {
  color: var(--text, #111118);
}

/* Aviso de titularidad de contenidos (bloque en pie de página) */
.vv-content-notice {
  max-width: 720px;
  margin: 0 auto 12px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  color: var(--text, #ececf1);
  background: rgba(214, 234, 106, 0.1);
  border: 1px solid rgba(214, 234, 106, 0.35);
  border-radius: 11px;
  pointer-events: auto;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}
.vv-content-notice strong {
  font-weight: 800;
  font-family: 'Syne', 'DM Sans', sans-serif;
}
.vv-content-notice a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.light .vv-content-notice {
  color: #111118;
  background: rgba(20, 20, 40, 0.06);
  border-color: rgba(20, 20, 40, 0.22);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

/* Vídeo / admin: aviso en pie — en móvil tipografía compacta */
@media (max-width: 768px) {
  .vv-site-footer .vv-content-notice {
    font-size: 11px;
    line-height: 1.45;
    padding: 10px 12px;
    margin-bottom: 10px;
    text-align: left;
  }
}
