/* Stimulus type picker popover (Intended Stimulus select, previewable form) */

.stimulus-picker-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stimulus-picker-row .form-control {
  flex: 1;
  min-width: 0;
}

.stimulus-picker {
  position: relative;
  display: inline-block;
}

.stimulus-picker__trigger {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: #4a5568;
  padding: 0.25rem;
}

.stimulus-picker__trigger:hover,
.stimulus-picker__trigger:focus {
  color: #1a202c;
}

.stimulus-picker__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 1000;
  width: 22rem;
  max-width: 90vw;
  max-height: 24rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d2d6dc;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
}

.stimulus-picker__heading {
  font-weight: 600;
  color: #333;
  padding: 0.25rem 0.5rem 0.5rem;
}

.stimulus-picker__option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.stimulus-picker__option:hover,
.stimulus-picker__option:focus {
  background: #f0f4f8;
}

.stimulus-picker__option--selected {
  background: #e6f0fa;
}

.stimulus-picker__option-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.stimulus-picker__option--selected .stimulus-picker__option-name::after {
  content: "✓";
  color: #2b6cb0;
}

.stimulus-picker__badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #2b6cb0;
  color: #fff;
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

.stimulus-picker__option-description {
  font-size: 0.8rem;
  color: #4a5568;
  margin-top: 0.15rem;
  font-weight: 400;
}
