/* Campos de formulario, chips, selectores de estilo y formato */
input[type='text'],
input[type='number'],
input[type='date'],
textarea {
  width: 100%;
  font: var(--text-lg) var(--sans);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 84px;
}

select {
  font: 600 var(--text-base) var(--sans);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
}

input[type='range'] {
  width: 100%;
  accent-color: var(--acc);
  height: 28px;
}

.input-stacked {
  margin-top: 8px;
}

.add-row {
  display: flex;
  gap: 8px;
}
.add-row input {
  flex: 1;
  min-width: 0;
}

.chip {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font: 600 var(--text-xs) var(--sans);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.chip:hover {
  border-color: var(--grn);
}

.example-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Selector de estilo (círculos de color) */
.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chips input {
  position: absolute;
  opacity: 0;
}
.chips label {
  margin: 0;
  cursor: pointer;
}
.swatch {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid var(--card);
  box-shadow: 0 0 0 1px var(--line);
}
.chips input:checked + .swatch {
  box-shadow: 0 0 0 3px var(--acc);
}
.chips input:focus-visible + .swatch {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

/* Selector de formato (fondo de celular / tarjeta cuadrada) */
.segmented {
  display: flex;
  gap: 8px;
}
.segmented--spaced {
  margin-top: 12px;
}
.segmented label {
  flex: 1;
  margin: 0;
}
.segmented input {
  position: absolute;
  opacity: 0;
}
.segmented span {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: var(--text-md);
  cursor: pointer;
}
.segmented input:checked + span {
  background: var(--acc);
  color: var(--onacc);
  border-color: var(--acc);
  font-weight: 700;
}
.segmented input:focus-visible + span {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
