/* === PPT Toolkit — Preview Editor === */

.preview-layout {
  display: flex;
  gap: 24px;
  min-height: 450px;
}

/* Left sidebar: thumbnail list */
.thumbnail-list {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
}
.thumbnail-item {
  border: 2px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  user-select: none;
}
.thumbnail-item:hover { border-color: var(--accent); }
.thumbnail-item.active { border-color: var(--accent); background: var(--light-bg); }
.thumbnail-item.dragging { opacity: 0.4; }
.thumbnail-item .thumb-type { font-size: 16px; flex-shrink: 0; }
.thumbnail-item .thumb-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumbnail-item .thumb-actions { display: flex; gap: 2px; flex-shrink: 0; }
.thumbnail-item .thumb-actions button {
  width: 24px; height: 24px;
  border: none; background: transparent;
  cursor: pointer; font-size: 12px;
  border-radius: 4px; color: #94A3B8;
}
.thumbnail-item .thumb-actions button:hover { background: #FEE2E2; color: #EF4444; }

/* Right: preview area */
.preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.slide-preview {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

/* Cover preview variants */
.preview-cover-center {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; text-align: center; padding: 40px;
}
.preview-cover-center .cover-accent {
  width: 120px; height: 4px; background: var(--accent);
  margin-bottom: 32px; border-radius: 2px;
}
.preview-cover-center .cover-title {
  font-family: var(--font-title); font-size: clamp(24px, 4vw, 40px);
  color: var(--text); margin-bottom: 12px;
}
.preview-cover-center .cover-subtitle {
  font-size: clamp(14px, 2vw, 20px); color: #64748B;
}

/* Content preview variants */
.preview-content-top-bottom {
  padding: 30px 40px; height: 100%; position: relative;
}
.preview-content-top-bottom .content-accent {
  position: absolute; left: 0; top: 0;
  width: 6px; height: 100%; background: var(--accent);
}
.preview-content-top-bottom h3 {
  font-family: var(--font-title); font-size: 24px; margin-bottom: 20px;
}
.preview-content-top-bottom .content-bullets {
  font-size: 16px; line-height: 2; color: var(--text); list-style: none; padding: 0;
}
.preview-content-top-bottom .content-bullets li::before { content: "• "; color: var(--accent); }

/* Cards preview */
.preview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; padding: 30px 40px; height: 100%;
}
.preview-card {
  background: var(--light-bg); border-radius: var(--corner-radius);
  padding: 20px; box-shadow: var(--shadow);
  font-size: 15px; line-height: 1.5;
}

/* Metrics preview */
.preview-metrics {
  display: flex; justify-content: center; gap: 40px;
  align-items: center; height: 100%; padding: 40px; flex-wrap: wrap;
}
.preview-metric-item { text-align: center; }
.preview-metric-value {
  font-family: var(--font-title); font-size: 48px;
  color: var(--accent); font-weight: 700;
}
.preview-metric-label { font-size: 16px; color: #64748B; margin-top: 8px; }

/* End preview */
.preview-end-center {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; text-align: center;
}
.preview-end-center h2 {
  font-family: var(--font-title); font-size: 48px; margin-bottom: 16px;
}

/* Style bar in preview */
.style-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--light-bg);
  border-radius: 12px;
  width: 100%;
}
.style-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.style-group-label { font-size: 12px; color: #64748B; font-weight: 600; white-space: nowrap; }

/* Responsive */
@media (max-width: 768px) {
  .preview-layout { flex-direction: column; }
  .thumbnail-list { width: 100%; flex-direction: row; overflow-x: auto; max-height: none; }
  .thumbnail-item { flex-shrink: 0; }
  .preview-metrics { gap: 20px; }
  .preview-metric-value { font-size: 32px; }
}
