/* CSS variables for Theme System */
:root {
  --background: #f8fafc;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --radius: 0.75rem;
}

.dark {
  --background: #0b0f19;
  --foreground: #f9fafb;
  --card: #111827;
  --card-foreground: #f9fafb;
  --muted: #1e293b;
  --muted-foreground: #94a3b8;
  --border: #334155;
}

/* Base Body Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
}

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 9999px;
  border: 1px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

/* Drag and Drop visual feedback */
.dashboard-card {
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  border-style: dashed;
  border-color: #3b82f6;
}

/* Shimmer Loading Skeletons */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-shimmer {
  background: linear-gradient(90deg, var(--muted) 25%, var(--border) 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

/* Price Flash Animations */
@keyframes flash-up {
  0% {
    background-color: rgba(239, 68, 68, 0.3);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes flash-down {
  0% {
    background-color: rgba(16, 185, 129, 0.3);
  }
  100% {
    background-color: transparent;
  }
}

.flash-up {
  animation: flash-up 1s ease-out;
}

.flash-down {
  animation: flash-down 1s ease-out;
}

/* Collapse Animation */
.card-body {
  max-height: 1200px;
  opacity: 1;
  overflow: visible;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease, padding 0.3s ease;
}

.collapsed .card-body {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

/* Vane status dot - static color only, no animation */
.vane-status-dot {
  display: inline-block;
}

/* Slow spin for settings gear */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow:hover {
  animation: spin-slow 8s linear infinite;
}

/* Panel collapse arrow rotation */
.btn-toggle-collapse i, .btn-toggle-collapse svg {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(0deg);
}
.collapsed .btn-toggle-collapse i, .collapsed .btn-toggle-collapse svg {
  transform: rotate(90deg);
}

/* Mobile specific settings for watchlist sidebar */
@media (max-width: 640px) {
  #watchlist-panel {
    position: fixed !important;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 50;
    height: 100dvh;
    height: 100%;
  }
  
  /* When watchlist panel is open, set width to 100% to fill the screen */
  #watchlist-panel.w-80 {
    width: 100% !important;
  }
}
