/* ------------------ SLIDE PANEL (Premium Build) ------------------ */

#right-panel {
  width: 0;
  height: 80%;
  position: fixed;
  right: 0;
  top: 70px;
  background: #fafafa;
  overflow-x: hidden;
  transition: width 0.25s ease;
  border-left: 1px solid #e3e3e3;
  z-index: 1000;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding-top: 12px;
}

#right-panel.slider-open {
  width: 165px;
}

#right-panel.slider-closed {
  width: 0;
  padding: 0;
}

/* Slide Controls */
.slide-controls {
  position: absolute;
  top: 45px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 1001;
}


/* neat buttons */
.slide-controls button {
    background: #fff;
    border: 1px solid #ddd;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s ease;
}

.slide-controls button:hover {
    background: #f3f3f3;
}

/* Fix the slide-count box too */
#slide-count-display {
    margin-right: 6px;
}
#slide-count-display {
  font-size: 12px;
  color: #555;
  padding: 4px 8px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Slide list container */
#canvas-previews {
  padding: 8px;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
}

/* Add Slide Button */
#add-canvas-button {
  width: 82%;
  margin: 12px auto;
  padding: 7px 0;
  background: #1e1e1e;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}

#add-canvas-button:hover {
  background: #444;
}

/* ------------------ THUMBNAILS ------------------ */

.canvas-thumbnail {
  position: relative;
  width: 92%;
  margin: 0 auto 14px;
  background: #ffffff;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.canvas-thumbnail:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ACTIVE SLIDE */
.canvas-thumbnail.active {
  border: 2px solid #ffb803;
  box-shadow: 0 0 0 2px rgba(255,184,3,0.25);
}

/* SLIDE HEADER */
.slide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: #fbfbfb;
  border-bottom: 1px solid #eee;
}

.slide-number {
  font-size: 11px;
  font-weight: 600;
  color: #777;
}

.slide-name {
  flex-grow: 1;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
}

.slide-name:focus {
  background: #eef5ff;
  border: 1px solid #87baff;
  padding: 2px;
  border-radius: 4px;
}

/* 3-dot menu */
.slide-menu-container {
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.canvas-thumbnail:hover .slide-menu-container {
  opacity: 1;
}

.slide-menu-button {
  background: none;
  border: none;
  font-size: 14px;
  padding: 2px;
  cursor: pointer;
  color: #444;
}

.slide-menu-dropdown {
  position: absolute;
  top: 26px;
  right: 6px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-width: 110px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  display: none;
  z-index: 40;
}

/* Dropdown items */
.slide-menu-item {
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
}

.slide-menu-item:hover {
  background: #f3f3f3;
}

/* Thumbnail image */
.slide-thumbnail-img {
  width: 100%;
  display: block;
  border-radius: 0 0 8px 8px;
  pointer-events: none;
}

/* ------------------ DRAG HANDLE (Figma-style) ------------------ */
.slide-drag-handle {
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  opacity: 0.2;
  transition: opacity 0.2s ease;
}

.canvas-thumbnail:hover .slide-drag-handle {
  opacity: 0.7;
}

.slide-drag-handle:active {
  cursor: grabbing;
}

/* Figma-style 6-dot icon */
.drag-dots {
  width: 4px;
  height: 18px;
  display: grid;
  grid-template-columns: repeat(2, 2px);
  grid-template-rows: repeat(3, 2px);
  gap: 3px;
}

.drag-dots div {
  width: 3px;
  height: 3px;
  background: #777;
  border-radius: 50%;
}

/* ------------------ HOVER ACTION BUTTONS ------------------ */

.slide-actions {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s ease;
}

.canvas-thumbnail:hover .slide-actions {
  opacity: 1;
  transform: translateY(0);
}

.slide-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: 0.15s ease;
}

.slide-action-btn:hover {
  background: white;
  transform: scale(1.08);
}

.slide-action-btn.duplicate { color: #007bff; }
.slide-action-btn.delete { color: #d33; }

/* ------------------ DRAGGING STATE ------------------ */
.canvas-thumbnail.dragging {
  opacity: 0.45;
  transform: scale(0.97);
}

.canvas-thumbnail.drag-over {
  outline: 2px dashed #007bff;
  background: #eef5ff;
}
