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

.checkbox-demo-stack {
  display:        flex;
  flex-direction: column;
  align-items:    flex-start;
  gap:            var(--space-3);
}

.checkbox-demo-option {
  display:     flex;
  align-items: flex-start;
  gap:         var(--space-3);
}

/* The box centers on the label's first line, not the top of the block. */
.checkbox-demo-option > .checkbox {
  margin-top: calc((var(--text-label) * var(--leading-snug) - var(--check-size)) / 2);
}

.checkbox-demo-option .hint {
  margin: var(--space-1) 0 0;
}

.checkbox-demo-nested {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-2);
  padding-left:   var(--space-6);
}

.checkbox-demo-table {
  width:           100%;
  max-width:       32rem;
  border-collapse: collapse;
  font-size:       var(--text-sm);
}

.checkbox-demo-table th,
.checkbox-demo-table td {
  padding:       var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--rule);
  text-align:    left;
}

.checkbox-demo-table th:first-child,
.checkbox-demo-table td:first-child {
  width: 2.5rem;
}

.checkbox-demo-table tr[data-selected] td {
  background: var(--item-selected);
}

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

@media (max-width: 30rem) {
  .checkbox-demo-table .checkbox-demo-email {
    display: none;
  }
}

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

/* 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 > .checkbox-demo-log {
  align-self: stretch;
  min-height: 2lh;
  text-align: center;
}

/* The nested group's echo lists two groups and runs to three lines on a phone. */
.demo-stage.is-column > .checkbox-demo-log.is-long {
  min-height: 3lh;
}
