/* Defaults page: the record new plans start from. Its own Save and Discard
   sit beneath the form, because the sidebar's buttons belong to the plan. */
.defaults-intro {
  max-width: 62ch;
}

.defaults-load-error[hidden] {
  display: none;
}

.defaults-load-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.defaults-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* Keep the unavailable actions legible without making them look active. The
   shared opacity fade disappears into the page at the end of this form. */
.defaults-actions .btn:disabled {
  opacity: 1;
  background: var(--color-action-subtle);
  border-color: var(--color-line);
  color: var(--color-text-muted);
}

.defaults-actions [data-defaults-discard]:not(:disabled) {
  border-color: var(--color-action);
  color: var(--color-action);
}

.defaults-message {
  flex: 1 1 240px;
  margin: 0;
  color: var(--color-text-muted);
}

.defaults-message:empty {
  display: none;
}

/* Phones: any message takes its own row, then Discard and Save share one. */
@media (max-width: 767px) {
  .defaults-message {
    flex-basis: 100%;
  }
  .defaults-actions .btn {
    flex: 1 1 0;
  }
}
