/* PDF Rotator, embedded in its Insights post. Scoped under .pdfrot-app; uses the template's colour tokens. */

.pdfrot-app {
  margin: 32px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ink);
}
.pdfrot-app *, .pdfrot-app *::before, .pdfrot-app *::after { box-sizing: border-box; }

.pdfrot-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 14px; background: var(--navy); color: #fff;
}
.pdfrot-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 0 10px 0 0; color: #fff; }
.pdfrot-spacer { flex: 1; }
.pdfrot-status { font-size: 13px; color: var(--on-navy); }

.pdfrot-app button {
  font: inherit; font-size: 14px; line-height: 1;
  padding: 9px 13px; border-radius: 6px; cursor: pointer;
  background: transparent; color: #fff; border: 1px solid var(--navy-line);
}
.pdfrot-app button:hover:not(:disabled) { background: var(--navy-line); }
.pdfrot-app button:disabled { opacity: .45; cursor: not-allowed; }
.pdfrot-app button.pdfrot-primary { background: var(--teal); border-color: var(--teal); color: var(--navy); font-weight: 600; }
.pdfrot-app button.pdfrot-primary:hover:not(:disabled) { background: var(--teal-light); }
.pdfrot-app button:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 2px; }

.pdfrot-drop {
  margin: 16px; min-height: 220px; padding: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed var(--input); border-radius: var(--radius-sm);
  background: var(--teal-pale); color: var(--muted); text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pdfrot-drop.is-over { border-color: var(--teal-dark); background: var(--teal-tint); color: var(--ink); }
.pdfrot-drop p { margin: 0; font-size: 15px; }
.pdfrot-drop .pdfrot-big { font-size: 18px; font-weight: 600; color: var(--ink); }

.pdfrot-grid {
  max-height: 70vh; overflow-y: auto; padding: 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; align-content: start;
  background: var(--bg);
}
.pdfrot-page {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px; border: 2px solid transparent; border-radius: 8px; background: var(--card);
  cursor: pointer; user-select: none; transition: border-color .1s, background .1s;
}
.pdfrot-page:hover { border-color: var(--input); }
.pdfrot-page.is-selected { border-color: var(--teal-dark); background: var(--teal-tint); }
.pdfrot-page:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 2px; }
.pdfrot-canvas-wrap { width: 100%; aspect-ratio: .75; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pdfrot-page canvas { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 1px 4px rgba(27, 42, 57, .25); transition: transform .2s; }
.pdfrot-label { margin-top: 6px; font-size: 13px; color: var(--muted); }

.pdfrot-note { margin: 0; padding: 10px 16px 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.pdfrot-hidden { display: none !important; }
