/* SeqStack Start Pipeline launcher */

.seq-pipeline-launcher-page {
  padding-bottom: 24px;
}

.seq-pipeline-launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.seq-pipeline-launch-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fff 0%, #f9fbfa 100%);
  border: 1px solid #d7e0e3;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(25, 50, 58, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.seq-pipeline-launch-card:hover {
  border-color: #c5d4d8;
  box-shadow: 0 6px 16px rgba(25, 50, 58, 0.08);
  transform: translateY(-1px);
}

.seq-pipeline-launch-card.is-ready {
  border-left: 4px solid #07554f;
}

.seq-pipeline-launch-card.is-draft {
  border-left: 4px solid #b8c5ca;
}

.seq-pipeline-launch-card-main {
  grid-column: 1;
  min-width: 0;
}

.seq-pipeline-launch-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.seq-pipeline-launch-card h3 {
  margin: 0;
  color: #1a3a42;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}

.seq-pipeline-launch-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.seq-pipeline-version {
  color: #8a979c;
  font-size: 10px;
  font-weight: 700;
}

.seq-pipeline-launch-status {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.seq-pipeline-launch-status.is-ready {
  color: #07554f;
  background: #edf6f2;
  border: 1px solid #cfe3da;
}

.seq-pipeline-launch-status.is-draft {
  color: #66767c;
  background: #f2f5f6;
  border: 1px solid #d9e1e4;
}

.seq-pipeline-launch-description {
  margin: 0 0 8px;
  color: #5f7077;
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.seq-pipeline-launch-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.seq-pipeline-launch-chain-arrow {
  color: #a8b5ba;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.seq-pipeline-launch-chain-step {
  --seq-piece-color: #07554f;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 7px 3px 4px;
  border-radius: 7px;
  border: 1px solid #dfe6e9;
  background: #fff;
  box-shadow: 0 1px 3px rgba(25, 50, 58, 0.04);
  font-size: 10px;
  font-weight: 700;
  color: #3d5259;
  line-height: 1.2;
}

.seq-pipeline-launch-chain-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 5px;
  background: color-mix(in srgb, var(--seq-piece-color) 14%, white);
  color: var(--seq-piece-color);
  border: 1px solid color-mix(in srgb, var(--seq-piece-color) 24%, white);
  font-size: 8px;
  font-weight: 800;
}

.seq-pipeline-launch-chain-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 110px;
}

.seq-pipeline-launch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: #8a979c;
  font-size: 10px;
  font-weight: 650;
}

.seq-pipeline-launch-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.seq-pipeline-launch-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c5d0d4;
}

.seq-pipeline-launch-meta span:first-child::before {
  display: none;
}

.seq-pipeline-launch-card-action {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  padding-left: 4px;
}

.seq-pipeline-launch-delete {
  align-self: flex-end;
  border: 1px solid #d9e2e5;
  border-radius: 6px;
  background: #fff;
  color: #8a979c;
  font-size: 14px;
  line-height: 1;
  padding: 2px 7px;
  cursor: pointer;
}

.seq-pipeline-launch-delete:hover {
  color: #b42318;
  border-color: #e8c9c5;
  background: #fff5f4;
}

.seq-pipeline-launch-button {
  min-width: 108px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
}

.seq-pipeline-launch-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .seq-pipeline-launch-card {
    grid-template-columns: 1fr;
  }

  .seq-pipeline-launch-card-action {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
    padding-left: 0;
    padding-top: 4px;
  }

  .seq-pipeline-launch-button {
    width: 100%;
  }
}

@media (min-width: 1200px) {
  .seq-pipeline-launch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Delete confirmation modal */
.seq-pipeline-launch-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 35, 42, 0.42);
}

.seq-pipeline-launch-modal[hidden] {
  display: none !important;
}

.seq-pipeline-launch-modal-card {
  width: min(420px, 100%);
  padding: 20px 22px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d7e0e3;
  box-shadow: 0 16px 40px rgba(16, 35, 42, 0.18);
}

.seq-pipeline-launch-modal-card h4 {
  margin: 0 0 8px;
  color: #07554f;
  font-size: 16px;
}

.seq-pipeline-launch-modal-card p {
  margin: 0 0 16px;
  color: #56676c;
  font-size: 13px;
  line-height: 1.45;
}

.seq-pipeline-launch-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
