
/* ========================================
   HISTORY DRAWER - Clean Card Stack
   ======================================== */

.history-drawer {
  /* Inherits from .drawer in components.css */
  max-height: 80dvh;
}

.history-drawer-list {
  list-style: none;
  padding: 0;
  margin: 0;

  display: flex;
  flex-direction: column;
  gap: 12px;

  flex: 1;
  overflow-y: auto;
}

/* History Item Card */
.history-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 14px 16px 14px 20px;
  border-radius: 14px;

  background: var(--surface-card);
  border: 1px solid var(--stroke-1);
  
  /* Left accent border - color set via inline style based on day */
  border-left: 3px solid var(--accent-color, var(--p-capri));
  
  transition: all 0.2s ease;
}

.history-item:hover {
  background: var(--glass-2);
  border-color: var(--stroke-2);
}

/* Top Row: Date + Delete Button */
.history-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-item__date {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  opacity: 0.9;
}

.history-item__delete {
  opacity: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: transparent;
  border: 1px solid var(--stroke-1);
  border-radius: 6px;
  color: var(--ink-mute);
  
  font-size: 14px;
  font-weight: 600;
  
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-item:hover .history-item__delete {
  opacity: 1;
}

.history-item__delete:hover {
  background: color-mix(in srgb, var(--p-paradise-pink) 15%, transparent);
  border-color: var(--p-paradise-pink);
  color: var(--p-paradise-pink);
  transform: scale(1.05);
}

.history-item__delete:active {
  transform: scale(0.95);
}

/* Routine Name */
.history-item__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin: 2px 0;
}

/* Stats Row */
.history-item__stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  
  padding: 4px 10px;
  border-radius: 8px;
  
  background: var(--surface-dark);
  border: 1px solid var(--stroke-3);
  
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.history-stat__icon {
  font-size: 13px;
  line-height: 1;
}

/* Day-specific accent colors */
.history-item[data-day="0"] { --accent-color: var(--p-iris-orchid); }
.history-item[data-day="1"] { --accent-color: var(--p-capri); }
.history-item[data-day="2"] { --accent-color: var(--p-paradise-pink); }
.history-item[data-day="3"] { --accent-color: var(--p-bright-marigold); }
.history-item[data-day="4"] { --accent-color: var(--p-kiwi-colada); }
.history-item[data-day="5"] { --accent-color: var(--p-sunny-lime); }
.history-item[data-day="6"] { --accent-color: var(--p-blazing-yellow); }

/* Empty State */
.history-drawer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 40px 20px;
  text-align: center;
}

.history-drawer-empty.hidden { 
  display: none; 
}

.history-empty-icon {
  font-size: 32px;
  opacity: 0.6;
}

.history-empty-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mute);
}

.history-intro {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mute);
  line-height: 1.45;
}

/* Legacy classes - kept for backwards compatibility */
.history-drawer-item { /* deprecated */ }
.history-item-status { /* deprecated */ }
.history-stamps { /* deprecated */ }

