/*
 * 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 */
}
/* PdfModoSheet – lightweight spreadsheet styles */

.pms-wrapper {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  outline: none;
}

/* ─── Toolbar ─────────────────────────────────────────── */

.pms-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 6px 10px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.pms-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.pms-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.pms-btn:active {
  background: #e5e7eb;
}

/* ─── Table container ─────────────────────────────────── */

.pms-table-wrap {
  overflow: auto;
  max-height: 70vh;
  position: relative;
}

.pms-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}

/* ─── Header cells ────────────────────────────────────── */

.pms-col-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 4px 8px;
  font-weight: 600;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  user-select: none;
  white-space: nowrap;
}

.pms-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 3;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  width: 48px;
  min-width: 48px;
}

/* ─── Row numbers ─────────────────────────────────────── */

.pms-row-num {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 4px 6px;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  font-weight: 500;
  user-select: none;
  width: 48px;
  min-width: 48px;
}

/* ─── Data cells ──────────────────────────────────────── */

.pms-cell {
  border: 1px solid #e5e7eb;
  padding: 4px 8px;
  cursor: cell;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
  height: 28px;
  vertical-align: middle;
  transition: background 0.1s;
}

.pms-cell:hover {
  background: #f9fafb;
}

.pms-cell.pms-active {
  outline: 2px solid #4f46e5;
  outline-offset: -1px;
  background: #eef2ff;
  z-index: 1;
  position: relative;
}

/* ─── Inline editor ───────────────────────────────────── */

.pms-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  background: #fff;
  box-sizing: border-box;
}

/* ─── Column resize handle ────────────────────────────── */

.pms-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  background: transparent;
}

.pms-resize-handle:hover {
  background: #6366f1;
  opacity: 0.4;
}

/* ─── Empty state ─────────────────────────────────────── */

.pms-empty {
  padding: 40px;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
}

/* ─── Status bar ──────────────────────────────────────── */

.pms-status {
  padding: 4px 10px;
  font-size: 11px;
  color: #6b7280;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}
/*
 * 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.
 *


 */
