.nectpdf-editor-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* ── Dropzone ─────────────────────────────────────────── */
.nectpdf-dropzone {
  border: 2px dashed #dee2e6;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nectpdf-dropzone:hover,
.nectpdf-dropzone--hover {
  border-color: #10b981;
  background: #f0fdf9;
}
.nectpdf-dropzone-inner {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
}

.nectpdf-editor-shell .nectpdf-dropzone,
.nectpdf-editor-shell .nectpdf-loading {
  flex: 1 1 auto;
  min-height: 0;
}

/* ── Free banner ──────────────────────────────────────── */
.nectpdf-free-banner {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  color: #6c757d;
  margin-top: 0.75rem;
}
.nectpdf-free-banner a {
  color: #10b981;
  text-decoration: none;
}
.nectpdf-free-banner a:hover {
  text-decoration: underline;
}

/* ── Thumbnail grid ───────────────────────────────────── */
.nectpdf-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  align-content: start;
  padding-right: 0.35rem;
}
@media (max-width: 991px) {
  .nectpdf-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 575px) {
  .nectpdf-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Thumbnail card ───────────────────────────────────── */
.nectpdf-thumb {
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nectpdf-thumb:hover {
  border-color: #adb5bd;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.nectpdf-thumb--selected {
  border-color: #10b981 !important;
  background: #f0fdf9;
}

.nectpdf-thumb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.45rem;
}
.nectpdf-chk {
  border-radius: 3px !important;
  cursor: pointer;
  width: 1rem;
  height: 1rem;
  accent-color: #10b981;
}
.nectpdf-eye-btn {
  color: #adb5bd;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.15s;
}
.nectpdf-eye-btn:hover {
  color: #10b981;
}

.nectpdf-thumb-preview {
  padding: 0 0.45rem;
  flex: 1;
}
.nectpdf-page-bg {
  width: 100%;
  aspect-ratio: 210 / 297;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  border-radius: 2px;
}

.nectpdf-thumb-info {
  padding: 0.35rem 0.45rem 0.45rem;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.nectpdf-thumb-filename {
  font-size: 0.68rem;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}
.nectpdf-thumb-page {
  font-size: 0.62rem;
  color: #6c757d;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ── Action bar ───────────────────────────────────────── */
.nectpdf-action-bar {
  position: relative;
  background: #fff;
  border-top: 1px solid #dee2e6;
  padding: 0.65rem 1rem;
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
  z-index: 10;
  flex: 0 0 auto;
}

/* ── Loading state ────────────────────────────────────── */
.nectpdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: #fff;
  border-radius: 4px;
}

/* ── Thumbnail canvas ─────────────────────────────────── */
.nectpdf-page-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  background: #f8f9fa;
}

/* ── Modal canvas ─────────────────────────────────────── */
.nectpdf-modal-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 2px 16px rgba(0,0,0,.12);
}
