/* krok's own rules, loaded after Slate's tokens.css and components.css. Slate
   draws every shared component; this sheet holds only what krok alone needs:
   the application card's insides and the admin forms' column. */

/* A page's muted intro under its heading keeps the card gap above the filter
   or form after it. Slate spaces an intro from a card after it, not from
   anything else. */
.container > p.text-muted:not(:has(+ .profile-card)) {
  margin-bottom: 0.85rem;
}

/* --- Application card --- */

/* Title row: the name and its state and kind badges on one line. */
.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.app-head h2 {
  margin: 0 0.25rem 0 0;
}

.app-meta {
  margin-bottom: 1.25rem;
}

.app-meta p {
  margin-bottom: 0.5rem;
}

/* Slate spaces the paragraphs and tables in a card, not its forms: an
   application card runs up to three forms before its actions. */
.profile-card > form:not(:last-child) {
  margin-bottom: 1.25rem;
}

.profile-card > p + form {
  margin-top: 0.6rem;
}

/* Lifecycle actions sit under a line, apart from the saves above them. */
.app-actions {
  padding-top: 1.25rem;
  border-top: var(--edge);
}

/* --- Admin forms --- */

/* A data-entry form keeps to a readable column instead of the page's width. */
.admin-form {
  max-width: 40rem;
}

/* Timeout, retries and window need a number's width, not a URL's. */
.admin-form input[type="number"] {
  max-width: 12rem;
}

/* The Add form's card after the destinations table: the gap between two
   cards. Slate spaces a card after a link row or an intro, not a table. */
.table-container + .profile-card {
  margin-top: 0.85rem;
}

/* A webhook URL is one long word: it breaks anywhere rather than run past a
   phone card's edge. */
.dest-url {
  overflow-wrap: anywhere;
}
