@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #f3f4f6;
  --text-color: #1f2937;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
}

html.dark {
  --bg-color: #111827;
  --text-color: #f9fafb;
  --card-bg: #1f2937;
  --border-color: #374151;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-bottom: 70px;
  /* space for bottom nav on mobile */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

.card {
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Toast animations */
@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast {
  animation: slideIn 0.3s ease forwards;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* Swipe to Delete Styles */
.swipe-container {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  touch-action: pan-y;
}

.swipe-action {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ef4444;
  /* red-500 */
  color: white;
  border-radius: 0 0.5rem 0.5rem 0;
}

.swipe-content {
  position: relative;
  z-index: 2;
  background-color: var(--card-bg);
  transition: transform 0.2s ease-out;
  width: 100%;
}

.swiped-left .swipe-content {
  transform: translateX(-60px);
}