/* Custom Styles & Overrides for Poly Bus Terminal */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  --bg-main: #080d1a;
  --bg-header: #0c1322;
  --bg-card: #0f172a;
  --bg-input: #090e1a;
  --border-color: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --brand-emerald: #10b981;
  --brand-cyan: #38bdf8;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace, monospace;
}

/* Hide Spin Buttons on Number Inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  height: 5px;
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #090e1a;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Pulse animation for live sync dot */
@keyframes livePulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  animation: livePulse 2s infinite ease-in-out;
}

.syncing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #38bdf8;
  animation: livePulse 0.8s infinite ease-in-out;
}

/* Mobile Touch Optimization */
button, input, select {
  touch-action: manipulation;
}

/* Smooth Transitions */
.card-transition {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================================================= */
/* LIGHT THEME OVERRIDES (when html does not have .dark) */
/* ========================================================================= */
html:not(.dark) {
  --bg-main: #f8fafc;
  --bg-header: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
}

html:not(.dark) body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html:not(.dark) header {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: #e2e8f0 !important;
}

html:not(.dark) .bg-\[\#0f172a\] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
}

html:not(.dark) .bg-\[\#090e1a\] {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

html:not(.dark) .bg-\[\#080d1a\] {
  background-color: #f8fafc !important;
}

html:not(.dark) .text-white {
  color: #0f172a !important;
}

html:not(.dark) .text-slate-100 {
  color: #0f172a !important;
}

html:not(.dark) .text-slate-200 {
  color: #1e293b !important;
}

html:not(.dark) .text-slate-300 {
  color: #334155 !important;
}

html:not(.dark) .text-slate-400 {
  color: #64748b !important;
}

html:not(.dark) .text-slate-500 {
  color: #94a3b8 !important;
}

html:not(.dark) .border-slate-800,
html:not(.dark) .border-slate-800\/80,
html:not(.dark) .border-slate-800\/90 {
  border-color: #e2e8f0 !important;
}

html:not(.dark) .border-slate-700,
html:not(.dark) .border-slate-700\/80 {
  border-color: #cbd5e1 !important;
}

html:not(.dark) input {
  color: #0f172a !important;
}

html:not(.dark) input::placeholder {
  color: #94a3b8 !important;
}

html:not(.dark) .custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
}
html:not(.dark) .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

/* Light Theme Badges & Highlights */
html:not(.dark) .bg-rose-950\/40,
html:not(.dark) .bg-rose-950\/60 {
  background-color: #ffe4e6 !important;
  border-color: #fecdd3 !important;
}

html:not(.dark) .bg-emerald-950\/40,
html:not(.dark) .bg-emerald-950\/60 {
  background-color: #d1fae5 !important;
  border-color: #a7f3d0 !important;
}

html:not(.dark) .bg-brand-950\/40 {
  background-color: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

html:not(.dark) .text-rose-300 {
  color: #be123c !important;
}
html:not(.dark) .text-rose-400 {
  color: #e11d48 !important;
}

html:not(.dark) .text-emerald-300 {
  color: #047857 !important;
}
html:not(.dark) .text-emerald-400 {
  color: #059669 !important;
}

html:not(.dark) .text-brand-300 {
  color: #047857 !important;
}
html:not(.dark) .text-brand-400 {
  color: #059669 !important;
}

html:not(.dark) .bg-blue-500\/15,
html:not(.dark) .bg-blue-500\/10,
html:not(.dark) .bg-blue-500\/20 {
  background-color: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

html:not(.dark) .text-blue-300 {
  color: #2563eb !important;
}

html:not(.dark) .bg-slate-800 {
  background-color: #e2e8f0 !important;
  color: #334155 !important;
}
html:not(.dark) .bg-slate-800:hover {
  background-color: #cbd5e1 !important;
}
