/* basecamp.css — Custom styles that Tailwind utilities cannot express */

/* Freshness pill pulse animation */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.freshness-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}
[data-tier="recent"] .freshness-dot { background-color: #f59e0b; }
[data-tier="stale"] .freshness-dot { background-color: #dc2626; }
[data-tier="recent"] { color: #f59e0b; border-color: #fde68a; background-color: #fffbeb; }
[data-tier="stale"] { color: #dc2626; border-color: #fecaca; background-color: #fef2f2; }

/* Sync button spinner */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spinning svg {
  animation: spin 1s linear infinite;
}

/* SortableJS ghost */
.sortable-ghost {
  opacity: 0.35;
  background: #dbeafe !important;
}

/* Sync toast slide-in/out */
.sync-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  border: 1px solid #e7e5e4;
  padding: 16px;
  z-index: 1000;
  transform: translateX(calc(100% + 48px));
  transition: transform 280ms ease-out;
}
.sync-toast.visible {
  transform: translateX(0);
}
.sync-toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.sync-toast-title {
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
}
.sync-toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.sync-toast-bar-track {
  height: 4px;
  background: #f1f5f9;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.sync-toast-bar-fill {
  height: 100%;
  background: #16a34a;
  border-radius: 2px;
  transition: width 300ms ease;
}
.sync-toast-bar-fill.error {
  background: #dc2626;
}
.sync-toast-bar-fill.partial {
  background: #d97706;
}
.sync-toast-step {
  font-size: 12px;
  color: #94a3b8;
}

/* Sync step list animations */
.sync-step-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e2e8f0;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Chart.js container constraint */
#netWorthChart {
  max-height: 220px;
}

/* Dialog backdrop for Tailwind (Pico normally handles this) */
dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

/* Editable contenteditable highlight */
.editable:hover {
  background: rgba(0,0,0,0.04);
  border-radius: 4px;
}
.editable[contenteditable="true"] {
  background: #fef9c3;
  outline: 2px solid #facc15;
  border-radius: 4px;
}
