/* EDI CSV Parser — custom styles layered on top of Tailwind (CDN) */

:root {
  --brand-navy: #0b1830;
  --brand-blue: #2563eb;
  --brand-cyan: #06b6d4;
  --brand-green: #16a34a;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: #f7f9fc;
}

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px dashed #cbd5e1;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}
.dropzone.drag-active {
  border-color: var(--brand-blue);
  background-color: #eff6ff;
  transform: scale(1.005);
}

/* ---------- Segment badge colors ---------- */
.seg-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.45rem;
  border-radius: 0.375rem;
  background: #e0edff;
  color: #1d4ed8;
  white-space: nowrap;
}

/* ---------- Table ---------- */
.edi-table-wrap {
  max-height: 560px;
  overflow: auto;
  border-radius: 0.75rem;
}
.edi-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.edi-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
.edi-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0f172a;
  color: #e2e8f0;
}
.edi-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
.edi-table tbody tr:hover {
  background: #eef2ff;
}
.edi-table tbody tr.row-locked {
  filter: blur(2.5px);
  opacity: 0.55;
  user-select: none;
}

/* ---------- Blur / lock overlay ---------- */
.locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 55%);
  backdrop-filter: blur(1px);
}

/* ---------- Pulsing lock badge ---------- */
.pulse-dot {
  position: relative;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 2px solid var(--brand-green);
  animation: pulseRing 2.2s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 0.8; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 24, 48, 0.65);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-card {
  max-width: 480px;
  width: 100%;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
}

/* ---------- Fade/slide utility ---------- */
.fade-in {
  animation: fadeIn 0.25s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Gradient hero backdrop ---------- */
.hero-gradient {
  background: radial-gradient(1200px 500px at 15% -10%, #dbeafe 0%, rgba(219,234,254,0) 60%),
              radial-gradient(900px 500px at 100% 0%, #cffafe 0%, rgba(207,250,254,0) 55%),
              #ffffff;
}

/* ---------- Code font for raw preview ---------- */
.mono-scroll {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
}

/* toast */
#toast-root {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.875rem;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.4);
  max-width: 340px;
}
.toast.error { background: #b91c1c; }
.toast.success { background: #15803d; }
