|
| 1 | +/* ============================================ |
| 2 | + draw-docgen.css — {{Draw:}} Tag Styles |
| 3 | + Excalidraw whiteboard integration |
| 4 | + Standalone — remove this file to disable |
| 5 | + ============================================ */ |
| 6 | + |
| 7 | +/* Card container */ |
| 8 | +.draw-docgen-card { |
| 9 | + border: 2px solid #6965db; |
| 10 | + border-radius: 12px; |
| 11 | + background: linear-gradient(135deg, rgba(105, 101, 219, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%); |
| 12 | + margin: 12px 0; |
| 13 | + overflow: hidden; |
| 14 | + transition: border-color 0.2s, box-shadow 0.2s; |
| 15 | +} |
| 16 | + |
| 17 | +.draw-docgen-card:hover { |
| 18 | + border-color: #7c78e8; |
| 19 | + box-shadow: 0 4px 20px rgba(105, 101, 219, 0.15); |
| 20 | +} |
| 21 | + |
| 22 | +/* Header */ |
| 23 | +.draw-docgen-header { |
| 24 | + display: flex; |
| 25 | + align-items: center; |
| 26 | + gap: 8px; |
| 27 | + padding: 10px 14px; |
| 28 | + background: linear-gradient(135deg, rgba(105, 101, 219, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%); |
| 29 | + border-bottom: 1px solid rgba(105, 101, 219, 0.2); |
| 30 | + flex-wrap: wrap; |
| 31 | +} |
| 32 | + |
| 33 | +.draw-docgen-icon { |
| 34 | + font-size: 1.2em; |
| 35 | +} |
| 36 | + |
| 37 | +.draw-docgen-label { |
| 38 | + font-weight: 600; |
| 39 | + font-size: 0.85rem; |
| 40 | + color: #6965db; |
| 41 | +} |
| 42 | + |
| 43 | +.draw-docgen-name { |
| 44 | + font-size: 0.7rem; |
| 45 | + padding: 2px 8px; |
| 46 | + border-radius: 10px; |
| 47 | + background: rgba(105, 101, 219, 0.15); |
| 48 | + color: #6965db; |
| 49 | + font-weight: 600; |
| 50 | + letter-spacing: 0.3px; |
| 51 | + max-width: 200px; |
| 52 | + overflow: hidden; |
| 53 | + text-overflow: ellipsis; |
| 54 | + white-space: nowrap; |
| 55 | +} |
| 56 | + |
| 57 | +.draw-docgen-actions { |
| 58 | + display: flex; |
| 59 | + align-items: center; |
| 60 | + gap: 6px; |
| 61 | + margin-left: auto; |
| 62 | + flex-wrap: wrap; |
| 63 | +} |
| 64 | + |
| 65 | +/* Buttons */ |
| 66 | +.draw-docgen-btn { |
| 67 | + border: none; |
| 68 | + background: rgba(105, 101, 219, 0.1); |
| 69 | + color: #6965db; |
| 70 | + padding: 4px 10px; |
| 71 | + border-radius: 6px; |
| 72 | + font-size: 0.78rem; |
| 73 | + cursor: pointer; |
| 74 | + transition: all 0.15s; |
| 75 | + white-space: nowrap; |
| 76 | + font-weight: 500; |
| 77 | +} |
| 78 | + |
| 79 | +.draw-docgen-btn:hover { |
| 80 | + background: rgba(105, 101, 219, 0.2); |
| 81 | + color: #5753c9; |
| 82 | +} |
| 83 | + |
| 84 | +.draw-docgen-open { |
| 85 | + background: #6965db; |
| 86 | + color: #fff; |
| 87 | +} |
| 88 | + |
| 89 | +.draw-docgen-open:hover { |
| 90 | + background: #5753c9; |
| 91 | + color: #fff; |
| 92 | +} |
| 93 | + |
| 94 | +/* Excalidraw iframe preview */ |
| 95 | +.draw-docgen-preview { |
| 96 | + padding: 0; |
| 97 | + position: relative; |
| 98 | + background: #fff; |
| 99 | + border-radius: 0 0 10px 10px; |
| 100 | + overflow: hidden; |
| 101 | +} |
| 102 | + |
| 103 | +.draw-docgen-iframe { |
| 104 | + width: 100%; |
| 105 | + height: 500px; |
| 106 | + border: none; |
| 107 | + display: block; |
| 108 | + background: #fff; |
| 109 | +} |
| 110 | + |
| 111 | +/* Fullscreen iframe */ |
| 112 | +.draw-docgen-iframe:fullscreen { |
| 113 | + width: 100vw; |
| 114 | + height: 100vh; |
| 115 | +} |
| 116 | + |
| 117 | +/* Info hint */ |
| 118 | +.draw-docgen-info { |
| 119 | + padding: 8px 14px; |
| 120 | + font-size: 0.78rem; |
| 121 | + color: #6b7280; |
| 122 | +} |
| 123 | + |
| 124 | +/* Status indicator */ |
| 125 | +.draw-docgen-status { |
| 126 | + font-size: 0.72rem; |
| 127 | + padding: 2px 8px; |
| 128 | + border-radius: 10px; |
| 129 | + background: rgba(16, 185, 129, 0.15); |
| 130 | + color: #059669; |
| 131 | + font-weight: 500; |
| 132 | +} |
| 133 | + |
| 134 | +/* Toolbar button */ |
| 135 | +.fmt-draw-btn { |
| 136 | + color: #6965db !important; |
| 137 | + font-weight: 600; |
| 138 | +} |
| 139 | + |
| 140 | +/* ─── Dark Mode ─── */ |
| 141 | + |
| 142 | +[data-theme="dark"] .draw-docgen-card, |
| 143 | +.dark-mode .draw-docgen-card { |
| 144 | + border-color: #5753c9; |
| 145 | + background: linear-gradient(135deg, rgba(105, 101, 219, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%); |
| 146 | +} |
| 147 | + |
| 148 | +[data-theme="dark"] .draw-docgen-header, |
| 149 | +.dark-mode .draw-docgen-header { |
| 150 | + background: linear-gradient(135deg, rgba(105, 101, 219, 0.18) 0%, rgba(99, 102, 241, 0.1) 100%); |
| 151 | + border-bottom-color: rgba(105, 101, 219, 0.3); |
| 152 | +} |
| 153 | + |
| 154 | +[data-theme="dark"] .draw-docgen-label, |
| 155 | +.dark-mode .draw-docgen-label { |
| 156 | + color: #a5a2f1; |
| 157 | +} |
| 158 | + |
| 159 | +[data-theme="dark"] .draw-docgen-name, |
| 160 | +.dark-mode .draw-docgen-name { |
| 161 | + background: rgba(165, 162, 241, 0.2); |
| 162 | + color: #a5a2f1; |
| 163 | +} |
| 164 | + |
| 165 | +[data-theme="dark"] .draw-docgen-btn, |
| 166 | +.dark-mode .draw-docgen-btn { |
| 167 | + background: rgba(165, 162, 241, 0.15); |
| 168 | + color: #a5a2f1; |
| 169 | +} |
| 170 | + |
| 171 | +[data-theme="dark"] .draw-docgen-preview, |
| 172 | +.dark-mode .draw-docgen-preview { |
| 173 | + background: #121212; |
| 174 | +} |
| 175 | + |
| 176 | +[data-theme="dark"] .draw-docgen-info, |
| 177 | +.dark-mode .draw-docgen-info { |
| 178 | + color: #9ca3af; |
| 179 | +} |
| 180 | + |
| 181 | +[data-theme="dark"] .draw-docgen-status, |
| 182 | +.dark-mode .draw-docgen-status { |
| 183 | + background: rgba(52, 211, 153, 0.2); |
| 184 | + color: #34d399; |
| 185 | +} |
| 186 | + |
| 187 | +/* ─── Tool Pills (Excalidraw / Mermaid) ─── */ |
| 188 | + |
| 189 | +.draw-tool-pills { |
| 190 | + display: flex; |
| 191 | + gap: 4px; |
| 192 | + padding: 8px 14px; |
| 193 | + background: rgba(105, 101, 219, 0.04); |
| 194 | + border-bottom: 1px solid rgba(105, 101, 219, 0.1); |
| 195 | +} |
| 196 | + |
| 197 | +.draw-tool-pill { |
| 198 | + border: 1px solid rgba(105, 101, 219, 0.2); |
| 199 | + background: transparent; |
| 200 | + color: #6b7280; |
| 201 | + padding: 4px 12px; |
| 202 | + border-radius: 16px; |
| 203 | + font-size: 0.72rem; |
| 204 | + cursor: pointer; |
| 205 | + transition: all 0.15s; |
| 206 | + font-weight: 500; |
| 207 | +} |
| 208 | + |
| 209 | +.draw-tool-pill:hover { |
| 210 | + border-color: #6965db; |
| 211 | + color: #6965db; |
| 212 | +} |
| 213 | + |
| 214 | +.draw-tool-pill.active { |
| 215 | + background: #6965db; |
| 216 | + color: #fff; |
| 217 | + border-color: #6965db; |
| 218 | +} |
| 219 | + |
| 220 | +/* ─── Mermaid Editor ─── */ |
| 221 | + |
| 222 | +.draw-mermaid-editor { |
| 223 | + padding: 10px 14px; |
| 224 | + border-top: 1px solid rgba(105, 101, 219, 0.08); |
| 225 | +} |
| 226 | + |
| 227 | +.draw-mermaid-input { |
| 228 | + width: 100%; |
| 229 | + border: 1px solid rgba(105, 101, 219, 0.2); |
| 230 | + border-radius: 8px; |
| 231 | + padding: 10px 12px; |
| 232 | + font-size: 0.82rem; |
| 233 | + font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; |
| 234 | + line-height: 1.5; |
| 235 | + resize: vertical; |
| 236 | + background: rgba(255, 255, 255, 0.6); |
| 237 | + color: inherit; |
| 238 | + transition: border-color 0.2s; |
| 239 | + min-height: 80px; |
| 240 | + tab-size: 2; |
| 241 | +} |
| 242 | + |
| 243 | +.draw-mermaid-input:focus { |
| 244 | + outline: none; |
| 245 | + border-color: #6965db; |
| 246 | + box-shadow: 0 0 0 3px rgba(105, 101, 219, 0.1); |
| 247 | +} |
| 248 | + |
| 249 | +.draw-mermaid-actions { |
| 250 | + display: flex; |
| 251 | + gap: 6px; |
| 252 | + margin-top: 8px; |
| 253 | +} |
| 254 | + |
| 255 | +.draw-mermaid-preview { |
| 256 | + margin-top: 10px; |
| 257 | + border-radius: 8px; |
| 258 | + overflow: hidden; |
| 259 | +} |
| 260 | + |
| 261 | +.draw-mermaid-preview .mermaid { |
| 262 | + display: flex; |
| 263 | + justify-content: center; |
| 264 | + padding: 12px; |
| 265 | + background: rgba(105, 101, 219, 0.03); |
| 266 | + border: 1px solid rgba(105, 101, 219, 0.1); |
| 267 | + border-radius: 8px; |
| 268 | +} |
| 269 | + |
| 270 | +.draw-mermaid-preview .mermaid svg { |
| 271 | + max-width: 100%; |
| 272 | + height: auto; |
| 273 | +} |
| 274 | + |
| 275 | +/* ─── Dark Mode: Tool Pills ─── */ |
| 276 | + |
| 277 | +[data-theme="dark"] .draw-tool-pills, |
| 278 | +.dark-mode .draw-tool-pills { |
| 279 | + background: rgba(105, 101, 219, 0.06); |
| 280 | + border-bottom-color: rgba(105, 101, 219, 0.15); |
| 281 | +} |
| 282 | + |
| 283 | +[data-theme="dark"] .draw-tool-pill, |
| 284 | +.dark-mode .draw-tool-pill { |
| 285 | + border-color: rgba(165, 162, 241, 0.3); |
| 286 | + color: #9ca3af; |
| 287 | +} |
| 288 | + |
| 289 | +[data-theme="dark"] .draw-tool-pill.active, |
| 290 | +.dark-mode .draw-tool-pill.active { |
| 291 | + background: #6965db; |
| 292 | + color: #fff; |
| 293 | + border-color: #6965db; |
| 294 | +} |
| 295 | + |
| 296 | +/* ─── Dark Mode: Mermaid Editor ─── */ |
| 297 | + |
| 298 | +[data-theme="dark"] .draw-mermaid-input, |
| 299 | +.dark-mode .draw-mermaid-input { |
| 300 | + background: rgba(0, 0, 0, 0.3); |
| 301 | + border-color: rgba(165, 162, 241, 0.3); |
| 302 | +} |
| 303 | + |
| 304 | +[data-theme="dark"] .draw-mermaid-preview .mermaid, |
| 305 | +.dark-mode .draw-mermaid-preview .mermaid { |
| 306 | + background: rgba(105, 101, 219, 0.06); |
| 307 | + border-color: rgba(105, 101, 219, 0.15); |
| 308 | +} |
0 commit comments