/*
 * Styles for the PDF Previewer and Page Selection
 */

/* Main container for the horizontally-scrollable pages */
.pdf-preview-container {
  display: flex; /* Use flexbox for easy alignment */
  overflow-x: auto; /* Enable horizontal scrolling */
  overflow-y: hidden;
  white-space: nowrap; /* Prevent pages from wrapping to the next line */
  padding: 1.5rem 1rem; /* Generous padding */
  background-color: #f9fafb; /* A light gray background (Tailwind's gray-50) */
  border-radius: 0.75rem; /* Rounded corners */
  border: 1px solid #e5e7eb; /* Subtle border (Tailwind's gray-200) */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #f9fafb;
}

/* Styling for each individual page thumbnail */
.pdf-page {
  display: inline-block;
  flex-shrink: 0; /* Prevent pages from shrinking */
  margin: 0 0.75rem; /* Spacing between pages */
  border: 3px solid transparent; /* Start with a transparent border */
  border-radius: 0.5rem; /* Rounded corners for the page */
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  cursor: pointer;
  position: relative; /* Needed for the page number overlay */
  transition: all 0.2s ease-in-out;
  width: 250px; /* Set a fixed width for consistent sizing */
}

/* The canvas element should fill its parent container */
.pdf-page canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.375rem; /* Slightly smaller radius to fit inside the border */
}

/* Hover effect for pages */
.pdf-page:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  border-color: #c7d2fe; /* A light indigo on hover (Tailwind's indigo-200) */
}

/* --- The style for a SELECTED page --- */
.pdf-page.selected {
  border-color: #4f46e5; /* The primary indigo color (Tailwind's indigo-600) */
  /* Use a ring effect for a modern highlight */
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
}

.pdf-page.selected:hover {
  border-color: #4338ca; /* A darker indigo on hover (indigo-700) */
}

/* The page number overlay in the bottom-right corner */
.pdf-page::after {
  content: attr(data-page-number); /* Use the data attribute from your JS */
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background-color: rgba(17, 24, 39, 0.75); /* Semi-transparent dark background */
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px; /* A pill shape */
  pointer-events: none; /* Ensure it doesn't interfere with clicks */
}
/*
 * 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.
 *


 */
