/* === PPT Slide Viewer (client-side pptx-preview) === */
.slides-viewer {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #1e1e1e;
  color: #e5e5e5;
  overflow: hidden;
}

.slides-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.slides-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #3a3a3a;
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: slides-spin 0.8s linear infinite;
}

@keyframes slides-spin { to { transform: rotate(360deg); } }

.slides-loading-text { color: #a0a0a0; font-size: 14px; }

.slides-stage {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  padding: 20px 0;
  background: #141414;
}

.slides-stage::-webkit-scrollbar { width: 8px; }
.slides-stage::-webkit-scrollbar-track { background: #1e1e1e; }
.slides-stage::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 4px; }
.slides-stage::-webkit-scrollbar-thumb:hover { background: #555; }

/* pptx-preview slide elements — enforce snap + spacing */
.slides-stage > * {
  scroll-snap-align: start;
  margin: 0 auto 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  background: #fff;
  max-width: calc(100% - 40px);
}

.slides-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: #252525;
  border-top: 1px solid #333;
  font-size: 13px;
}

.slides-counter { color: #ccc; margin-right: 8px; }
#slides-cur { font-weight: 600; color: #22d3ee; }

.slides-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid #444;
  border-radius: 4px;
  color: #ccc;
  cursor: pointer;
  font-size: 12px;
  transition: all .15s;
}
.slides-btn:hover { background: #333; color: #fff; border-color: #666; }
.slides-btn:active { transform: translateY(1px); }

.slides-viewer:fullscreen {
  background: #000;
}
.slides-viewer:fullscreen .slides-stage {
  padding: 0;
  background: #000;
}
.slides-viewer:fullscreen .slides-stage > * {
  max-width: 100%;
  margin: 0;
  box-shadow: none;
  min-height: calc(100vh - 44px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slides-error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  gap: 8px;
}

.slides-error-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.slides-error-title { font-size: 16px; color: #fff; font-weight: 600; }
.slides-error-msg { font-size: 13px; color: #ef9f9f; max-width: 500px; }
.slides-error-hint { font-size: 12px; color: #888; margin-top: 8px; }

/* file-preview wrapper may add padding, strip it in slides mode */
.file-preview.slides-mode,
.doc-body.slides-mode .file-preview { padding: 0; }
.doc-body.slides-mode { padding: 0; }
