/* ============================================================
   BLUMI — action-plan.css (Sprint 3: Action Plan)
   Extends style.css — do NOT redefine existing tokens.
   ============================================================ */

/* ── Page layout ── */
.action-body {
  background-color: var(--color-warm-white);
  min-height: 100vh;
}

.action-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-3xl);
}

/* ── Progress header ── */
.progress-header {
  background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
  border-radius: var(--border-radius-xl);
  padding: var(--space-lg) var(--space-xl);
  color: white;
  margin-bottom: var(--space-lg);
  animation: fadeUp 0.35s ease-out;
}
.progress-header * { color: white !important; }

.progress-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.progress-day-badge {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
  background: rgba(255,255,255,0.25);
  border-radius: var(--border-radius-pill);
  padding: 4px 14px;
}

.progress-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-xs);
}

.progress-subtitle {
  font-size: var(--font-size-small);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-md);
}

/* ── Progress bar ── */
.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.25);
  border-radius: var(--border-radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.progress-fill {
  height: 100%;
  background: white;
  border-radius: var(--border-radius-pill);
  transition: width 0.5s ease-out;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-caption);
  color: rgba(255,255,255,0.8);
}

/* ── Streak counter ── */
.streak-card {
  background: var(--color-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  text-align: center;
  margin-bottom: var(--space-lg);
  animation: fadeUp 0.35s ease-out 0.08s both;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Day slide transition ── */
.activities-container {
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}
.activities-container.slide-left {
  opacity: 0; transform: translateX(-20px);
}
.activities-container.slide-right {
  opacity: 0; transform: translateX(20px);
}

.streak-flame {
  font-size: 40px;
  display: block;
  margin-bottom: var(--space-xs);
  transition: transform 0.3s ease;
}

.streak-flame.active {
  animation: flamePulse 1s ease-in-out infinite;
}

@keyframes flamePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.streak-count {
  font-size: 32px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: 1.2;
}

.streak-label {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

.streak-broken {
  font-size: var(--font-size-small);
  color: var(--color-text-tertiary);
  font-style: italic;
}

/* ── Activity card ── */
.activity-card {
  background: var(--color-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  border-left: 4px solid var(--color-border);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fadeUp 0.35s ease-out both;
  cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.activity-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-elevated); }
.activity-card:active { transform: scale(0.99); }
.activity-card.completed {
  border-left-color: var(--color-sage);
  background: var(--color-sage-light);
  opacity: 0.92;
}

.activity-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.activity-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 32px; height: 32px; min-width: 32px;
  border: 2.5px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 0;
  display: flex; align-items: center; justify-content: center;
}
.activity-checkbox:hover { border-color: var(--color-sage); transform: scale(1.1); }
.activity-checkbox:checked {
  background: var(--color-sage); border-color: var(--color-sage);
  animation: checkPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5.5L5 9.5L13 1.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 13px;
}
@keyframes checkPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.activity-checkbox:checked {
  background: var(--color-sage);
  border-color: var(--color-sage);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5.5L5 9.5L13 1.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
}

.activity-card-body {
  flex: 1;
}

.activity-title {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-xs);
}

.activity-desc {
  font-size: var(--font-size-caption);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.activity-duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--color-text-tertiary);
}

.completed .activity-title {
  text-decoration: line-through;
  color: var(--color-text-tertiary);
}

/* ── Navigation ── */
.action-nav {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  animation: fadeUp 0.35s ease-out both;
}

.action-nav .btn {
  flex: 1;
}

/* ── Completion celebration ── */
.completion-card {
  background: linear-gradient(135deg, var(--color-sage-light) 0%, #FFE8E8 100%);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  margin-bottom: var(--space-lg);
  animation: celebrateIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes celebrateIn {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.completion-emoji {
  font-size: 72px; display: block; margin-bottom: var(--space-md);
  animation: celebrateBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
@keyframes celebrateBounce {
  0% { opacity: 0; transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

.completion-title {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
  animation: fadeUp 0.4s ease-out 0.2s both;
}

.completion-sub {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto var(--space-xl);
  animation: fadeUp 0.4s ease-out 0.3s both;
}

/* ── Empty / no activities ── */
.action-empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--color-text-secondary);
  animation: fadeUp 0.35s ease-out;
}

.action-empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: var(--space-md);
}

/* ── Responsive ── */
@media (min-width: 480px) {
  .action-page {
    padding: 0 var(--space-md) var(--space-3xl);
  }
}
