/* CSS Design System for UN38.3 Document Generator */

@layer base {
  body {
    font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  }
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.8);
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 1);
}

/* Input Fields styling */
.input-field {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 0.5rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.8125rem;
  color: #f1f5f9;
  transition: all 0.2s ease;
}
.input-field:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  background-color: rgba(15, 23, 42, 1);
}

/* Accordion Styling */
.accordion-header.active {
  background-color: rgba(30, 41, 59, 1);
}
.accordion-header.active i[data-lucide="chevron-down"] {
  transform: rotate(180deg);
}
.accordion-content {
  display: block;
}
.accordion-content.collapsed {
  display: none;
}

/* A4 Document Sheet Representation */
.a4-document-sheet, .a4-document-sheet * {
  box-sizing: border-box;
}
.a4-document-sheet {
  width: 794px;
  min-height: 1123px;
  background-color: #ffffff;
  color: #000000;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: Arial, "SimSun", "Noto Sans SC", sans-serif;
  user-select: text;
  flex-shrink: 0;
}

/* Table Specific Styling (Unified Single Table Architecture) */
.un383-table {
  border-collapse: collapse !important;
  width: 100%;
}
.un383-table tr {
  background: transparent;
}
.un383-table th,
.un383-table td {
  border: 1px solid #000000 !important;
  color: #000000;
  box-sizing: border-box;
}

/* Checkbox Symbol Styling */
.chk-box {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.5px solid #000;
  text-align: center;
  line-height: 11px;
  font-size: 11px;
  font-weight: bold;
}

/* Stamp Container */
#stamp-container {
  display: inline-block;
  position: relative;
  vertical-align: middle;
}

/* Signature & Stamp Multiply blend mode trick */
.mix-blend-multiply {
  mix-blend-mode: multiply;
}

/* Print Stylesheet */
@media print {
  body {
    background: white !important;
    color: black !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  header, aside, main > div:first-child, #modal-sig-pad, #modal-stamp-gen {
    display: none !important;
  }
  main {
    height: auto !important;
    background: white !important;
    overflow: visible !important;
  }
  #preview-viewport {
    padding: 0 !important;
    background: white !important;
    overflow: visible !important;
  }
  .a4-document-sheet {
    box-shadow: none !important;
    margin: 0 auto !important;
    width: 100% !important;
    min-height: auto !important;
    transform: none !important;
  }
}
