/* ============================================
   Swiss Habits — 习惯打卡模块 + 运动滚轮选择器
   依赖：variables.css, layout.css
   ============================================ */

/* ============================================
   Habits Module
   ============================================ */
.habit-target-row {
  display: flex;
  gap: var(--sp-md);
  align-items: center;
  margin-bottom: var(--sp-lg);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
  font-size: 12px;
  color: var(--text-secondary);
}

.habit-target-row .ht-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.habit-target-row select {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12px;
  background: var(--card);
  color: var(--text);
}

.habit-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
}

.habit-row + .habit-row { border-top: 1px solid var(--border-light); }

.habit-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-warm);
  cursor: pointer;
  transition: all .15s;
}

.habit-icon-btn:hover { background: var(--accent-light); }

.habit-info { flex: 1; min-width: 0; }

.habit-label {
  font-size: 13px;
  font-weight: 600;
}

.habit-detail {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.habit-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 var(--sp-xs);
  flex-shrink: 0;
}

.habit-check-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  min-width: 60px;
  transition: all .15s;
}

.habit-check-btn.done {
  background: var(--bg-warm);
  color: var(--text-secondary);
}

.habit-check-btn.confirming {
  animation: habitPulse .6s ease;
}

@keyframes habitPulse {
  0% { transform: scale(1); }
  50% { transform: scale(.94); }
  100% { transform: scale(1); }
}

.habit-note-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  flex-shrink: 0;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all .15s;
}

.habit-note-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.ex-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--sp-sm);
}

.ex-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
}

.ex-tag .del {
  cursor: pointer;
  opacity: .4;
  font-size: 14px;
}

.ex-tag .del:hover { opacity: 1; }

/* 7-Day Overview Strip (inline, desktop default visible) */
.habit-overview-strip {
  display: flex;
  gap: 3px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.habit-overview-strip .day-dot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.habit-overview-strip .day-dot .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.habit-overview-strip .day-dot .dot.on { background: var(--accent); }
.habit-overview-strip .day-dot .dot.off { background: var(--border); }

.habit-overview-strip .day-dot .day-label {
  font-size: 8px;
  color: var(--text-faint);
}

/* ============================================
   Wheel Picker Overlay
   ============================================ */
.wheel-cols {
  display: flex;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.wheel-col {
  flex: 1;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.wheel-col::-webkit-scrollbar { display: none; }

.wheel-col .wheel-inner {
  padding: 88px 0;
}

.wheel-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
  white-space: nowrap;
  color: var(--text-faint);
}

.wheel-item.center {
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}
