/* App releases editor (docs/design/workbench-ia.md, "App releases editor"). Tokens come from design-tokens.css; nothing here adds a color.
 * A horizontal pipeline of stages that wraps to a vertical list under 768px, one stage form at a time, a sticky footer with Save release. Works at 375px. */
.rel-back { display: inline-flex; align-items: center; min-height: 40px; margin: 0 0 6px; color: var(--blue); font-weight: 600; text-decoration: none; }
.rel-back::before { content: "\2190"; margin-right: 6px; }
.rel-back:hover { color: var(--blue-hover); text-decoration: underline; }

/* The pipeline. Each stage shows its number, title, state in words and a one line summary. The open stage has a thick bottom edge and a tint. */
.rel-stepper { margin: 14px 0 16px; }
.rel-steps { display: flex; flex-direction: row; align-items: stretch; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rel-step { flex: 1 1 0; min-width: 0; }
.rel-step-monitor { flex: 0 1 0; min-width: 150px; margin-left: 8px; padding-left: 8px; border-left: 1px dashed var(--line); }
.rel-step-button { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "number title" "state state" "summary summary"; gap: 4px 8px; align-items: center; width: 100%; height: 100%; min-height: var(--wb-touch, 40px);
  padding: 10px 12px; text-align: left; font-weight: 400; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; overflow-wrap: anywhere; }
.rel-step-button:hover { background: var(--tint); }
.rel-step-button[aria-current="step"] { background: var(--tint); border-color: var(--blue); }
.rel-step-number { grid-area: number; display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 4px; background: var(--navy); color: var(--white); font-size: 13px; font-weight: 700; border-radius: 2px; }
.rel-step-title { grid-area: title; color: var(--navy); font-weight: 600; }
.rel-step-button .wb-status { grid-area: state; font-size: 13px; }
.rel-step-summary { grid-area: summary; color: var(--muted); font-size: 13px; line-height: 1.35; }

/* One stage form. The heading takes focus when the operator moves to the stage; the move is announced, not outlined. */
[data-stage-panel] > h2 { margin-top: 0; }

/* Targets: a search box, then one row per ready target tenant. */
.rel-target-list { margin: 8px 0 12px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rel-target-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rel-target-row .checkbox-field { margin: 0; }
.rel-target-meta { margin: 0 0 0 26px; overflow-wrap: anywhere; }
.rel-security-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-left: 26px; }
.rel-security-state .hint { flex-basis: 100%; margin: 0; }
.rel-security-notice ul { margin: 6px 0; }
.rel-space-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-left: 26px; }
.rel-space-state .field { margin: 0; min-width: 180px; }
.rel-space-state .hint { flex-basis: 100%; margin: 0; }
.rel-source-sentence { margin: 0 0 8px; font-weight: 600; color: var(--navy); }

[data-stage-panel] .target-row { margin-top: 14px; }
[data-stage-panel] h3 { margin: 18px 0 4px; }

/* Validation summary: each problem is a link to its stage and field. */
.rel-issue-list { margin: 6px 0 0; padding-left: 18px; }
.rel-issue-link { min-height: 32px; height: auto; padding: 4px 0; border: 0; background: transparent; color: var(--blue); font: inherit; text-align: left; text-decoration: underline; cursor: pointer; overflow-wrap: anywhere; }
.rel-issue-link:hover { color: var(--blue-hover); background: transparent; }
.rel-review-issues p { margin: 8px 0 0; }
.rel-run-control { margin-top: 16px; }

/* Sticky footer: Save release is always in reach, with the summary above it. */
.rel-footer { position: sticky; bottom: 0; z-index: 5; margin: 16px 0 0; padding: 10px 0 12px; background: var(--page); border-top: 1px solid var(--line); }
.rel-summary { max-height: 32vh; overflow-y: auto; margin: 0 0 8px; }
.rel-summary:empty { display: none; }
.rel-summary p { margin: 0; }
.rel-footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; min-width: 0; }
/* Back and Discard changes are text links, not buttons: one primary action leads the row (REL-03). */
.link-button { min-height: var(--wb-touch, 40px); padding: 0 8px; border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--blue-hover); background: transparent; }
button.link-button:disabled, button.link-button:disabled:hover { background: transparent; border: 0; color: var(--muted); text-decoration: none; cursor: not-allowed; }
.rel-footer-actions .rel-save { margin-left: auto; }

@media (max-width: 767px) {
  .rel-steps { flex-direction: column; gap: 6px; }
  .rel-step-monitor { flex: 1 1 auto; margin: 4px 0 0; padding: 8px 0 0; border-left: 0; border-top: 1px dashed var(--line); }
  .rel-step-button { grid-template-columns: auto 1fr auto; grid-template-areas: "number title state" "summary summary summary"; }
  .rel-step-button:not([aria-current="step"]) .rel-step-summary { display: none; }
  .rel-step-button:not([aria-current="step"]) { grid-template-areas: "number title state"; min-height: 44px; }
  /* One row at 375 px: Back and Discard are links, Next and Save share the rest. */
  .rel-footer-actions { flex-wrap: nowrap; }
  .rel-footer-actions .link-button { flex: 0 0 auto; padding: 0 6px; }
  .rel-footer-actions .primary, .rel-footer-actions .rel-save { flex: 1 1 0; min-width: 0; padding-inline: 8px; min-height: var(--wb-touch, 40px); }
  .rel-footer-actions .rel-save { margin-left: 0; }
  .rel-space-state, .rel-security-state, .rel-target-meta { margin-left: 0; }
}
