/* Las variantes nuevas obedecen al estado activo, sin depender de un ID fijo. */
.ds-valor .ds-materiales-editables img.activa { opacity: 1; visibility: visible; }
.ds-valor .ds-materiales-editables img[hidden] { display: none; }
.ds-materiales-editables .ds-valor-controles:not([hidden]) {
  display: flex; position: absolute; z-index: 3; inset: auto 1rem 1rem;
  flex-wrap: wrap; gap: .5rem; pointer-events: auto;
}
.ds-materiales-editables .ds-valor-controles button {
  min-block-size: 44px; border: 1px solid currentColor; padding: .4em .7em;
  background: var(--marfil, #f4efdf); color: var(--bosque, #234c39);
}
.ds-ficha-local .ds-field-label { display: block; }
.editor-styles-wrapper .ds-ficha-editor { display: block; }
.editor-styles-wrapper .ds-ficha-editor :is(input, select, textarea):disabled { opacity: 1; color: inherit; }
.editor-styles-wrapper .ds-editor-submit {
  display: inline-block; padding: .7em 1em; min-block-size: 44px;
  background: var(--bosque, #234c39); color: var(--marfil, #f4efdf); border-radius: 0;
}
.editor-styles-wrapper .ds-editor-ayuda { font-size: .85em; }
.editor-styles-wrapper .ds-materiales-editables { pointer-events: auto; }
.editor-styles-wrapper .ds-materiales-editables img { pointer-events: none; }
.ds-editor-orden { display: flex; gap: .5rem; margin-block: .75rem; }
.ds-editor-opcion { padding-block: .75rem; border-block-end: 1px solid #ddd; }
.ds-editor-vacio { position: relative; z-index: 2; padding: 1rem; background: #f4efdf; }

/* A materials block inserted in another section remains a standalone carousel. */
.ds-materiales-editables:not(.ds-valor .ds-materiales-editables) {
  position: relative;
  inset: auto;
  display: grid;
  width: 100%;
  margin: 0;
  pointer-events: auto;
}
.ds-materiales-editables:not(.ds-valor .ds-materiales-editables)::before { content: none; }
.ds-materiales-editables:not(.ds-valor .ds-materiales-editables) img.activa {
  position: static;
  width: 100%;
  height: auto;
  max-height: 65vh;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
}

/* Clip the card at the edge of the scene as it leaves and returns. */
.ds-valor-escena[data-materiales-listos] { overflow: clip; }
.ds-valor-escena[data-materiales-listos] img.activa {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  transition: none;
}

/* Honeypot remains outside the visual and keyboard flow. */
.ds-contacto-trampa { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ds-contacto-envio[aria-busy="true"] button[type="submit"] { opacity: .65; cursor: wait; }
