/* Repeated content controls share the existing inspector's quiet visual style. */
.studio-repeater {
  margin-block: 24px;
  min-width: 0;
}
.repeater-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.repeater-heading h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
}
.repeater-heading h3 > span {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--pastel);
  color: var(--muted);
  font: 10px var(--font);
}
.studio-repeater .repeater-item {
  margin-block: 12px;
  min-width: 0;
}
.repeater-item > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
}
.repeater-item > summary > span {
  flex-shrink: 0;
}
.repeater-item > summary > small {
  min-width: 0;
  flex: 1 1 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 400;
}
.repeater-item > summary::after {
  content: '⌄';
  margin-left: auto;
  color: var(--muted);
}
.repeater-item[open] > summary::after {
  transform: rotate(180deg);
}
.repeater-item > div {
  padding-bottom: 12px;
}
.repeater-item-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}
.repeater-remove {
  color: #a34052;
}
.studio-repeater button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.repeater-empty {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-size: 11px;
}
.repeater-limit {
  margin: 10px 0 0;
  font-size: 10px;
}

/* Flexible rows follow the actual canvas width, including the mobile preview.
   An incomplete final row shares the available space without empty cells. */
.email-section .repeat-auto-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.email-section .repeat-auto-grid > div {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.email-section .email-stats.repeat-auto-grid > div {
  flex: 1 1 150px;
}
.email-section .email-story-grid.repeat-auto-grid > div {
  flex: 1 1 240px;
}
