/* Custom styles and print isolation rules */

/* Custom smooth scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Hide scrollbar for category tabs */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Stable minimum heights for Ad Containers to guarantee CLS = 0 */
.ad-slot-leaderboard {
  min-height: 90px;
  max-height: 100px;
}

.ad-slot-sidebar {
  min-height: 250px;
  width: 300px;
}

.ad-slot-sticky-bottom {
  min-height: 50px;
}

/* Editor typography */
#plain-editor,
#rich-editor {
  outline: none;
  min-height: calc(100vh - 280px);
}

#rich-editor:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
  display: block;
}

/* Dedicated print mount container (hidden on screen) */
#print-mount-area {
  display: none;
}

/* Print Isolation Rule: Guaranteed crisp black text on white paper, multi-page pagination, 0 UI clutter */
@media print {
  /* Hide all app containers, modals, sidebars, buttons, and floating tooltips */
  body > *:not(#print-mount-area) {
    display: none !important;
  }

  /* Show ONLY the clean print mount area */
  #print-mount-area {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 12pt !important;
    line-height: 1.6 !important;
  }

  #print-mount-area * {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  /* Reset document background to pure white paper */
  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  @page {
    margin: 15mm;
    size: auto;
  }
}

