.wd-dynamic-loop,
.wd-loop-host {
  display: block;
}

.wd-loop-module-placeholder {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border: 1px dashed currentColor;
  font-size: 13px;
  line-height: 1.4;
  opacity: .82;
}

.wd-loop-module-placeholder strong {
  font-size: 14px;
  font-weight: 600;
}

.wd-loop-module-placeholder span {
  opacity: .78;
}

.wd-loop-create-card-button {
  appearance: none;
  margin: 8px 0 2px;
  padding: 7px 11px;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
}

.wd-loop-create-card-button:hover,
.wd-loop-create-card-button:focus {
  text-decoration: underline;
}

.wd-loop-builder-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.wd-loop-builder-flow span,
.wd-loop-layout-engine-note {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.2;
  opacity: .72;
}

.wd-loop-layout-engine-note {
  border-style: dashed;
}

/* The Collection Builder owns normal Divi module design. Webdash owns only
 * the internal layout surface and repeated Card positioning. */
.wd-masonry-layout-surface {
  box-sizing: border-box;
}

.wd-masonry-absolute-active {
  min-height: 1px;
}

.wd-masonry-absolute-item {
  box-sizing: border-box;
  min-width: 0;
}

/* Mask the initial frontend pass until the collection has settled. */
.wdl-masonry-runtime:not(.wdl-masonry-settled) body:not(.et-fb) .wd-loop-host.wd-layout-masonry {
  opacity: 0;
}

.wdl-masonry-settled body:not(.et-fb) .wd-loop-host.wd-layout-masonry {
  opacity: 1;
  transition: opacity 120ms ease-out;
}

/* Divi native Loop refreshes replace Card nodes before firing post-load. Hide
 * only the Collection host for that pre-paint window; runtime removes this as
 * soon as Masonry has reflowed the fresh Cards. */
.wd-masonry-refresh-pending {
  visibility: hidden;
}
