/* ── PODIUM STYLES ── */
.pdm-btn-folder, .pdm-btn-upload {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 10px; font-size: 12px; font-weight: 500;
  cursor: pointer; border: none; font-family: var(--sans); transition: opacity .2s;
  text-decoration: none;
}
.pdm-btn-folder { background: var(--ink); color: white; }
.pdm-btn-upload { background: rgba(26,26,46,0.08); color: var(--ink2); border: 1px solid rgba(26,26,46,0.12); }
.pdm-btn-folder:hover, .pdm-btn-upload:hover { opacity: .8; }

/* 폴더 그리드 */
.pdm-folder-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  min-height: 140px;
}

/* 폴더 아이템 */
.pdm-folder-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; padding: 8px 4px 6px;
  border-radius: 12px; transition: background .15s;
  user-select: none;
}
.pdm-folder-item:hover { background: rgba(26,26,46,0.04); }
.pdm-folder-item.dragging { opacity: .4; }
.pdm-folder-item.drag-over { background: rgba(26,26,46,0.08); }

/* 폴더 SVG 아이콘 */
.pdm-folder-icon {
  width: 72px; height: 56px; position: relative; flex-shrink: 0;
}
.pdm-folder-body {
  position: absolute; bottom: 0; left: 0; right: 0; height: 46px;
  border-radius: 4px 6px 6px 6px;
  transition: background .2s;
}
.pdm-folder-tab {
  position: absolute; top: 0; left: 0;
  width: 32px; height: 13px;
  border-radius: 4px 4px 0 0;
  transition: background .2s;
}

.pdm-folder-label {
  margin-top: 6px; font-size: 11px; font-weight: 500;
  color: var(--ink2); text-align: center; line-height: 1.3;
  width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 2px;
}
.pdm-folder-count {
  font-size: 9.5px; color: rgba(26,26,46,0.4); margin-top: 2px;
}

/* 폴더 삭제 X 버튼 */
.pdm-folder-del {
  display: none; position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #E05050; color: white;
  font-size: 10px; font-weight: 700;
  align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  border: 2px solid white;
}
.pdm-folder-item.edit-mode .pdm-folder-del { display: flex; }
.pdm-folder-item.edit-mode { animation: pdmWiggle .25s ease infinite alternate; }
@keyframes pdmWiggle {
  from { transform: rotate(-1.5deg); }
  to   { transform: rotate(1.5deg); }
}

/* 색상 스와치 */
.pdm-color-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
  transition: transform .15s, border-color .15s;
}
.pdm-color-swatch:hover, .pdm-color-swatch.selected {
  transform: scale(1.2); border-color: var(--ink);
}

/* 최근 파일 목록 */
.pdm-recent-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.pdm-recent-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; padding: 8px 4px 6px;
  border-radius: 12px; transition: background .15s;
  user-select: none;
}
.pdm-recent-item:hover { background: rgba(26,26,46,0.04); }
.pdm-recent-item.pdm-dragging-ready { animation: pdmWiggle .25s ease infinite alternate; }
.pdm-recent-item.dragging { opacity: .4; }
.pdm-recent-icon {
  width: 52px; height: 64px; flex-shrink: 0; position: relative;
}
.pdm-recent-name {
  margin-top: 6px; width: 100%;
  text-align: center; line-height: 1.2;
  color: var(--ink2);
  padding: 0 2px;
  min-height: 42px; /* 3줄 공간 확보 */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pdm-recent-del {
  display: none; position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #E05050; color: white;
  font-size: 10px; font-weight: 700;
  align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  border: 2px solid white;
}
.pdm-recent-item.pdm-dragging-ready .pdm-recent-del { display: flex; }
.pdm-recent-del:hover { transform: scale(1.1); }

/* 폴더 내 파일 아이콘 */
.pdm-file-icon {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; padding: 8px 4px 6px;
  border-radius: 10px; transition: background .15s;
  user-select: none;
}
.pdm-file-icon:hover { background: rgba(26,26,46,0.06); }
.pdm-file-icon.pdm-file-edit { animation: pdmWiggle .25s ease infinite alternate; }
.pdm-file-svg { width: 44px; height: 54px; position: relative; flex-shrink: 0; }
.pdm-file-label {
  margin-top: 5px; width: 100%;
  text-align: center; line-height: 1.2;
  color: var(--ink2);
  min-height: 36px; /* 3줄 공간 확보 */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pdm-file-del {
  display: none; position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #E05050; color: white;
  font-size: 10px; font-weight: 700;
  align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  border: 2px solid white;
}
.pdm-file-icon.pdm-file-edit .pdm-file-del { display: flex; }

/* 하위 폴더 추가 버튼 */
.pdm-subfolder-add {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border-radius: 10px; cursor: pointer;
  border: 2px dashed rgba(26,26,46,0.15);
  transition: all .15s; color: rgba(26,26,46,0.4);
}
.pdm-subfolder-add:hover {
  border-color: rgba(26,26,46,0.3);
  background: rgba(26,26,46,0.03);
  color: rgba(26,26,46,0.6);
}
.pdm-subfolder-add span {
  font-size: 9px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}

/* 하위 폴더 아이템 */
.pdm-subfolder-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; padding: 8px 4px 6px;
  border-radius: 10px; transition: background .15s;
  user-select: none;
}
.pdm-subfolder-item:hover { background: rgba(26,26,46,0.04); }
.pdm-subfolder-icon {
  width: 44px; height: 44px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid; transition: transform .15s;
}
.pdm-subfolder-item:hover .pdm-subfolder-icon { transform: scale(1.05); }
.pdm-subfolder-name {
  margin-top: 5px; font-size: 10px; font-weight: 600;
  color: var(--ink2); text-align: center; line-height: 1.2;
  width: 100%;
}
.pdm-subfolder-del {
  display: none; position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #E05050; color: white;
  font-size: 10px; font-weight: 700;
  align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  border: 2px solid white;
}
.pdm-subfolder-item:hover .pdm-subfolder-del { display: flex; }

/* 빈 폴더 placeholder */
.pdm-folder-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; grid-column: 1/-1; color: rgba(26,26,46,0.3);
  font-size: 12px; gap: 6px;
}
