.nixfubu-smart-image-block {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin-bottom: var(--nixfubu-smart-image-margin-bottom, 16px);
  border: 0;
  outline: 0;
  box-shadow: none;
  text-align: var(--nixfubu-smart-image-align, center);
}

.nixfubu-smart-image-block.is-align-stretch {
  display: block;
  width: 100%;
  text-align: left;
}

.nixfubu-smart-image__figure {
  display: inline-block;
  width: var(--nixfubu-smart-image-width, 100%);
  max-width: 100%;
  margin: 0;
  vertical-align: top;
}

.nixfubu-smart-image-block.is-align-stretch .nixfubu-smart-image__figure {
  display: block;
  width: 100%;
}

.nixfubu-smart-image__link {
  display: block;
  width: 100%;
  border-radius: var(--nixfubu-smart-image-radius, 12px);
  text-decoration: none;
}

.nixfubu-smart-image__media,
.nixfubu-smart-image__placeholder {
  display: block;
  width: 100%;
  height: var(--nixfubu-smart-image-height, auto);
  border: var(--nixfubu-smart-image-border-width, 0) solid var(--nixfubu-smart-image-border-color, transparent);
  border-radius: var(--nixfubu-smart-image-radius, 12px);
  box-shadow: var(--nixfubu-smart-image-shadow, none);
  opacity: var(--nixfubu-smart-image-opacity, 1);
  object-fit: var(--nixfubu-smart-image-fit, contain);
  object-position: var(--nixfubu-smart-image-position, center center);
  transform: scale(1);
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.nixfubu-smart-image__placeholder {
  min-height: 180px;
  padding: 40px 20px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  text-align: center;
}

.nixfubu-smart-image__figure:hover .nixfubu-smart-image__media,
.nixfubu-smart-image__figure:hover .nixfubu-smart-image__placeholder {
  opacity: var(--nixfubu-smart-image-hover-opacity, var(--nixfubu-smart-image-opacity, 1));
  transform: scale(var(--nixfubu-smart-image-hover-scale, 1));
  box-shadow: var(--nixfubu-smart-image-hover-shadow, var(--nixfubu-smart-image-shadow, none));
}

.editor-styles-wrapper .wp-block-nixfubu-smart-image,
.editor-styles-wrapper [data-type="nixfubu/smart-image"],
.editor-styles-wrapper [data-type="nixfubu/smart-image"] > .block-editor-block-list__block-edit,
.editor-styles-wrapper [data-type="nixfubu/smart-image"] > .block-editor-block-list__block-edit > div {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.editor-styles-wrapper .wp-block-nixfubu-smart-image,
.editor-styles-wrapper .nixfubu-smart-image-block {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.editor-styles-wrapper .wp-block-nixfubu-smart-column.is-content-row .nixfubu-smart-column__inner.block-editor-block-list__layout > [data-type="nixfubu/smart-image"],
.editor-styles-wrapper .wp-block-nixfubu-smart-column.is-content-row .nixfubu-smart-column__inner .block-editor-block-list__layout > [data-type="nixfubu/smart-image"],
.editor-styles-wrapper .wp-block-nixfubu-smart-column.is-content-row-reverse .nixfubu-smart-column__inner.block-editor-block-list__layout > [data-type="nixfubu/smart-image"],
.editor-styles-wrapper .wp-block-nixfubu-smart-column.is-content-row-reverse .nixfubu-smart-column__inner .block-editor-block-list__layout > [data-type="nixfubu/smart-image"] {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: 100% !important;
}

.editor-styles-wrapper .wp-block-nixfubu-smart-column.is-content-row .nixfubu-smart-column__inner.block-editor-block-list__layout > [data-type="nixfubu/smart-image"]:has(.nixfubu-smart-image-block.is-align-stretch),
.editor-styles-wrapper .wp-block-nixfubu-smart-column.is-content-row .nixfubu-smart-column__inner .block-editor-block-list__layout > [data-type="nixfubu/smart-image"]:has(.nixfubu-smart-image-block.is-align-stretch),
.editor-styles-wrapper .wp-block-nixfubu-smart-column.is-content-row-reverse .nixfubu-smart-column__inner.block-editor-block-list__layout > [data-type="nixfubu/smart-image"]:has(.nixfubu-smart-image-block.is-align-stretch),
.editor-styles-wrapper .wp-block-nixfubu-smart-column.is-content-row-reverse .nixfubu-smart-column__inner .block-editor-block-list__layout > [data-type="nixfubu/smart-image"]:has(.nixfubu-smart-image-block.is-align-stretch) {
  flex: 1 1 100% !important;
  width: 100% !important;
}

.editor-styles-wrapper [data-type="nixfubu/smart-image"]::before,
.editor-styles-wrapper [data-type="nixfubu/smart-image"]::after,
.editor-styles-wrapper .wp-block-nixfubu-smart-image::before,
.editor-styles-wrapper .wp-block-nixfubu-smart-image::after,
.editor-styles-wrapper .nixfubu-smart-image-block::before,
.editor-styles-wrapper .nixfubu-smart-image-block::after {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.editor-styles-wrapper .nixfubu-smart-image__media {
  outline: 0 !important;
}

.nixfubu-smart-image__caption {
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.nixfubu-smart-image-control .components-base-control__label,
.nixfubu-smart-image-segment .components-base-control__label {
  margin-bottom: 7px;
}

.nixfubu-smart-image-color {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d6dce5;
  border-radius: 4px;
  background: #fff;
}

.nixfubu-smart-image-color input[type="color"] {
  width: 38px;
  height: 34px;
  padding: 4px;
  border: 0;
  border-right: 1px solid #e2e8f0;
  background: #fff;
}

.nixfubu-smart-image-color input[type="text"] {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
}

.nixfubu-smart-image-segment__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #d6dce5;
  border-radius: 4px;
  background: #fff;
}

.nixfubu-smart-image-segment__button.components-button {
  min-height: 32px;
  justify-content: center;
  border-radius: 0;
  box-shadow: none;
  color: #475569;
  font-size: 12px;
}

.nixfubu-smart-image-segment__button.components-button + .nixfubu-smart-image-segment__button.components-button {
  border-left: 1px solid #e2e8f0;
}

.nixfubu-smart-image-segment__button.components-button.is-active {
  background: #d7dbe0;
  color: #111827;
}

@media (max-width: 767px) {
  .nixfubu-smart-image__figure {
    width: var(--nixfubu-smart-image-width-mobile, var(--nixfubu-smart-image-width, 100%));
  }

  .nixfubu-smart-image__media,
  .nixfubu-smart-image__placeholder {
    height: var(--nixfubu-smart-image-height-mobile, var(--nixfubu-smart-image-height, auto));
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .nixfubu-smart-image__figure {
    width: var(--nixfubu-smart-image-width-tablet, var(--nixfubu-smart-image-width, 100%));
  }

  .nixfubu-smart-image__media,
  .nixfubu-smart-image__placeholder {
    height: var(--nixfubu-smart-image-height-tablet, var(--nixfubu-smart-image-height, auto));
  }
}

.editor-styles-wrapper .nixfubu-smart-image-block.is-preview-tablet .nixfubu-smart-image__figure {
  width: var(--nixfubu-smart-image-width-tablet, var(--nixfubu-smart-image-width, 100%));
}

.editor-styles-wrapper .nixfubu-smart-image-block.is-preview-tablet .nixfubu-smart-image__media,
.editor-styles-wrapper .nixfubu-smart-image-block.is-preview-tablet .nixfubu-smart-image__placeholder {
  height: var(--nixfubu-smart-image-height-tablet, var(--nixfubu-smart-image-height, auto));
}

.editor-styles-wrapper .nixfubu-smart-image-block.is-preview-mobile .nixfubu-smart-image__figure {
  width: var(--nixfubu-smart-image-width-mobile, var(--nixfubu-smart-image-width, 100%));
}

.editor-styles-wrapper .nixfubu-smart-image-block.is-preview-mobile .nixfubu-smart-image__media,
.editor-styles-wrapper .nixfubu-smart-image-block.is-preview-mobile .nixfubu-smart-image__placeholder {
  height: var(--nixfubu-smart-image-height-mobile, var(--nixfubu-smart-image-height, auto));
}
