
/* stile khusus untuk question */
.multi-option-checklist {
  display: flex;
  flex-direction: column;
}

.check-card {
  position: relative;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  background-color: #fff;
  transition: all 0.2s ease;
  padding: 0;
  font-size: 1rem;
  width: 100%;
  height: auto;
  font-weight: normal;
  color: #212529;
}

/* Sembunyikan default input */
.check-card input[type="checkbox"],
.check-card input[type="radio"] {
  display: none;
}

.check-label {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  font-size: .80rem;
  /* line-height: 1.5; */
  border-radius: 10px;
  white-space: normal;
  word-break: break-word;
  position: relative;
  color: #6e7288;
}

.check-label::before {
  content: "";
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #ccc;
  border-radius: 7px;
  margin-right: 0.6rem;
  background-color: #fff;
  flex-shrink: 0;
}

/* State checked (sama untuk checkbox & radio) */
.check-card input[type="checkbox"]:checked + .check-label,
.check-card input[type="radio"]:checked + .check-label {
  background-color: #409955;
  color: #fff;
}

.check-card input[type="checkbox"]:checked + .check-label::before,
.check-card input[type="radio"]:checked + .check-label::before {
  content: "✓";
  background-color: #fff;
  color: #28a745;
  font-weight: bolder;
  font-size: 20px;
  text-align: center;
  line-height: 1.6rem;
  border: none;
}

/* Fokus keyboard */
.check-card input[type="checkbox"]:focus-visible + .check-label,
.check-card input[type="radio"]:focus-visible + .check-label {
  outline: 2px solid rgba(40, 167, 69, 0.5);
  outline-offset: 2px;
}

/* Disabled */
.check-card input[type="checkbox"][disabled] + .check-label,
.check-card input[type="radio"][disabled] + .check-label {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Input other di dalam check-card */
.check-card.other-input-wrapper textarea {
  border: none;
  outline: none;
  background: transparent;
  font-size: .88rem;
  margin-bottom: -9px !important;
  padding: 0.75rem;
  margin: 0;
  width: 100%;
  height: auto;
  min-height: 1rem;
  color: #7b809a;
  overflow: hidden;
  resize: none;
}

.check-card.other-input-wrapper.filled {
  background-color: #28a745;
  color: #fff;
}

.check-card.other-input-wrapper.filled textarea {
  color: #fff;
}

/* Tombol + Other... (tidak ada checkbox) */
.check-card.other-trigger .check-label::before {
  display: none;
}

.check-card.other-trigger {
  background-color: #f8f9fa;
  border-style: dotted;
  border-color: #ced4da;
}

.check-card.other-trigger .check-label {
  color: #6c757d;
  font-style: italic;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ===== Priority Choice ===== */
.priority-option .check-label::before {
  /* sama seperti checkbox/radio */
  content: attr(data-rank);                /* akan kosong jika belum dipilih */
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid #ccc;
  border-radius: 7px;
  margin-right: 0.6rem;
  background-color: #fff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  justify-content: center;
  font-weight: 700;
  color: #28a745;                          /* warna angka saat terpilih */
}

/* ketika sudah diberi prioritas (angka ada) → hijau seperti checked */
.priority-option.is-ranked .check-label {
  background-color: #409955;
  color: #fff;
}
.priority-option.is-ranked .check-label::before {
  border: none;
  background-color: #fff;
  color: #28a745;
}

/* Picker angka (popover sederhana) */
.priority-picker {
  position: absolute;
  z-index: 1050;
}
.priority-picker .priority-picker-inner {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: .5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,.12);
  min-width: 180px;
}
.priority-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .35rem;
}
.priority-picker-grid button {
  border: 1px solid #ced4da;
  background: #f8f9fa;
  border-radius: .5rem;
  padding: .35rem 1rem;
  font-size: .9rem;
  cursor: pointer;
}
.priority-picker-grid button.used {
  opacity: .4;
  cursor: not-allowed;
}
