body {
  font-family: system-ui, sans-serif;
  background: #f6f8fa;
  color: #333;
  margin: 0;
  padding: 40px;
  text-align: center;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

textarea {
  width: 100%;
  height: 100px;
  margin-top: 15px;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

button {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #0078ff;
  border: none;
  color: white;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

button:hover {
  background-color: #005fd4;
}

#result {
  margin-top: 20px;
  font-size: 1.1rem;
}

/* Combo Box */

.combo {
  position: relative;
  width: 360px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.combo-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 36px 10px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
}

.combo-input:focus {
  border-color: #6aa8ff;
  box-shadow: 0 0 0 3px rgba(106, 168, 255, 0.25);
}

.combo-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
}

.combo-list {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1000;
  margin-top: 6px;
  background: #111;
  color: #eee;
  border: 1px solid #333;
  border-radius: 10px;
  overflow: hidden;
  display: none;
}

.combo-list.show {
  display: block;
}

.combo-items {
  max-height: 240px;
  overflow-y: auto;
}

.combo-item {
  padding: 10px 12px;
  cursor: pointer;
  line-height: 1.2;
  border-bottom: 1px solid #222;
}

.combo-item:last-child {
  border-bottom: none;
}

.combo-item:hover,
.combo-item.active {
  background: #1f2937;
}

.sr {
  position: absolute;
  left: -9999px;
}

/* Selected position Texts */
.selected-wrap {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;   /* align left under input */
  padding-left: 2px;
  font-size: 15px;
}

.selected-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0px 12px;
  border-radius: 300px;
  border: 1px solid #333;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 10px;
  line-height: 1.2;
  min-height: 38px;              /* (⬆️ increased slightly for visual balance) */
}

.selected-chip span {
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.selected-chip button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #cbd5e1;
  margin-left: 6px;
  transition: transform 0.2s, background 0.2s, color 0.2s;
  transform: translateY(-6px);  /* ✅ small upward nudge fixes optical misalignment */
}

.selected-chip button:hover {
  background: #1e293b;
  color: #f8fafc;
  transform: scale(1.1) translateY(-6px); /* ✅ stays perfectly centered */
}


.selected-empty {
  color: #666;
  font-size: 14px;
  padding-left: 4px;
}
