/* ==========================================================================
   Life HQ — Shared Components
   ========================================================================== */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform var(--dur-normal) var(--ease-out), box-shadow var(--dur-normal) var(--ease-out);
}
.card.is-hoverable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 22px;
  font-weight: 600;
  font-size: var(--fs-small);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), filter var(--dur-fast);
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--periwinkle-500), var(--periwinkle-600));
  color: var(--white);
  box-shadow: var(--shadow-glow-periwinkle);
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-accent {
  background: linear-gradient(135deg, var(--yellow-400), var(--yellow-500));
  color: var(--ink-strong);
  box-shadow: var(--shadow-glow-yellow);
}

.btn-ghost {
  background: var(--white);
  color: var(--ink-light);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { color: var(--periwinkle-600); }

.btn-sm { padding: 7px 14px; font-size: var(--fs-tiny); }

/* ---- Inputs ---- */
.field {
  border: 1.5px solid var(--cream-edge);
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: var(--ink);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  width: 100%;
}
.field::placeholder { color: var(--ink-faint); }
.field:focus {
  outline: none;
  border-color: var(--periwinkle-400);
  box-shadow: 0 0 0 4px var(--periwinkle-100);
}

.quick-add {
  display: flex;
  gap: var(--space-2xs);
}
.quick-add .field { flex: 1; }

/* ---- Checklist ---- */
.checklist { display: flex; flex-direction: column; gap: 4px; }

.check-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  transition: background var(--dur-fast);
}
.check-item:hover { background: var(--periwinkle-50); }

.check-box {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--periwinkle-300);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.check-box svg {
  width: 14px; height: 14px;
  color: var(--white);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.check-item.is-done .check-box {
  background: var(--sage-500);
  border-color: var(--sage-500);
  transform: scale(1.05);
}
.check-item.is-done .check-box svg { opacity: 1; transform: scale(1); }
.check-item.is-done .check-label { color: var(--ink-faint); text-decoration: line-through; }

.check-label {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.97rem;
  padding: 4px 2px;
}
.check-label:focus { outline: none; }

.check-remove {
  flex: none;
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--dur-fast), background var(--dur-fast), color var(--dur-fast);
}
.check-remove svg { width: 14px; height: 14px; }
.check-item:hover .check-remove { opacity: 1; }
.check-remove:hover { background: var(--yellow-100); color: var(--color-danger); }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: var(--space-lg) var(--space-sm);
  color: var(--ink-faint);
  font-size: var(--fs-small);
}

/* ---- Chip / badge ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-tiny);
  font-weight: 600;
}
.chip-periwinkle { background: var(--periwinkle-100); color: var(--periwinkle-700); }
.chip-yellow { background: var(--yellow-100); color: #8A6A12; }
.chip-sage { background: var(--sage-100); color: var(--sage-600); }
.chip-danger { background: #FBE9E4; color: #B5583F; }

/* ---- Tabs ---- */
.tabs {
  display: inline-flex;
  gap: 3px;
  background: var(--periwinkle-50);
  padding: 4px;
  border-radius: var(--radius-pill);
}
.tab-btn {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-light);
  transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}
.tab-btn.is-active {
  background: var(--white);
  color: var(--periwinkle-700);
  box-shadow: var(--shadow-sm);
}
.tab-count {
  display: inline-flex;
  margin-left: 4px;
  font-size: 0.7rem;
  opacity: 0.7;
}

/* ---- Skeleton shimmer (loading placeholders, weather etc.) ---- */
.skeleton {
  background: linear-gradient(90deg, var(--cream-edge) 25%, var(--white) 50%, var(--cream-edge) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
