/* A Keynote or PowerPoint file's slides: the strip in the inspector
   (web/slide-sheet.js) and the viewer (web/slide-viewer.js). */

.slidesheet { margin: 14px 0 4px; }
.slidesheet-head { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.slidesheet-about { margin: 0 0 8px; font-size: 12px; color: var(--ink-dim); }
.slidesheet-grid {
  display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
.slidetile {
  position: relative; aspect-ratio: 16 / 9; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.slidetile:hover, .slidetile:focus-visible { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.slidetile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.slidetile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slidetile-words {
  display: block; padding: 6px; font-size: 10px; line-height: 1.25; text-align: left;
  color: var(--ink); overflow: hidden; height: 100%;
}
.slidetile-n {
  position: absolute; left: 4px; bottom: 4px; padding: 0 5px; border-radius: 4px;
  font-size: 10px; background: rgba(0, 0, 0, .55); color: #fff;
}

.slideview {
  width: min(1200px, 96vw); max-height: 94vh; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--rim);
  background: var(--panel); color: var(--ink); display: flex; flex-direction: column;
}
.slideview:not([open]) { display: none; }
.slideview::backdrop { background: rgba(0, 0, 0, .68); backdrop-filter: blur(4px); }
.sv-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.sv-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-count { color: var(--ink-dim); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sv-close {
  margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 8px;
  display: grid; place-items: center;
  background: transparent; font-size: 16px; color: var(--ink-dim); cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.sv-close:hover { background: var(--panel-2); color: var(--ink); }
.sv-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sv-stage { display: flex; align-items: center; gap: 8px; padding: 12px; min-height: 0; }
.sv-frame {
  flex: 1; height: min(62vh, calc((96vw - 140px) * 9 / 16)); display: flex; align-items: center; justify-content: center;
  background: #0e0e12; border-radius: 8px; overflow: hidden;
}
/* Filled, not shown at its own size: what a Keynote file carries is 356px wide,
   and readable beats crisp until Keynote renders it full size. */
.sv-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sv-textonly, .sv-empty { padding: 24px; white-space: pre-line; font-size: 15px; line-height: 1.45; max-width: 60ch; color: #eceaf2; }
.sv-empty { color: #9a99a6; }
.sv-nav {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 22px; cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.sv-nav:hover:not(:disabled) { background: var(--panel-2); border-color: var(--line-strong); }
.sv-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sv-nav:disabled { opacity: .3; cursor: default; }
.sv-words { padding: 0 64px 8px; white-space: pre-line; font-size: 14px; line-height: 1.45; max-height: 18vh; overflow: auto; }
.sv-note { margin: 0; padding: 0 64px 12px; font-size: 12px; color: var(--ink-dim); }
.sv-note:empty, .sv-words:empty { display: none; }

@media (max-width: 720px) {
  .slideview { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 0; border: 0; }
  .sv-words, .sv-note { padding-inline: 16px; }
}

/* Slides compared in the duplicate finder (web/dupes-compare.js): a slide has no
   transparency, so the checkerboard that means "transparent here" would lie. */
.cmpdeck .cmpstage, .cmpdeck .cmpstage.side img { background: var(--panel-2); }
