/* ============================================================
   InvGen – Custom CSS
   (Tailwind CDN handles utilities; this fills in the gaps)
   ============================================================ */

/* ----- Scrollbar ----- */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ----- Animations ----- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.fade-in {
  animation: fadeIn 0.25s ease both;
}

/* ----- Invoice Card ----- */
.invoice-card {
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.invoice-card:hover {
  transform: translateY(-1px);
}
.invoice-card:active {
  transform: translateY(0);
}

/* ----- FAB ----- */
.fab {
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(79, 70, 229, 0.55);
}
.fab:active {
  transform: scale(0.96);
}

/* ----- Toast ----- */
#toast-container {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: system-ui, -apple-system, sans-serif;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: toastIn 0.3s ease both;
  pointer-events: auto;
  white-space: nowrap;
}
.toast-success { background: #059669; }
.toast-error   { background: #dc2626; }
.toast-info    { background: #2563eb; }

/* ----- Wizard Step Dots ----- */
.step-active {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}
.step-done {
  background: #4f46e5;
  color: #fff;
}
.step-inactive {
  background: #f3f4f6;
  color: #9ca3af;
}
.dark .step-inactive {
  background: #374151;
  color: #6b7280;
}

/* ----- Form Input Focus Ring ----- */
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* ----- Print styles ----- */
@media print {
  body > *:not(#invoice-print-area) {
    display: none !important;
  }
  #invoice-print-area {
    display: block !important;
  }
  nav, .fab, #toast-container, .modal-overlay {
    display: none !important;
  }
}

/* ----- Bottom sheet ----- */
#bottom-sheet {
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* ----- Mobile tap highlight ----- */
* {
  -webkit-tap-highlight-color: transparent;
}

/* ----- Smooth scroll ----- */
html {
  scroll-behavior: smooth;
}

/* ----- Input date fix for dark mode ----- */
.dark input[type="date"],
.dark input[type="time"] {
  color-scheme: dark;
}

/* ----- Select arrow dark mode ----- */
.dark select {
  color-scheme: dark;
}

/* ----- PDF spinner ----- */
#pdf-spinner {
  animation: fadeIn 0.2s ease;
}

/* ----- Hero gradient text ----- */
.gradient-text {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
