@import "pagy";
@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {

}

*/
.dot-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgb(209 213 219) 1px, transparent 1px);
  background-size: 24px 24px;
}

.dark .dot-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgb(75 85 99) 1px, transparent 1px);
}
/* Minimal GridStack Required Styles */

/* GridStack needs these for proper positioning */
.grid-stack-item-content {
  position: absolute;
  inset: 0;
  overflow: visible;
  padding: 2px; /* Prevent shadow clipping */
}

/* Drag handle styling - positioned in top-left corner */
.grid-stack-item-content .drag-handle {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  z-index: 1000 !important;
  background: #6b7280 !important;
  border-radius: 6px !important;
  width: 32px !important;
  height: 32px !important;
  cursor: move !important;
  opacity: 0.7 !important;
  transition: opacity 0.2s !important;
  display: none;
  /* Flexbox to center the icon */
  align-items: center !important;
  justify-content: center !important;
}

.grid-stack-item-content .drag-handle:not(.hidden) {
  display: flex !important; /* Use flex instead of block to maintain centering */
}

.grid-stack-item-content .drag-handle:hover {
  opacity: 1 !important;
}

.grid-stack-item-content .drag-handle svg {
  width: 20px !important;
  height: 20px !important;
  color: white !important;
}

/* Ensure child components can expand to full height */
.grid-stack-item-content > *:not(.drag-handle) {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Required z-index for dragging - GridStack applies this class during drag */
.grid-stack-item.ui-draggable-dragging {
  z-index: 150 !important; /* This one actually needs !important to override GridStack's inline styles */
}
.pagy {
  @apply flex justify-center -space-x-px text-base h-10 my-6;
  .page {
    a {
      @apply flex items-center justify-center px-4 h-10 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white;
    }
    &.active a {
      @apply flex items-center justify-center px-4 h-10 text-blue-600 border border-gray-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white;
    }
    &.disabled a {
      @apply flex items-center justify-center px-4 h-10 text-gray-300 border border-gray-300 bg-gray-100 hover:bg-gray-200 hover:text-gray-400 dark:border-gray-700 dark:bg-gray-700 dark:text-gray-300;
    }
    &.prev a {
      @apply rounded-s-lg;
    }
    &.next a {
      @apply rounded-e-lg;
    }
    &.gap { }  /* if you need to customize it */
  }
  .pagy-combo-input, &.pagy-items-selector-js {
    @apply inline-block whitespace-nowrap bg-gray-200 rounded-lg px-3 py-0.5;
    input {
      @apply bg-gray-100 border-none rounded-md;
    }
  }
}
/* PDF Viewer Wrapper */
.pdf-viewer-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin: 0 auto;
  height: 100%;
}

/* Content Container */
.pdf-content-wrapper {
  overflow: auto;
  position: relative;
  user-select: auto;
  height: 100%;
  min-height: 400px;
}

.pdf-pages-container {
  padding: 2rem 1rem;
  text-align: center;
}

/* Page Wrapper */
.pdf-page-wrapper {
  display: block;
  text-align: center;
}

/* Page Container */
.pdf-page-container {
  position: relative;
  margin: 0 auto 2rem auto;
  background-color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-radius: 0.375rem;
  overflow: hidden;
  display: inline-block;
  text-align: left;
  transition: none; /* Prevent dimension transitions */
}

/* Loading State */
.pdf-page-loading {
  background-color: #f9fafb;
}


/* Canvas Layer (Bottom) */
.pdf-page-canvas {
  display: block;
  height: auto;
  position: relative;
  z-index: 0;
}

/* Text Layer (Top) */
.textLayer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0.2;
  line-height: 1;
  z-index: 2;
}

.textLayer > span,
.textLayer span {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
  z-index: 2;
}

.textLayer ::selection {
  background-color: rgba(0, 100, 255, 0.3);
}

/* Highlight Container (Middle) */
.pdf-highlight-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  mix-blend-mode: multiply;
}

/* Highlight Styles */
.pdf-highlight {
  position: absolute;
  pointer-events: none;
  transition: all 0.2s ease;
}

/* Search Highlights */
.pdf-highlight.pdf-search-highlight {
  background-color: rgba(147, 197, 253, 0.3);
  border: none;
  opacity: 1;
}

.pdf-highlight.pdf-search-current {
  background-color: rgba(255, 235, 59, 0.6) !important;
  border: 2px solid rgba(255, 193, 7, 0.8) !important;
  box-shadow: 0 0 8px rgba(255, 235, 59, 0.8) !important;
  opacity: 1 !important;
  z-index: 10 !important;
}

/* Temporary Highlight (for links) */
.pdf-highlight.pdf-temp-highlight {
  background-color: rgba(253, 224, 71, 0.5);
  border: 2px solid rgba(250, 204, 21, 0.8);
  pointer-events: none;
}

/* Line clamp utility for evidence text */
.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.line-clamp-4 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
