| 1 | /* ========================================================= |
| 2 | DRAG-MOVE & ICON PREVIEW — real-icon lift styles |
| 3 | ========================================================= */ |
| 4 | |
| 5 | /* Item being actively dragged: lifted shadow + accent border */ |
| 6 | .file-item.dragging { |
| 7 | box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); |
| 8 | border-color: var(--accent, #5b7fff) !important; |
| 9 | z-index: 9999; |
| 10 | cursor: grabbing !important; |
| 11 | } |
| 12 | |
| 13 | /* Folder highlighted while a dragged item hovers over it */ |
| 14 | .file-item.drop-target .icon { |
| 15 | filter: drop-shadow(0 0 6px var(--accent, #5b7fff)) brightness(1.25); |
| 16 | } |
| 17 | |
| 18 | .drag-parent-target { |
| 19 | position: fixed; |
| 20 | left: 16px; |
| 21 | top: 68px; |
| 22 | z-index: 10002; |
| 23 | display: inline-flex; |
| 24 | align-items: center; |
| 25 | gap: 0.45rem; |
| 26 | padding: 0.45rem 0.65rem; |
| 27 | border: 1px solid var(--border, #2e3247); |
| 28 | border-radius: 8px; |
| 29 | background: var(--surface, #1a1d27); |
| 30 | color: var(--text, #e8eaf0); |
| 31 | pointer-events: auto; |
| 32 | user-select: none; |
| 33 | box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42); |
| 34 | } |
| 35 | |
| 36 | .drag-parent-target .up { |
| 37 | color: var(--accent, #5b7fff); |
| 38 | font-weight: 700; |
| 39 | } |
| 40 | |
| 41 | .drag-parent-target .label { |
| 42 | font-size: 0.82rem; |
| 43 | } |
| 44 | |
| 45 | .drag-parent-target.active { |
| 46 | border-color: var(--accent, #5b7fff); |
| 47 | box-shadow: 0 0 0 2px rgba(91, 127, 255, 0.22), 0 8px 20px rgba(0, 0, 0, 0.5); |
| 48 | } |
| 49 | |
| 50 | .crumb-drop-target.active { |
| 51 | color: var(--accent, #5b7fff) !important; |
| 52 | text-decoration: underline; |
| 53 | text-underline-offset: 0.2rem; |
| 54 | } |
| 55 | |
| 56 | /* ---- drop animation: rises, spins, falls into folder ---- */ |
| 57 | /* --dx / --dy : current viewport X/Y of the item when released */ |
| 58 | /* --fall-x / --fall-y : viewport position of the target folder */ |
| 59 | @keyframes drag-rise-spin-fall { |
| 60 | 0% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(0deg); opacity: 1; } |
| 61 | 20% { transform: translate(var(--dx), calc(var(--dy) - 40px)) scale(1.05) rotate(60deg); opacity: 1; } |
| 62 | 60% { transform: translate(var(--fall-x), calc(var(--fall-y) - 20px)) scale(0.5) rotate(200deg); opacity: 0.9; } |
| 63 | 100% { transform: translate(var(--fall-x), var(--fall-y)) scale(0.05) rotate(360deg); opacity: 0; } |
| 64 | } |
| 65 | |
| 66 | .file-item.dropping { |
| 67 | animation: drag-rise-spin-fall 0.45s cubic-bezier(0.4, 0, 0.8, 1) forwards; |
| 68 | pointer-events: none; |
| 69 | } |
| 70 | |
| 71 | /* ---- bounce animation on the target folder ---- */ |
| 72 | @keyframes folder-bounce { |
| 73 | 0% { transform: translateY(0); } |
| 74 | 30% { transform: translateY(8px); } |
| 75 | 65% { transform: translateY(-4px); } |
| 76 | 85% { transform: translateY(2px); } |
| 77 | 100% { transform: translateY(0); } |
| 78 | } |
| 79 | |
| 80 | .file-item.folder-bounce { |
| 81 | animation: folder-bounce 0.4s ease-out forwards; |
| 82 | } |
| 83 | |
| 84 | /* ========================================================= |
| 85 | EXPANDED PREVIEW TILE |
| 86 | The real .file-item element scales up in place to fill the |
| 87 | viewport — no separate overlay. |
| 88 | ========================================================= */ |
| 89 | |
| 90 | /* Dimming backdrop behind the expanded tile */ |
| 91 | .preview-backdrop { |
| 92 | position: fixed; |
| 93 | inset: 0; |
| 94 | z-index: 9999; |
| 95 | background: rgba(8, 9, 14, 0.82); |
| 96 | opacity: 0; |
| 97 | transition: opacity 0.3s ease; |
| 98 | pointer-events: none; |
| 99 | } |
| 100 | |
| 101 | .preview-backdrop.visible { |
| 102 | opacity: 1; |
| 103 | pointer-events: all; |
| 104 | } |
| 105 | |
| 106 | /* .file-item in expanded preview state */ |
| 107 | .file-item.file-item--preview { |
| 108 | background: var(--surface, #1a1d27) !important; |
| 109 | border: 2px solid var(--preview-accent, var(--border, #2e3247)) !important; |
| 110 | border-radius: 12px !important; |
| 111 | cursor: default !important; |
| 112 | user-select: text; |
| 113 | display: flex !important; |
| 114 | flex-direction: column !important; |
| 115 | overflow: hidden; |
| 116 | padding: 0 !important; |
| 117 | gap: 0 !important; |
| 118 | z-index: 10000; |
| 119 | } |
| 120 | |
| 121 | .file-item.file-item--preview .icon { |
| 122 | width: 100% !important; |
| 123 | height: auto !important; |
| 124 | position: relative; |
| 125 | flex: 1; |
| 126 | min-height: 0; |
| 127 | display: flex !important; |
| 128 | align-items: center; |
| 129 | justify-content: center; |
| 130 | overflow: auto; |
| 131 | padding: 1rem; |
| 132 | box-sizing: border-box; |
| 133 | } |
| 134 | |
| 135 | .file-item.file-item--preview .icon .preview-expand-outline { |
| 136 | position: absolute; |
| 137 | left: 50%; |
| 138 | top: 50%; |
| 139 | width: min(72%, 640px); |
| 140 | height: min(72%, 640px); |
| 141 | transform: translate(-50%, -50%); |
| 142 | opacity: 0.18; |
| 143 | pointer-events: none; |
| 144 | z-index: 1; |
| 145 | filter: drop-shadow(0 0 10px var(--preview-accent, transparent)); |
| 146 | } |
| 147 | |
| 148 | .file-item.file-item--preview .icon .preview-expand-content { |
| 149 | position: relative; |
| 150 | z-index: 2; |
| 151 | width: 100%; |
| 152 | height: 100%; |
| 153 | display: flex; |
| 154 | align-items: center; |
| 155 | justify-content: center; |
| 156 | } |
| 157 | |
| 158 | /* Keep preview media constrained within the expanded icon */ |
| 159 | .file-item.file-item--preview .icon .preview-media { |
| 160 | max-width: 100%; |
| 161 | max-height: 100%; |
| 162 | width: auto; |
| 163 | height: auto; |
| 164 | object-fit: contain; |
| 165 | } |
| 166 | |
| 167 | .file-item.file-item--preview .icon .preview-frame { |
| 168 | width: 100%; |
| 169 | height: 100%; |
| 170 | border: none; |
| 171 | border-radius: 8px; |
| 172 | background: #fff; |
| 173 | } |
| 174 | |
| 175 | .file-item.file-item--preview .icon .preview-text { |
| 176 | width: 100%; |
| 177 | min-height: auto; |
| 178 | flex: 1; |
| 179 | align-self: stretch; |
| 180 | } |
| 181 | |
| 182 | .file-item.file-item--preview .icon .preview-audio { |
| 183 | width: min(640px, 95%); |
| 184 | } |
| 185 | |
| 186 | .file-item.file-item--preview .icon .preview-unsupported { |
| 187 | color: var(--text-muted); |
| 188 | font-size: 0.95rem; |
| 189 | max-width: 56ch; |
| 190 | text-align: center; |
| 191 | } |
| 192 | |
| 193 | /* Filename bar shown at top of expanded preview */ |
| 194 | .preview-expand-title { |
| 195 | padding: 0.7rem 3.5rem 0.7rem 1rem; |
| 196 | font-size: 0.95rem; |
| 197 | color: var(--text); |
| 198 | border-bottom: 1px solid var(--border); |
| 199 | white-space: nowrap; |
| 200 | overflow: hidden; |
| 201 | text-overflow: ellipsis; |
| 202 | flex-shrink: 0; |
| 203 | } |
| 204 | |
| 205 | /* Close button (×) — top-right corner */ |
| 206 | .preview-expand-close { |
| 207 | position: absolute; |
| 208 | top: 8px; |
| 209 | right: 8px; |
| 210 | width: 30px; |
| 211 | height: 30px; |
| 212 | background: rgba(20, 25, 40, 0.8); |
| 213 | color: #d6deef; |
| 214 | border: 1px solid rgba(255, 255, 255, 0.15); |
| 215 | border-radius: 50%; |
| 216 | cursor: pointer; |
| 217 | font-size: 1.2rem; |
| 218 | z-index: 10001; |
| 219 | display: flex; |
| 220 | align-items: center; |
| 221 | justify-content: center; |
| 222 | line-height: 1; |
| 223 | padding: 0; |
| 224 | transition: background 0.15s ease; |
| 225 | flex-shrink: 0; |
| 226 | } |
| 227 | |
| 228 | .preview-expand-close:hover { |
| 229 | background: rgba(255, 255, 255, 0.14); |
| 230 | } |
| 231 | |
| 232 | /* Download button — bottom-right corner */ |
| 233 | .preview-expand-download { |
| 234 | position: absolute; |
| 235 | bottom: 14px; |
| 236 | right: 14px; |
| 237 | background: var(--accent, #5b7fff); |
| 238 | color: #fff; |
| 239 | border: none; |
| 240 | border-radius: 6px; |
| 241 | padding: 7px 18px; |
| 242 | cursor: pointer; |
| 243 | font-size: 0.9rem; |
| 244 | z-index: 10001; |
| 245 | transition: opacity 0.15s ease; |
| 246 | flex-shrink: 0; |
| 247 | } |
| 248 | |
| 249 | .preview-expand-download:hover { |
| 250 | opacity: 0.85; |
| 251 | } |
| 252 | |
| 253 | /* Spinner shown inside the expanded tile while content is loading */ |
| 254 | .preview-loading-spinner { |
| 255 | width: 40px; |
| 256 | height: 40px; |
| 257 | border: 3px solid rgba(255, 255, 255, 0.12); |
| 258 | border-top-color: rgba(255, 255, 255, 0.7); |
| 259 | border-radius: 50%; |
| 260 | animation: preview-spin 0.7s linear infinite; |
| 261 | } |
| 262 | |
| 263 | @keyframes preview-spin { |
| 264 | to { transform: rotate(360deg); } |
| 265 | } |
| 266 | |
| 267 | .move-modal { |
| 268 | width: min(92vw, 760px); |
| 269 | max-height: min(86vh, 760px); |
| 270 | display: flex; |
| 271 | flex-direction: column; |
| 272 | gap: 0.6rem; |
| 273 | } |
| 274 | |
| 275 | .move-tree { |
| 276 | border: 1px solid var(--border, #2e3247); |
| 277 | border-radius: 10px; |
| 278 | padding: 0.55rem; |
| 279 | max-height: min(58vh, 480px); |
| 280 | overflow: auto; |
| 281 | background: var(--bg, #0f1117); |
| 282 | } |
| 283 | |
| 284 | .move-node { |
| 285 | margin-left: 0.25rem; |
| 286 | } |
| 287 | |
| 288 | .move-node-row { |
| 289 | display: flex; |
| 290 | align-items: center; |
| 291 | gap: 0.35rem; |
| 292 | margin: 0.14rem 0; |
| 293 | } |
| 294 | |
| 295 | .move-toggle { |
| 296 | width: 26px; |
| 297 | min-width: 26px; |
| 298 | height: 26px; |
| 299 | padding: 0; |
| 300 | display: inline-flex; |
| 301 | align-items: center; |
| 302 | justify-content: center; |
| 303 | } |
| 304 | |
| 305 | .move-node-label { |
| 306 | display: inline-flex; |
| 307 | align-items: center; |
| 308 | justify-content: flex-start; |
| 309 | min-height: 28px; |
| 310 | width: auto; |
| 311 | padding: 0.2rem 0.5rem; |
| 312 | background: transparent; |
| 313 | border: 1px solid transparent; |
| 314 | color: var(--text, #e8eaf0); |
| 315 | } |
| 316 | |
| 317 | .move-node-label:hover { |
| 318 | border-color: var(--border, #2e3247); |
| 319 | background: rgba(255, 255, 255, 0.03); |
| 320 | } |
| 321 | |
| 322 | .move-node-label.selected { |
| 323 | border-color: var(--accent, #5b7fff); |
| 324 | background: rgba(91, 127, 255, 0.12); |
| 325 | } |
| 326 | |
| 327 | .move-children { |
| 328 | margin-left: 1.2rem; |
| 329 | border-left: 1px dashed var(--border, #2e3247); |
| 330 | padding-left: 0.5rem; |
| 331 | } |
| 332 | |
| 333 | .move-empty { |
| 334 | color: var(--text-muted, #7880a0); |
| 335 | font-size: 0.85rem; |
| 336 | margin: 0.2rem 0 0.4rem 0.2rem; |
| 337 | } |