/* Custom Base & Typography Studio Styles */
@layer utilities {
  .animate-fadeIn {
    animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Paper Canvas Styling */
#pdfPaper {
  width: 595px; /* A4 aspect at 72dpi standard */
  min-height: 842px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Editable Text Block in Canvas Overlay */
.pdf-text-block {
  position: absolute;
  cursor: text;
  user-select: text;
  box-sizing: border-box;
  padding: 1px 3px;
  border: 1px dashed transparent;
  transition: border-color 0.12s ease, background-color 0.12s ease;
  white-space: pre-wrap;
  outline: none;
  min-height: 1.2em;
}

.pdf-text-block:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background-color: rgba(99, 102, 241, 0.06);
}

.pdf-text-block.is-active {
  border-color: #6366f1;
  background-color: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
  z-index: 25;
}

.show-blocks-highlight .pdf-text-block {
  border-color: rgba(99, 102, 241, 0.3);
  background-color: rgba(99, 102, 241, 0.025);
}

/* Stamp Items */
.pdf-stamp-item {
  position: absolute;
  pointer-events: auto;
  cursor: move;
  user-select: none;
  z-index: 22;
  transition: transform 0.1s ease;
}
.pdf-stamp-item:hover {
  filter: brightness(1.1);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #273349;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3b4d6e;
}

/* Font Classes */
.font-amiri { font-family: 'Amiri', serif; }
.font-cairo { font-family: 'Cairo', sans-serif; }
.font-tajawal { font-family: 'Tajawal', sans-serif; }
.font-lateef { font-family: 'Lateef', cursive; }
.font-almarai { font-family: 'Almarai', sans-serif; }