/* Custom styling for Hobby & Materials Tracker */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #1a2234;
  --border-color: #2e3a52;
}

html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: #f3f4f6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow-x: hidden;
  touch-action: manipulation;
}

body.modal-open {
  overflow: hidden !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Glassmorphism & Card Effects */
.glass-panel {
  background: rgba(26, 34, 52, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-hover {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  border-color: rgba(99, 102, 241, 0.4);
}

/* Kanban column styling */
.kanban-col {
  min-height: calc(100vh - 220px);
}

/* Drag over highlights */
.drag-over {
  border-color: #6366f1 !important;
  background-color: rgba(99, 102, 241, 0.05) !important;
}

/* Badge colors */
.badge-grade {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Custom Checkbox */
.custom-checkbox {
  appearance: none;
  background-color: #1e293b;
  border: 2px solid #475569;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.375rem;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.custom-checkbox:checked {
  background-color: #6366f1;
  border-color: #6366f1;
}
.custom-checkbox:checked::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  transform: scale(1);
  background-color: white;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

/* Modal animation */
.modal-enter {
  animation: modalFadeIn 0.2s ease-out forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 639px) {
  .modal-enter {
    animation: modalFadeInMobile 0.15s ease-out forwards;
  }
  @keyframes modalFadeInMobile {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* WIP Timeline Styles */
.wip-timeline-line {
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 1.25rem;
  width: 2px;
  background: linear-gradient(to bottom, #6366f1, #8b5cf6, #3b82f6);
}

.wip-timeline-node {
  position: relative;
  z-index: 10;
}

/* Lightbox Modal */
.lightbox-backdrop {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Touch & Mobile Scrolling */
.overscroll-contain {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Touch & Mobile Tap Optimizations */
button,
input,
select,
textarea,
a,
.kit-card,
.custom-checkbox,
.modal-close,
.lightbox-close,
#btn-close-camera {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}


