| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  | import { css, cssManager } from '@design.estate/dees-element'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export const previewStyles = [ | 
					
						
							|  |  |  |   cssManager.defaultStyles, | 
					
						
							|  |  |  |   css`
 | 
					
						
							|  |  |  |     :host { | 
					
						
							|  |  |  |       display: inline-block; | 
					
						
							|  |  |  |       position: relative; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-container { | 
					
						
							|  |  |  |       position: relative; | 
					
						
							|  |  |  |       width: 200px; | 
					
						
							|  |  |  |       height: 260px; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       background: ${cssManager.bdTheme('hsl(0 0% 98%)', 'hsl(215 20% 14%)')}; | 
					
						
							|  |  |  |       border-radius: 4px; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |       overflow: hidden; | 
					
						
							|  |  |  |       transition: transform 0.2s ease, box-shadow 0.2s ease; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       box-shadow: 0 1px 3px ${cssManager.bdTheme('rgba(0, 0, 0, 0.12)', 'rgba(0, 0, 0, 0.24)')}; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-container.clickable { | 
					
						
							|  |  |  |       cursor: pointer; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-container.clickable:hover { | 
					
						
							|  |  |  |       transform: translateY(-2px); | 
					
						
							|  |  |  |       box-shadow: 0 8px 24px ${cssManager.bdTheme('rgba(0, 0, 0, 0.12)', 'rgba(0, 0, 0, 0.3)')}; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-container.clickable:hover .preview-overlay { | 
					
						
							|  |  |  |       opacity: 1; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-stack { | 
					
						
							|  |  |  |       position: relative; | 
					
						
							|  |  |  |       width: 100%; | 
					
						
							|  |  |  |       height: 100%; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:36:04 +00:00
										 |  |  |       display: flex; | 
					
						
							|  |  |  |       align-items: center; | 
					
						
							|  |  |  |       justify-content: center; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |       box-sizing: border-box; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       overflow: hidden; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-stack.non-a4 { | 
					
						
							|  |  |  |       padding: 12px; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-canvas { | 
					
						
							| 
									
										
										
										
											2025-09-20 21:36:04 +00:00
										 |  |  |       position: relative; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |       background: white; | 
					
						
							|  |  |  |       display: block; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:36:04 +00:00
										 |  |  |       max-width: 100%; | 
					
						
							|  |  |  |       max-height: 100%; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       width: auto; | 
					
						
							|  |  |  |       height: auto; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:36:04 +00:00
										 |  |  |       object-fit: contain; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       image-rendering: auto; | 
					
						
							|  |  |  |       -webkit-font-smoothing: antialiased; | 
					
						
							|  |  |  |       box-shadow: 0 1px 3px ${cssManager.bdTheme('rgba(0, 0, 0, 0.1)', 'rgba(0, 0, 0, 0.3)')}; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .non-a4 .preview-canvas { | 
					
						
							|  |  |  |       border: 1px solid ${cssManager.bdTheme('hsl(214 31% 92%)', 'hsl(217 25% 24%)')}; | 
					
						
							|  |  |  |       border-radius: 4px; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-info { | 
					
						
							|  |  |  |       position: absolute; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       bottom: 8px; | 
					
						
							|  |  |  |       left: 8px; | 
					
						
							|  |  |  |       right: 8px; | 
					
						
							|  |  |  |       padding: 6px 10px; | 
					
						
							|  |  |  |       background: ${cssManager.bdTheme('hsl(0 0% 100% / 0.92)', 'hsl(215 20% 12% / 0.92)')}; | 
					
						
							|  |  |  |       border-radius: 6px; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |       display: flex; | 
					
						
							|  |  |  |       align-items: center; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       gap: 6px; | 
					
						
							|  |  |  |       font-size: 12px; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |       color: ${cssManager.bdTheme('hsl(215 16% 45%)', 'hsl(215 16% 75%)')}; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       backdrop-filter: blur(12px); | 
					
						
							|  |  |  |       box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |       z-index: 10; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-info dees-icon { | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       font-size: 13px; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |       color: ${cssManager.bdTheme('hsl(217 91% 60%)', 'hsl(213 93% 68%)')}; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-pages { | 
					
						
							|  |  |  |       font-weight: 500; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       font-size: 11px; | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-overlay { | 
					
						
							|  |  |  |       position: absolute; | 
					
						
							|  |  |  |       top: 0; | 
					
						
							|  |  |  |       left: 0; | 
					
						
							|  |  |  |       right: 0; | 
					
						
							|  |  |  |       bottom: 0; | 
					
						
							|  |  |  |       background: ${cssManager.bdTheme('rgba(0, 0, 0, 0.7)', 'rgba(0, 0, 0, 0.8)')}; | 
					
						
							|  |  |  |       display: flex; | 
					
						
							|  |  |  |       flex-direction: column; | 
					
						
							|  |  |  |       align-items: center; | 
					
						
							|  |  |  |       justify-content: center; | 
					
						
							|  |  |  |       gap: 8px; | 
					
						
							|  |  |  |       opacity: 0; | 
					
						
							|  |  |  |       transition: opacity 0.2s ease; | 
					
						
							|  |  |  |       z-index: 20; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-overlay dees-icon { | 
					
						
							|  |  |  |       font-size: 24px; | 
					
						
							|  |  |  |       color: white; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-overlay span { | 
					
						
							|  |  |  |       font-size: 14px; | 
					
						
							|  |  |  |       font-weight: 500; | 
					
						
							|  |  |  |       color: white; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-loading, | 
					
						
							|  |  |  |     .preview-error { | 
					
						
							|  |  |  |       position: absolute; | 
					
						
							|  |  |  |       top: 0; | 
					
						
							|  |  |  |       left: 0; | 
					
						
							|  |  |  |       right: 0; | 
					
						
							|  |  |  |       bottom: 0; | 
					
						
							|  |  |  |       display: flex; | 
					
						
							|  |  |  |       flex-direction: column; | 
					
						
							|  |  |  |       align-items: center; | 
					
						
							|  |  |  |       justify-content: center; | 
					
						
							|  |  |  |       gap: 12px; | 
					
						
							|  |  |  |       color: ${cssManager.bdTheme('hsl(215 16% 45%)', 'hsl(215 16% 75%)')}; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-loading { | 
					
						
							|  |  |  |       background: ${cssManager.bdTheme('hsl(0 0% 99%)', 'hsl(215 20% 14%)')}; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-error { | 
					
						
							|  |  |  |       background: ${cssManager.bdTheme('hsl(0 72% 98%)', 'hsl(0 62% 20%)')}; | 
					
						
							|  |  |  |       color: ${cssManager.bdTheme('hsl(0 72% 40%)', 'hsl(0 70% 68%)')}; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-spinner { | 
					
						
							|  |  |  |       width: 24px; | 
					
						
							|  |  |  |       height: 24px; | 
					
						
							|  |  |  |       border-radius: 50%; | 
					
						
							|  |  |  |       border: 2px solid ${cssManager.bdTheme('hsl(214 31% 86%)', 'hsl(217 25% 28%)')}; | 
					
						
							|  |  |  |       border-top-color: ${cssManager.bdTheme('hsl(217 91% 60%)', 'hsl(213 93% 68%)')}; | 
					
						
							|  |  |  |       animation: spin 0.8s linear infinite; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @keyframes spin { | 
					
						
							|  |  |  |       to { | 
					
						
							|  |  |  |         transform: rotate(360deg); | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-text { | 
					
						
							|  |  |  |       font-size: 13px; | 
					
						
							|  |  |  |       font-weight: 500; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     .preview-error dees-icon { | 
					
						
							|  |  |  |       font-size: 32px; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-09-20 21:36:04 +00:00
										 |  |  |     .preview-page-indicator { | 
					
						
							|  |  |  |       position: absolute; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       top: 8px; | 
					
						
							|  |  |  |       left: 8px; | 
					
						
							|  |  |  |       right: 8px; | 
					
						
							|  |  |  |       padding: 5px 8px; | 
					
						
							|  |  |  |       background: ${cssManager.bdTheme('hsl(0 0% 0% / 0.7)', 'hsl(0 0% 100% / 0.9)')}; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:36:04 +00:00
										 |  |  |       color: ${cssManager.bdTheme('white', 'hsl(215 20% 12%)')}; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       border-radius: 4px; | 
					
						
							|  |  |  |       font-size: 11px; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:36:04 +00:00
										 |  |  |       font-weight: 600; | 
					
						
							|  |  |  |       text-align: center; | 
					
						
							| 
									
										
										
										
											2025-09-20 21:46:52 +00:00
										 |  |  |       backdrop-filter: blur(12px); | 
					
						
							| 
									
										
										
										
											2025-09-20 21:36:04 +00:00
										 |  |  |       z-index: 15; | 
					
						
							|  |  |  |       pointer-events: none; | 
					
						
							|  |  |  |       animation: fadeIn 0.2s ease; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @keyframes fadeIn { | 
					
						
							|  |  |  |       from { | 
					
						
							|  |  |  |         opacity: 0; | 
					
						
							|  |  |  |         transform: translateY(-4px); | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |       to { | 
					
						
							|  |  |  |         opacity: 1; | 
					
						
							|  |  |  |         transform: translateY(0); | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-09-20 11:42:22 +00:00
										 |  |  |     /* Responsive sizes */ | 
					
						
							|  |  |  |     :host([size="small"]) .preview-container { | 
					
						
							|  |  |  |       width: 150px; | 
					
						
							|  |  |  |       height: 195px; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     :host([size="large"]) .preview-container { | 
					
						
							|  |  |  |       width: 250px; | 
					
						
							|  |  |  |       height: 325px; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /* Grid optimizations */ | 
					
						
							|  |  |  |     :host([grid-mode]) .preview-container { | 
					
						
							|  |  |  |       will-change: auto; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     :host([grid-mode]) .preview-canvas { | 
					
						
							|  |  |  |       image-rendering: -webkit-optimize-contrast; | 
					
						
							|  |  |  |       image-rendering: crisp-edges; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   `,
 | 
					
						
							|  |  |  | ]; |