/* ==========================================================================
   Ajudo — Checklist interativo (estilos compartilhados)
   Usado por page-templates/template-checklist.php via assets/js/ajudo-checklist.js.
   Barra de progresso (sticky), seções e itens marcáveis grandes (touch).
   ========================================================================== */

.checklist-tool {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop), var(--shadow-md);
  padding: clamp(18px, 3vw, 28px);
}

/* Barra de progresso */
.ck-progress {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 2;
  background: var(--card);
  padding-bottom: 12px;
  margin-bottom: 8px;
}
.ck-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ck-progress-text { font-weight: 700; font-size: 0.92rem; color: var(--green-deep); }
.ck-progress-track {
  height: 12px;
  border-radius: 999px;
  background: var(--paper-deep);
  border: 1.5px solid var(--ink);
  overflow: hidden;
}
.ck-progress-fill {
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width 0.35s ease;
}
.checklist-tool.is-complete .ck-progress-fill { background: var(--mustard); }

/* Seções */
.ck-section { margin-top: 22px; }
.ck-section-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.ck-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

/* Item marcável */
.ck-item { border-bottom: 1.5px dashed var(--line); }
.ck-item:last-child { border-bottom: none; }
.ck-item label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 4px;
  cursor: pointer;
  font-size: 0.98rem;
  line-height: 1.4;
}
.ck-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: var(--paper);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ck-item input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}
.ck-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid var(--paper);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.ck-item input[type="checkbox"]:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 2px; }
.ck-item.is-checked .ck-text { color: var(--ink-soft); text-decoration: line-through; }

/* Ações */
.ck-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1.5px solid var(--line);
}
.ck-hint { font-size: 0.85rem; color: var(--green-deep); font-weight: 600; }

@media (max-width: 560px) {
  .ck-progress { top: 0; }
  .ck-actions .btn { flex: 1 1 100%; }
}
