/* Custom Styles for Collection Manager Pro */

@keyframes scan-laser {
  0% {
    top: 0%;
    opacity: 0.8;
  }
  50% {
    top: 96%;
    opacity: 1;
  }
  100% {
    top: 0%;
    opacity: 0.8;
  }
}

.scanning-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0) 0%, rgba(59, 130, 246, 1) 50%, rgba(59, 130, 246, 0) 100%);
  box-shadow: 0 0 15px 3px rgba(59, 130, 246, 0.8);
  animation: scan-laser 2s infinite ease-in-out;
  pointer-events: none;
  z-index: 20;
}

.card-reflection {
  position: relative;
  overflow: hidden;
}

.card-reflection::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  transition: transform 0.6s ease;
}

.card-reflection:hover::after {
  transform: translate(25%, 25%);
}

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

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

/* Tag pill badge animations */
.badge-pulse {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Kronocard Card Centering Inspection Guide */
.centering-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-size: 20px 20px;
  background-image: 
    linear-gradient(to right, rgba(59, 130, 246, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(59, 130, 246, 0.15) 1px, transparent 1px);
  border: 1px dashed rgba(59, 130, 246, 0.4);
}

.centering-grid-overlay::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(239, 68, 68, 0.5);
}

.centering-grid-overlay::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(239, 68, 68, 0.5);
}

/* Kronocard Filmstrip Thumbnail active glow */
.filmstrip-card-active {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 12px 2px rgba(59, 130, 246, 0.5) !important;
  transform: translateY(-2px);
}

/* Kronocard Tree Node hover & selected states */
.tree-node-active {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  color: #93c5fd !important;
  font-weight: 700 !important;
}

/* ========================================================================= */
/* Collection Manager Pro & Storefront - Light Theme Engine                  */
/* Refined Canadian Collector Color Scheme                                   */
/* ========================================================================= */

:root {
  --cmp-accent-blue: #2563eb;
  --cmp-accent-emerald: #059669;
  --cmp-accent-purple: #7c3aed;
  --cmp-accent-amber: #d97706;
  --cmp-accent-red: #dc2626;
  --cmp-accent-cyan: #0891b2;
}

/* Full Dark Mode Engine (Default) */
html,
html.dark {
  color-scheme: dark;
}

html body,
html.dark body {
  background-color: #090d16 !important;
  color: #f8fafc !important;
}

/* Light Theme Root Activation */
html.light {
  color-scheme: light;
}

/* Canvas & Global Typography */
html.light body {
  background-color: #f8fafc !important;
  color: #1e293b !important;
}

/* Headers & Sticky Navigations */
html.light header {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05) !important;
}

/* Containers, Panels & Cards */
html.light .bg-surface-950,
html.light .bg-slate-950 {
  background-color: #f8fafc !important;
}

html.light .bg-surface-900,
html.light .bg-slate-900,
html.light .bg-surface-900\/95,
html.light .bg-slate-900\/95,
html.light .bg-slate-900\/90,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/85 {
  background-color: #ffffff !important;
}

html.light .bg-surface-800,
html.light .bg-slate-800,
html.light .bg-slate-800\/60,
html.light .bg-slate-800\/50,
html.light .bg-slate-800\/40,
html.light .bg-slate-800\/80 {
  background-color: #f1f5f9 !important;
}

/* Borders */
html.light .border-slate-800,
html.light .border-slate-800\/60,
html.light .border-slate-800\/80,
html.light .border-slate-700,
html.light .border-slate-700\/80,
html.light .border-slate-700\/60,
html.light .border-slate-600 {
  border-color: #e2e8f0 !important;
}

/* Typography Overrides */
html.light h1,
html.light h2,
html.light h3,
html.light h4,
html.light h5,
html.light h6 {
  color: #0f172a !important;
}

html.light .text-slate-100,
html.light .text-slate-200,
html.light .text-slate-300 {
  color: #1e293b !important;
}

html.light .text-slate-400 {
  color: #475569 !important;
}

html.light .text-slate-500 {
  color: #64748b !important;
}

/* Preserve White text inside solid colored buttons & badges */
html.light .text-white:not(button):not(.btn):not([class*="bg-blue-"]):not([class*="bg-emerald-"]):not([class*="bg-red-"]):not([class*="bg-purple-"]):not([class*="bg-amber-"]):not([class*="bg-cyan-"]):not([class*="bg-indigo-"]):not([class*="from-"]):not([class*="badge"]):not(span.font-black):not(span.font-bold):not(.badge-solid) {
  color: #0f172a !important;
}

html.light button.bg-blue-600,
html.light button.bg-blue-500,
html.light button.bg-emerald-600,
html.light button.bg-emerald-500,
html.light button.bg-cyan-600,
html.light button.bg-purple-600,
html.light button.bg-red-600,
html.light button.bg-amber-600,
html.light a.bg-blue-600,
html.light a.bg-cyan-600,
html.light [class*="bg-gradient-to-"] button,
html.light .text-white-forced {
  color: #ffffff !important;
}

