/* ── Section block ── */
.section-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
  border-bottom: 3px solid var(--paper);
}

/* ── Section header (name + edit/delete) ── */
.section__edit {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--ink);
  flex: 1;
  margin: 0;
}

.section__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.section-edit,
.section-delete {
  color: var(--ink-lt);
  line-height: 0;
  padding: var(--space-1);
}

.section-edit:hover  { color: var(--coral); }
.section-delete:hover { color: var(--coral); }

/* ── Two-column instructions layout ── */
.recipe-instructions {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-8);
  align-items: start;
}

/* ── Column headings ── */
.recipe-ingredients h2,
.recipe-directions h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--coral);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 3px solid var(--paper);
}

/* ── Ingredient rows ── */
.ingredient.draggable__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--paper);
}

.drag__handle {
  color: var(--paper);
  cursor: grab;
  flex-shrink: 0;
  line-height: 0;
}

.drag__handle:hover { color: var(--peach-dk); }

.ingredient-text {
  flex: 1;
  font-size: var(--text-sm);
  min-width: 0;
}

.ingredient-action {
  flex-shrink: 0;
  line-height: 0;
}

/* ── Add-ingredient form: compact, inline feel ── */
.recipe-ingredients .form-group {
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--paper);
}

.recipe-ingredients .form-control {
  font-size: var(--text-sm);
  padding: var(--space-5) var(--space-3) var(--space-2);
}

.recipe-ingredients .has-float-label label {
  font-size: 0.6rem;
  left: var(--space-3);
}

.recipe-ingredients .form__actions {
  margin-top: var(--space-2);
}

/* ── Direction rows ── */
.section-direction.draggable__item {
  display: flex;
  gap: var(--space-2);
  align-items: start;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--paper);
}

.section-direction .drag__handle {
  color: var(--paper);
  cursor: grab;
  flex-shrink: 0;
  line-height: 0;
  margin-top: 0.2rem;
}

.section-direction .drag__handle:hover { color: var(--peach-dk); }

.section-direction .step {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--coral);
  flex-shrink: 0;
  width: 2rem;
  text-align: right;
  line-height: 1.3;
}

.section-direction turbo-frame {
  flex: 1;
  min-width: 0;
}

.direction__edit {
  display: flex;
  gap: var(--space-3);
  align-items: start;
  flex: 1;
  min-width: 0;
}

.direction-text {
  flex: 1;
  line-height: 1.65;
  font-size: var(--text-base);
}

.direction-text p { margin: 0 0 var(--space-2); }
.direction-text p:last-child { margin-bottom: 0; }

.direction__edit-actions {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}

.direction__edit-actions a {
  padding: var(--space-1);
}

/* ── "Next step" placeholder row ── */
.section-directions > .step {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--paper);
  padding: var(--space-3) 0 var(--space-1);
}

/* ── Add-direction form ── */
.recipe-directions .form-group {
  margin-top: var(--space-2);
}

/* ── Add section block ── */
.section-add {
  padding-top: var(--space-4);
}

.section-add .form-group {
  max-width: 360px;
}

/* ── Mobile ── */
@media (max-width: 679px) {
  .recipe-instructions {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .recipe-directions {
    border-top: 3px solid var(--paper);
    padding-top: var(--space-6);
  }
}
