/* Custom UI overrides v2 */
/* 1. Hide the fixed top-left planet logo */
.logo--fixed[data-v-12df069a],
a.logo-link .logo--fixed {
  display: none !important;
}

/* 2. Folder selector pill centered under the title */
#custom-folder-bar {
  position: relative;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0.4em 0 0.6em;
}
#custom-folder-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 60vw;
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  color: var(--el-text-color-primary, #303133);
  background: var(--glass-bg, rgba(255,255,255,0.6));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.5));
  box-shadow: var(--glass-shadow, 0 4px 16px rgba(0,0,0,0.08));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#custom-folder-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.14); }
#custom-folder-pill .cfp-icon { font-size: 1.1em; }
#custom-folder-pill .cfp-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#custom-folder-pill .cfp-root { color: var(--el-text-color-secondary, #909399); font-weight: 500; }

/* popover panel */
#custom-folder-pop {
  display: none;
  width: min(420px, 86vw);
  max-height: 46vh;
  overflow: auto;
  padding: 10px;
  border-radius: 14px;
  background: var(--el-bg-color, #fff);
  border: 1px solid var(--glass-border, rgba(0,0,0,0.08));
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
#custom-folder-pop.open { display: block; }
#custom-folder-pop .cfp-new {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
#custom-folder-pop .cfp-new input {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--el-border-color, #dcdfe6);
  background: transparent;
  color: var(--el-text-color-primary, #303133);
  font-size: 0.9rem;
  outline: none;
}
#custom-folder-pop .cfp-new input:focus { border-color: var(--el-color-primary, #409eff); }
#custom-folder-pop .cfp-new button {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #fff;
  background: var(--el-color-primary, #409eff);
}
#custom-folder-pop .cfp-tree .cfp-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--el-text-color-primary, #303133);
}
#custom-folder-pop .cfp-tree .cfp-node:hover { background: var(--el-fill-color-light, #f5f7fa); }
#custom-folder-pop .cfp-tree .cfp-node.selected { background: var(--el-color-primary-light-9, #ecf5ff); color: var(--el-color-primary, #409eff); }
#custom-folder-pop .cfp-tree .cfp-node .cfp-indent { display: inline-block; }
#custom-folder-pop .cfp-tree .cfp-toggle {
  width: 18px; text-align: center; cursor: pointer; color: var(--el-text-color-secondary, #909399);
  font-size: 0.8rem; flex: none;
}
#custom-folder-pop .cfp-tree .cfp-children { display: none; }
#custom-folder-pop .cfp-tree .cfp-node.expanded + .cfp-children { display: block; }
#custom-folder-pop .cfp-empty { color: var(--el-text-color-secondary, #909399); font-size: 0.9rem; padding: 8px; }
html.dark #custom-folder-pop { background: var(--el-bg-color, #1d1e1f); }

/* 3. Upload card widened */
.upload-card[data-v-705d02f2] { width: 88vw !important; }
.upload-list-card[data-v-705d02f2] { width: 88vw !important; }
.upload[data-v-fef7fa42] { width: 88vw; }
@media (max-width: 768px) {
  .upload-card[data-v-705d02f2] { width: 92vw !important; }
  .upload-list-card[data-v-705d02f2] { width: 92vw !important; }
}

/* 4. Fullscreen drop hint ring */
html.custom-dragging body::after {
  content: '';
  position: fixed;
  inset: 10px;
  border: 3px dashed var(--el-color-primary, #409eff);
  border-radius: 18px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.85;
}

/* 5. Action bar always visible (file cards + folder cards, both scopes) */
.el-card .action-bar[data-v-10baa72e],
.el-card .action-bar[data-v-382f831a] {
  opacity: 1 !important;
  pointer-events: auto !important;
}
@media (max-width: 768px) {
  .el-card .action-bar[data-v-10baa72e],
  .el-card .action-bar[data-v-382f831a] {
    display: flex !important;
  }
}

/* 6. Custom toast */
.custom-toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 10px;
  background: rgba(30, 30, 32, 0.92);
  color: #fff;
  font-size: 0.92rem;
  z-index: 100000;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.custom-toast.err { background: rgba(192, 60, 60, 0.95); }
.custom-toast.out { opacity: 0; transform: translateX(-50%) translateY(8px); }

/* 7. Folder share button + panel */
.folder-card .custom-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#custom-share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
}
#custom-share-panel {
  position: relative;
  width: min(480px, 90vw);
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--el-bg-color, #fff);
  color: var(--el-text-color-primary, #303133);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
}
#custom-share-panel .csp-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
#custom-share-panel .csp-dir {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--el-fill-color-light, #f5f7fa);
  font-size: 0.92rem;
  margin-bottom: 12px;
  word-break: break-all;
}
#custom-share-panel .csp-link {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--el-border-color, #dcdfe6);
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
  margin-bottom: 12px;
  user-select: all;
}
#custom-share-panel .csp-actions { display: flex; gap: 10px; }
#custom-share-panel .csp-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #fff;
}
#custom-share-panel .csp-btn.primary { background: var(--el-color-primary, #409eff); }
#custom-share-panel .csp-btn.danger { background: var(--el-color-danger, #f56c6c); }
#custom-share-panel .csp-hint { color: var(--el-text-color-secondary, #909399); font-size: 0.82rem; margin-top: 10px; line-height: 1.5; }
#custom-share-panel .csp-namerow { margin-bottom: 12px; }
#custom-share-panel .csp-name {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--el-border-color, #dcdfe6);
  background: var(--el-fill-color-blank, #fff);
  color: var(--el-text-color-primary, #303133);
  font-size: 0.9rem;
  box-sizing: border-box;
}
#custom-share-panel .csp-name:focus { outline: none; border-color: var(--el-color-primary, #409eff); }
#custom-share-panel .csp-loading { color: var(--el-text-color-secondary, #909399); padding: 8px 0; }
#custom-share-panel .csp-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--el-text-color-secondary, #909399);
  line-height: 1;
}
html.dark #custom-share-panel { background: var(--el-bg-color, #1d1e1f); }