/* ══════════════════════════════════════════════════════════════════════════════
   LAWZO LEGAL DOCUMENTS MODULE — NEO-KINETIC SPLIT STUDIO
   Harmonized with Lawzo's Core Slate & Emerald Light Design System
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Typography ────────────────────────────────────────────────────────────── */

.font-urdu,
.urdu-text {
  font-family: 'Lawzo Urdu', 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Amiri', serif;
  line-height: 2.1;
}

/* ── Global Keyframes ──────────────────────────────────────────────────────── */

@keyframes typingRippleLight {
  0% {
    background-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    transform: scale(1.02);
  }

  70% {
    background-color: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    transform: scale(1);
  }

  100% {
    background-color: transparent;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes spotlightPulseLight {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 0 15px rgba(16, 185, 129, 0.12);
    border-color: #10b981;
  }

  50% {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.4), 0 0 24px rgba(16, 185, 129, 0.22);
    border-color: #059669;
  }
}


@keyframes origamiFoldOut {
  0% {
    transform: perspective(1000px) rotateY(0deg) scale(1);
    opacity: 1;
  }

  100% {
    transform: perspective(1000px) rotateY(-90deg) scale(0.92);
    opacity: 0;
  }
}

@keyframes origamiFoldIn {
  0% {
    transform: perspective(1000px) rotateY(90deg) scale(0.92);
    opacity: 0;
  }

  100% {
    transform: perspective(1000px) rotateY(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes stepFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Interactive State Helpers ─────────────────────────────────────────────── */
.typing-ripple-active {
  animation: typingRippleLight 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: inline-block;
  border-radius: 4px;
}

.spotlight-active {
  animation: spotlightPulseLight 1.8s ease-in-out infinite;
  background-color: rgba(236, 253, 245, 0.95) !important;
  border-radius: 4px;
  padding: 1px 4px;
}


.origami-flip-out {
  animation: origamiFoldOut 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.origami-flip-in {
  animation: origamiFoldIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.step-animate-in {
  animation: stepFadeIn 0.3s ease-out forwards;
}



/* ── Draggable Split Handle ────────────────────────────────────────────────── */
.split-divider-handle {
  width: 12px;
  cursor: col-resize;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  z-index: 25;
  transition: background 0.2s ease;
}

.split-divider-handle:hover,
.split-divider-handle:active {
  background: rgba(16, 185, 129, 0.12);
}

.split-divider-handle::after {
  content: "";
  width: 4px;
  height: 48px;
  border-radius: 9999px;
  background: #cbd5e1;
  transition: background 0.2s ease, height 0.2s ease;
}

.split-divider-handle:hover::after,
.split-divider-handle:active::after {
  background: #10b981;
  height: 64px;
}

/* ── Canonical A4 Legal Sheet ──────────────────────────────────────────────── */
.a4-paper-sheet {
  width: 100%;
  max-width: 820px;
  min-height: 1140px;
  background: #ffffff;
  box-shadow: 0 14px 34px -4px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  border: 1px solid #e2e8f0;
  padding: 48px 56px;
  box-sizing: border-box;
  font-family: 'Times New Roman', Times, serif;
  color: #0f172a;
  position: relative;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 640px) {
  .a4-paper-sheet {
    padding: 24px 16px;
    min-height: auto;
  }
}

.a4-paper-sheet table {
  width: 100% !important;
  table-layout: fixed;
}

.a4-paper-sheet td,
.a4-paper-sheet th {
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
}

/* ── Interactive State Badges & Buttons ────────────────────────────────────── */
.active-lang-btn {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.inactive-lang-btn {
  color: #64748b !important;
}

.inactive-lang-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.active-step-tab {
  border-color: #059669 !important;
  color: #047857 !important;
  background-color: rgba(236, 253, 245, 0.95) !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.inactive-step-tab {
  border-color: transparent !important;
  color: #64748b !important;
  background-color: transparent !important;
}

.inactive-step-tab:hover {
  color: #0f172a !important;
  background-color: rgba(241, 245, 249, 0.6) !important;
}

/* ── Print / PDF Clean Rendering ───────────────────────────────────────────── */
@media print {
  body * {
    visibility: hidden;
  }

  .no-print,
  header,
  footer,
  .drafting-wizard-sidebar,
  nav {
    display: none !important;
  }

  .a4-paper-sheet,
  .a4-paper-sheet * {
    visibility: visible;
  }

  .a4-paper-sheet {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20mm 20mm !important;
    box-shadow: none !important;
    border: none !important;
  }

  .editable-field {
    background: transparent !important;
    border: none !important;
    color: #000000 !important;
  }
}