/* halo-checklist 前台樣式 */
.halo-checklist {
  --hc-accent: #2563eb;
  --hc-done: #16a34a;
  --hc-border: rgba(127, 127, 127, 0.28);
  --hc-muted: rgba(127, 127, 127, 0.95);
  --hc-bg: rgba(127, 127, 127, 0.06);
  margin: 1.5em 0;
  padding: 1em 1.25em;
  border: 1px solid var(--hc-border);
  border-left: 4px solid var(--hc-accent);
  border-radius: 8px;
  background: var(--hc-bg);
}
.halo-checklist.is-complete {
  border-left-color: var(--hc-done);
}
.halo-checklist .halo-checklist__title {
  margin: 0 0 0.5em;
  font-weight: 700;
  font-size: 1.1em;
}
.halo-checklist .halo-checklist__title:empty {
  display: none;
}
.halo-checklist .halo-checklist__list {
  margin: 0;
}
.halo-checklist .halo-checklist__note {
  display: block;
  font-size: 0.85em;
  color: var(--hc-muted);
}

/* 啟用腳本後的互動樣式 */
.halo-checklist.hc-enhanced .halo-checklist__list {
  list-style: none;
  padding: 0;
}
.halo-checklist.hc-enhanced .halo-checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  margin: 0;
  padding: 0.45em 0;
  border-bottom: 1px dashed var(--hc-border);
}
.halo-checklist.hc-enhanced .halo-checklist__item:last-child {
  border-bottom: none;
}
.halo-checklist.hc-enhanced .halo-checklist__item::before,
.halo-checklist.hc-enhanced .halo-checklist__item::marker {
  content: none;
}
.halo-checklist .hc-checkbox {
  flex: none;
  width: 1.1em;
  height: 1.1em;
  margin: 0.2em 0 0;
  accent-color: var(--hc-done);
  cursor: pointer;
}
.halo-checklist .hc-label {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.halo-checklist .is-checked .halo-checklist__text {
  text-decoration: line-through;
  opacity: 0.6;
}
.halo-checklist .hc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  margin-top: 0.8em;
  padding-top: 0.8em;
  border-top: 1px solid var(--hc-border);
  font-size: 0.9em;
}
.halo-checklist .hc-progress {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex: 1 1 200px;
}
.halo-checklist .hc-progress__text {
  white-space: nowrap;
}
.halo-checklist .hc-progress__track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--hc-border);
  overflow: hidden;
}
.halo-checklist .hc-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--hc-accent);
  transition: width 0.25s ease;
}
.halo-checklist.is-complete .hc-progress__bar {
  background: var(--hc-done);
}
.halo-checklist .hc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}
.halo-checklist .hc-btn {
  appearance: none;
  border: 1px solid var(--hc-border);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.95em;
  line-height: 1.4;
  padding: 0.25em 0.75em;
  cursor: pointer;
}
.halo-checklist .hc-btn:hover {
  border-color: var(--hc-accent);
  color: var(--hc-accent);
}

@media print {
  .halo-checklist .hc-toolbar {
    display: none;
  }
}
