@import "https://assets.elements.dev/assets/app/shared/ui-catalog/catalog/style.c38e1d7304920e3.css";

.field-demo-form {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-4);
  width:          100%;
  max-width:      28rem;
}

.field-demo-wide {
  width:     100%;
  max-width: 36rem;
}

.field-demo-row {
  display:   flex;
  flex-wrap: wrap;
  gap:       var(--space-2);
}

.field-demo-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   var(--space-4);
}

.field-demo-log {
  font-family: var(--font-mono);
  font-size:   var(--text-xs);
  color:       var(--ink-dim);
}

@media (max-width: 30rem) {
  .field-demo-grid {
    grid-template-columns: 1fr;
  }
}

/* Month, year and CVV share a row; on a phone, two columns, so each
   error message fits its reserved line. */
.field-demo-grid.is-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 30rem) {
  .field-demo-grid.is-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* An echo line in a column demo takes the stage's width and reserves two
   lines, so a longer or wrapping echo never moves the controls above it or
   grows the demo. */
.demo-stage.is-column > .field-demo-log {
  align-self: stretch;
  min-height: 2lh;
  text-align: center;
}
