| 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 | /* ---- drop animation: rises, spins, falls into folder ---- */ |
| 19 | /* --dx / --dy : current viewport X/Y of the item when released */ |
| 20 | /* --fall-x / --fall-y : viewport position of the target folder */ |
| 21 | @keyframes drag-rise-spin-fall { |
| 22 | 0% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(0deg); opacity: 1; } |
| 23 | 20% { transform: translate(var(--dx), calc(var(--dy) - 40px)) scale(1.05) rotate(60deg); opacity: 1; } |
| 24 | 60% { transform: translate(var(--fall-x), calc(var(--fall-y) - 20px)) scale(0.5) rotate(200deg); opacity: 0.9; } |
| 25 | 100% { transform: translate(var(--fall-x), var(--fall-y)) scale(0.05) rotate(360deg); opacity: 0; } |
| 26 | } |
| 27 | |
| 28 | .file-item.dropping { |
| 29 | animation: drag-rise-spin-fall 0.45s cubic-bezier(0.4, 0, 0.8, 1) forwards; |
| 30 | pointer-events: none; |
| 31 | } |
| 32 | |
| 33 | /* ---- bounce animation on the target folder ---- */ |
| 34 | @keyframes folder-bounce { |
| 35 | 0% { transform: translateY(0); } |
| 36 | 30% { transform: translateY(8px); } |
| 37 | 65% { transform: translateY(-4px); } |
| 38 | 85% { transform: translateY(2px); } |
| 39 | 100% { transform: translateY(0); } |
| 40 | } |
| 41 | |
| 42 | .file-item.folder-bounce { |
| 43 | animation: folder-bounce 0.4s ease-out forwards; |
| 44 | } |
| 45 | |
| 46 | /* ========================================================= |
| 47 | EXPANDED PREVIEW TILE |
| 48 | The real .file-item element scales up in place to fill the |
| 49 | viewport — no separate overlay. |
| 50 | ========================================================= */ |
| 51 | |
| 52 | /* Dimming backdrop behind the expanded tile */ |
| 53 | .preview-backdrop { |
| 54 | position: fixed; |
| 55 | inset: 0; |
| 56 | z-index: 9999; |
| 57 | background: rgba(8, 9, 14, 0.82); |
| 58 | opacity: 0; |
| 59 | transition: opacity 0.3s ease; |
| 60 | pointer-events: none; |
| 61 | } |
| 62 | |
| 63 | .preview-backdrop.visible { |
| 64 | opacity: 1; |
| 65 | pointer-events: all; |
| 66 | } |
| 67 | |
| 68 | /* .file-item in expanded preview state */ |
| 69 | .file-item.file-item--preview { |
| 70 | background: var(--surface, #1a1d27) !important; |
| 71 | border: 1px solid var(--border, #2e3247) !important; |
| 72 | border-radius: 12px !important; |
| 73 | cursor: default !important; |
| 74 | user-select: text; |
| 75 | display: flex !important; |
| 76 | flex-direction: column !important; |
| 77 | overflow: hidden; |
| 78 | padding: 0 !important; |
| 79 | gap: 0 !important; |
| 80 | z-index: 10000; |
| 81 | } |
| 82 | |
| 83 | .file-item.file-item--preview .icon { |
| 84 | width: 100% !important; |
| 85 | height: auto !important; |
| 86 | flex: 1; |
| 87 | min-height: 0; |
| 88 | display: flex !important; |
| 89 | align-items: center; |
| 90 | justify-content: center; |
| 91 | overflow: auto; |
| 92 | padding: 1rem; |
| 93 | box-sizing: border-box; |
| 94 | } |
| 95 | |
| 96 | /* Keep preview media constrained within the expanded icon */ |
| 97 | .file-item.file-item--preview .icon .preview-media { |
| 98 | max-width: 100%; |
| 99 | max-height: 100%; |
| 100 | width: auto; |
| 101 | height: auto; |
| 102 | object-fit: contain; |
| 103 | } |
| 104 | |
| 105 | .file-item.file-item--preview .icon .preview-frame { |
| 106 | width: 100%; |
| 107 | height: 100%; |
| 108 | border: none; |
| 109 | border-radius: 8px; |
| 110 | background: #fff; |
| 111 | } |
| 112 | |
| 113 | .file-item.file-item--preview .icon .preview-text { |
| 114 | width: 100%; |
| 115 | min-height: auto; |
| 116 | flex: 1; |
| 117 | align-self: stretch; |
| 118 | } |
| 119 | |
| 120 | .file-item.file-item--preview .icon .preview-audio { |
| 121 | width: min(640px, 95%); |
| 122 | } |
| 123 | |
| 124 | .file-item.file-item--preview .icon .preview-unsupported { |
| 125 | color: var(--text-muted); |
| 126 | font-size: 0.95rem; |
| 127 | max-width: 56ch; |
| 128 | text-align: center; |
| 129 | } |
| 130 | |
| 131 | /* Filename bar shown at top of expanded preview */ |
| 132 | .preview-expand-title { |
| 133 | padding: 0.7rem 3.5rem 0.7rem 1rem; |
| 134 | font-size: 0.95rem; |
| 135 | color: var(--text); |
| 136 | border-bottom: 1px solid var(--border); |
| 137 | white-space: nowrap; |
| 138 | overflow: hidden; |
| 139 | text-overflow: ellipsis; |
| 140 | flex-shrink: 0; |
| 141 | } |
| 142 | |
| 143 | /* Close button (×) — top-right corner */ |
| 144 | .preview-expand-close { |
| 145 | position: absolute; |
| 146 | top: 8px; |
| 147 | right: 8px; |
| 148 | width: 30px; |
| 149 | height: 30px; |
| 150 | background: rgba(20, 25, 40, 0.8); |
| 151 | color: #d6deef; |
| 152 | border: 1px solid rgba(255, 255, 255, 0.15); |
| 153 | border-radius: 50%; |
| 154 | cursor: pointer; |
| 155 | font-size: 1.2rem; |
| 156 | z-index: 10001; |
| 157 | display: flex; |
| 158 | align-items: center; |
| 159 | justify-content: center; |
| 160 | line-height: 1; |
| 161 | padding: 0; |
| 162 | transition: background 0.15s ease; |
| 163 | flex-shrink: 0; |
| 164 | } |
| 165 | |
| 166 | .preview-expand-close:hover { |
| 167 | background: rgba(255, 255, 255, 0.14); |
| 168 | } |
| 169 | |
| 170 | /* Download button — bottom-right corner */ |
| 171 | .preview-expand-download { |
| 172 | position: absolute; |
| 173 | bottom: 14px; |
| 174 | right: 14px; |
| 175 | background: var(--accent, #5b7fff); |
| 176 | color: #fff; |
| 177 | border: none; |
| 178 | border-radius: 6px; |
| 179 | padding: 7px 18px; |
| 180 | cursor: pointer; |
| 181 | font-size: 0.9rem; |
| 182 | z-index: 10001; |
| 183 | transition: opacity 0.15s ease; |
| 184 | flex-shrink: 0; |
| 185 | } |
| 186 | |
| 187 | .preview-expand-download:hover { |
| 188 | opacity: 0.85; |
| 189 | } |