html.light button.bg-blue-600 *,
html.light button.bg-blue-500 *,
html.light button.bg-emerald-600 *,
html.light button.bg-cyan-600 *,
html.light button.bg-purple-600 *,
html.light button.bg-red-600 *,
html.light button.bg-amber-600 * {
  color: #ffffff !important;
}

/* Form Controls */
html.light input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.light select,
html.light textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04) !important;
}

html.light input:focus,
html.light select:focus,
html.light textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

html.light input[type="checkbox"] {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

/* Secondary & Utility Buttons */
html.light button.bg-slate-800,
html.light button.bg-slate-900,
html.light a.bg-slate-800 {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

html.light button.bg-slate-800:hover,
html.light button.bg-slate-900:hover,
html.light a.bg-slate-800:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Navigation Tabs */
html.light #main-nav-tabs button.bg-slate-800,
html.light [id^="tab-btn-"].bg-slate-800 {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 1px 2px 0 rgba(37, 99, 235, 0.08) !important;
}

html.light #main-nav-tabs button.text-slate-300,
html.light [id^="tab-btn-"].text-slate-300 {
  color: #475569 !important;
  background-color: transparent !important;
  border-color: transparent !important;
}

html.light #main-nav-tabs button.text-slate-300:hover,
html.light [id^="tab-btn-"].text-slate-300:hover {
  color: #0f172a !important;
  background-color: #f1f5f9 !important;
}

/* Canadian Collector Accents & Badges */
html.light .text-emerald-400 { color: #047857 !important; }
html.light .bg-emerald-500\/10,
html.light .bg-emerald-500\/20 {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

html.light .text-blue-400,
html.light .text-blue-300 { color: #1d4ed8 !important; }
html.light .bg-blue-500\/10,
html.light .bg-blue-500\/20 {
  background-color: #eff6ff !important;
  border-color: #bfdbfe !important;
}

html.light .text-purple-400,
html.light .text-purple-300 { color: #6d28d9 !important; }
html.light .bg-purple-500\/10,
html.light .bg-purple-500\/20 {
  background-color: #f5f3ff !important;
  border-color: #ddd6fe !important;
}

html.light .text-amber-400,
html.light .text-amber-300 { color: #b45309 !important; }
html.light .bg-amber-500\/10,
html.light .bg-amber-500\/20 {
  background-color: #fffbeb !important;
  border-color: #fde68a !important;
}

html.light .text-red-400,
html.light .text-red-300 { color: #b91c1c !important; }
html.light .bg-red-500\/10,
html.light .bg-red-500\/20 {
  background-color: #fef2f2 !important;
  border-color: #fecaca !important;
}

html.light .text-cyan-400,
html.light .text-cyan-300 { color: #0e7490 !important; }
html.light .bg-cyan-500\/10,
html.light .bg-cyan-500\/20 {
  background-color: #ecfeff !important;
  border-color: #a5f3fc !important;
}

/* Data Tables */
html.light table th {
  background-color: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

html.light table td {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #1e293b !important;
}

html.light table tbody tr:hover {
  background-color: #f8fafc !important;
}

html.light table tbody tr.bg-purple-950\/25 {
  background-color: #f5f3ff !important;
}

/* Modals & Dialogs */
html.light [id^="modal-"]:not(.hidden) {
  background-color: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(4px);
}

html.light [id^="modal-"] > div:not([class*="fixed"]) {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
}

/* Kronocard Tree & Physical Storage */
html.light #kronocard-location-tree {
  border-color: #e2e8f0 !important;
}

html.light #kronocard-location-tree .tree-node-active {
  background-color: #f3e8ff !important;
  border-color: #c084fc !important;
  color: #6b21a8 !important;
}

/* Storefront Cards & Filters */
html.light [id^="chip-sport-"].bg-slate-900 {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

html.light [id^="chip-sport-"].bg-slate-900:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html.light .card-flip-container {
  background-color: #ffffff !important;
}

html.light .card-flip-back {
  background-color: #f8fafc !important;
}

/* Banners */
html.light #first-time-ebay-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 50%, #f3e8ff 100%) !important;
  border-color: #93c5fd !important;
}

html.light #ctc-taxonomy-container {
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 50%, #ffffff 100%) !important;
  border-color: #fca5a5 !important;
}

/* Custom Scrollbars */
html.light ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

html.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

html.light ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Toast notifications */
html.light .toast {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.1) !important;
}

/* Image Dropzones */
html.light #front-drop-zone,
html.light #back-drop-zone,
html.light #kronozio-csv-dropzone {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

html.light #front-drop-zone:hover,
html.light #back-drop-zone:hover,
html.light #kronozio-csv-dropzone:hover {
  background-color: #eff6ff !important;
  border-color: #3b82f6 !important;
}
