/* ══════════════════════════════════════════════════
   SHOPPING LIST CARD — Warm parchment theme
   ══════════════════════════════════════════════════ */

/* ── Card shell ──────────────────────────────────── */
.shopping-card {
  align-self: flex-start;
  flex-shrink: 0;
  width: 400px;
  max-width: calc(100vw - 48px);
  border-radius: 18px;
  background: #fdf8ef;
  border: 1px solid #d9be9a;
  box-shadow:
    0 2px 12px rgba(100, 60, 10, 0.08),
    0 8px 32px rgba(100, 60, 10, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
  font-family: var(--font);
}

/* ── Teal accent band — turns green when done ────── */
.sc-band {
  height: 5px;
  background: linear-gradient(90deg, #0d9488, #14b8a6 50%, #0d9488);
  transition: background 0.5s ease;
}

.shopping-card.sc--complete .sc-band {
  background: linear-gradient(90deg, #059669, #10b981 50%, #059669);
}

/* ── Header ──────────────────────────────────────── */
.sc-header {
  padding: 18px 20px 15px;
  border-bottom: 1px dashed #d9be9a;
}

.sc-header-top {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 13px;
}

.sc-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.25);
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sc-title {
  font-size: 0.91rem;
  font-weight: 700;
  color: #2b1a0f;
  line-height: 1.35;
  padding-top: 5px;
  flex: 1;
}

.sc-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 700;
  color: #c4a07a;
  padding: 4px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  transition: color 0.15s;
  flex-shrink: 0;
  font-family: var(--font);
}

.sc-clear-btn:hover {
  color: #8b6040;
}

/* Save button sits alongside Reset in sc-header-top flex row */
.sc-header-top .card-save-btn {
  margin-top: 2px;
}

/* ── Progress row ────────────────────────────────── */
.sc-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-progress-label {
  font-size: 0.68rem;
  font-weight: 500;
  color: #a07850;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 58px;
}

.sc-progress-track {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: rgba(212, 169, 106, 0.25);
  overflow: hidden;
}

.sc-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #0d9488, #14b8a6);
  width: 0%;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.5s ease;
}

.shopping-card.sc--complete .sc-progress-fill {
  background: linear-gradient(90deg, #059669, #10b981);
}

/* ── Items list ──────────────────────────────────── */
.sc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 169, 106, 0.45) transparent;
}

.sc-list::-webkit-scrollbar       { width: 3px; }
.sc-list::-webkit-scrollbar-track { background: transparent; }
.sc-list::-webkit-scrollbar-thumb { background: rgba(212, 169, 106, 0.55); border-radius: 2px; }

.sc-item {
  border-bottom: 1px dotted rgba(212, 169, 106, 0.5);
}

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

/* ── Label (clickable row) ───────────────────────── */
.sc-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}

.sc-label:hover {
  background: rgba(212, 169, 106, 0.08);
}

/* ── Hidden native checkbox ──────────────────────── */
.sc-cb-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ── Custom checkbox box ─────────────────────────── */
.sc-checkmark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid rgba(43, 26, 15, 0.22);
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sc-checkmark svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Checked state driven by CSS sibling selector */
.sc-cb-input:checked + .sc-checkmark {
  background: #14b8a6;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.sc-cb-input:checked + .sc-checkmark svg {
  opacity: 1;
  transform: scale(1);
}

/* ── Item text ───────────────────────────────────── */
.sc-item-name {
  flex: 1;
  font-size: 0.83rem;
  font-weight: 400;
  color: #2b1a0f;
  line-height: 1.3;
  transition: color 0.22s ease;
}

.sc-item-amount {
  font-size: 0.76rem;
  font-weight: 600;
  color: #8b6040;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  white-space: nowrap;
  transition: color 0.22s ease;
}

/* Checked item — fades and strikes through */
.sc-cb-input:checked ~ .sc-item-name {
  color: rgba(43, 26, 15, 0.3);
  text-decoration: line-through;
  text-decoration-color: rgba(43, 26, 15, 0.2);
}

.sc-cb-input:checked ~ .sc-item-amount {
  color: rgba(43, 26, 15, 0.2);
}

/* ── All-done banner ─────────────────────────────── */
.sc-done-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  font-size: 0.77rem;
  font-weight: 600;
  color: #059669;
  border-top: 1px dashed rgba(5, 150, 105, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.shopping-card.sc--complete .sc-done-banner {
  display: flex;
}
