/* Contact card stack — used both on the show page (read-only) and
   the edit page (click-to-edit + remove button). The edit-side cards
   wear .contact-card--editable which adds the hover/cursor affordance
   and the inline remove button to the right of the body. The shared
   contact-modal handles add/edit field capture. */

.contact-list,
.contact-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-2);
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-2) var(--gap-3);
  padding: var(--gap-2) var(--gap-3);
  background: var(--surface-2, transparent);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.contact-card > strong { font-weight: 600; }

/* Edit-page card variant. The body is a button so the whole strip is
   keyboard-focusable + click-to-edit; the remove × sits to the right
   and stops propagation so removing doesn't accidentally open the
   edit modal. */
.contact-card--editable {
  padding: 0;
  align-items: stretch;
  flex-wrap: nowrap;
}
.contact-card--editable .contact-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--gap-2) var(--gap-3);
  padding: var(--gap-3);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.contact-card--editable .contact-card__body:hover { background: var(--surface-2); }
.contact-card--editable .contact-card__body:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--surface-2);
}

/* × Remove button — small, ghost, danger on hover. Padding matches
   the card body so it visually centers in the card's vertical rhythm. */
.btn-icon-remove {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 var(--gap-3);
}
.btn-icon-remove:hover { color: var(--err); background: var(--surface-2); }

/* Deployment-tab fieldset stack — single column. Contact-row inputs
   need full width to stay readable; an earlier 2-column experiment
   squeezed them. Keep the four fieldsets stacked vertically. */
.deployment-grid {
  display: flex;
  flex-direction: column;
  gap: var(--gap-5);
}

/* Copy-email flash state. The element itself stays an <a> for
   accessibility (keyboard / right-click → copy address), so we
   only restyle the text — color goes success-green so the swap is
   visible without being noisy. */
.is-copied {
  color: var(--ok);
  font-style: italic;
}
