/**
 * @file
 * Image Caption: overrides to make centered alignment work inside CKEditor.
 */

/**
 * Since .align-center is set on the non-captioned image's parent block element
 * in CKEditor, the image must be centered separately.
 */
p[data-widget="image"].align-center {
  text-align: center;
}

/**
 * Since .align-center is set on captioned widget's wrapper element in CKEditor,
 * the alignment of internals must be set separately.
 */
div[data-cke-widget-wrapper].align-center > figure[data-widget="image"] {
  margin-right: auto;
  margin-left: auto;
}
