/* Response policy view — small layout helpers not already covered by the shared workspace/
   section/table/form vocabulary in console.css and decoys-reports.css (.workspace-page,
   .section, .card, table.data, .login-label/.login-input/.login-error, .btn, .pill). Only the
   editable-rules-table and add-rule-form shapes below are new to this page. */

/* table.data.* beats table.data's own min-width:720px (same-weight class selectors, so the more
   specific compound selector — not source order — is what has to win here). */
table.data.response-rules-table {
  min-width: 920px;
}

.response-rules-table input.login-input,
.response-rules-table textarea.login-input {
  width: 100%;
  box-sizing: border-box;
}

.response-rules-table textarea.login-input {
  resize: vertical;
}

.response-pos-cell {
  white-space: nowrap;
}

.response-move-btns {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.response-enabled-cell {
  text-align: center;
}

.response-enabled-checkbox {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--gold);
}

.response-add-card {
  margin-top: 0.9rem;
}

/* The four fields sit on one top edge (`align-items: start`): their labels share a baseline and their
   boxes a top edge whatever a box grows to. The button and the rules count are a row of their own below,
   so "Add rule" is a button and not a fifth box in the grid (audit page 33, ticket 001086). */
.response-add-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  align-items: start;
  margin-top: 0.6rem;
}

.response-add-form textarea.login-input {
  box-sizing: border-box;
  resize: vertical;
}

.response-add-form__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
}

/* A bordered button with accent ink: it reads as an action next to the dark boxes above it, and the
   page's one filled button stays Save. */
.response-add-btn {
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  color: var(--gold);
  border-color: var(--border-gold);
}

.response-add-btn:hover:not(:disabled) {
  background: var(--gold-soft);
}

.response-add-btn:disabled {
  color: var(--ink-dim);
  border-color: var(--border-strong);
  cursor: not-allowed;
}

.response-add-limit {
  margin: 0;
}

.response-rules-empty {
  margin: 0;
  max-width: 46rem;
}

/* The save bar is a card of its own: the caption on the left, Save on the right, both on the card's
   padding (it used to be a bare row under the page, with an empty caption pushing Save off the edge). */
.response-savebar {
  margin-top: 1.2rem;
  padding: var(--space-3) var(--space-4);
}

.response-savebar__row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.response-savebar__row .response-caption {
  flex: 1 1 auto;
  margin: 0;
}

.response-savebar__row .btn {
  margin-left: auto;
}

.response-caption.is-dirty {
  color: var(--gold);
}

.response-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.response-preview-row .login-input {
  flex: 1 1 16rem;
  min-width: 0;
}

@media (max-width: 640px) {
  table.data.response-rules-table {
    min-width: 640px;
  }
}
