UNPKG

@mindfiredigital/page-builder

Version:
2,249 lines (1,928 loc) 40 kB
/* Import Google Fonts for better typography */ @import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"); /* General Styles */ body, html { margin: 0; padding: 0; font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; display: flex; flex-direction: column; background-color: #f8fafc; overflow: hidden; color: #334155; } /* Navbar for preview buttons */ #preview-navbar { background-color: #ffffff; display: flex; justify-content: space-between; align-items: center; padding: 0 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); border-bottom: 1px solid #e2e8f0; } .preview-btn { border: 1px solid #ffffff; padding: 6px 8px; cursor: pointer; background-color: #ffffff; color: #64748b; transition: all 0.2s ease; } .preview-btn:hover { background-color: #f1f5f9; border-color: #cbd5e1; color: #475569; } .preview-btn:active { background-color: #e2e8f0; } /* App Container */ #app { display: flex; background-color: #f8fafc; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); overflow: hidden; } /* Sidebar (Left) */ #sidebar { width: 180px; flex-shrink: 0; background-color: #ffffff; padding: 16px 12px; overflow-y: auto; border-right: 1px solid #e2e8f0; } #sidebar h3 { text-align: center; font-size: 16px; font-weight: 600; margin-bottom: 20px; color: #1e293b; } /* Canvas Area */ #canvas { width: 100%; flex-grow: 1; min-width: 0; background-color: #ffffff; overflow: auto; box-sizing: border-box; height: calc(100vh - 40px); background-image: linear-gradient(to right, #f1f5f9 1px, transparent 1px); } #canvas.grid-layout-active { display: block; height: calc(100vh - 40px); } #canvas.preview-printable { max-width: 869px; max-height: 1123px; margin-left: auto; margin-right: auto; background-color: #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); border-radius: 4px; position: relative; padding-top: 75px; padding-left: 75px; padding-right: 75px; overflow: auto; } /* L-shaped corner margin indicators - Word style */ #canvas.preview-printable { position: relative; } #canvas.preview-printable::before { content: ''; position: absolute; top: 75px; left: 75px; width: 20px; height: 20px; border-left: 1.5px solid #94a3b8; border-top: 1.5px solid #94a3b8; pointer-events: none; z-index: 1; } #canvas.preview-printable::after { content: ''; position: absolute; top: 75px; right: 75px; width: 20px; height: 20px; border-right: 1.5px solid #94a3b8; border-top: 1.5px solid #94a3b8; pointer-events: none; z-index: 1; } /* Add bottom corners using additional styling */ #canvas.preview-printable { background-image: /* Bottom-left L */ linear-gradient(to right, #94a3b8 1.5px, transparent 1.5px), linear-gradient(to bottom, #94a3b8 1.5px, transparent 1.5px), /* Bottom-right L */ linear-gradient(to left, #94a3b8 1.5px, transparent 1.5px), linear-gradient(to bottom, #94a3b8 1.5px, transparent 1.5px); background-size: 20px 1.5px, 1.5px 20px, 20px 1.5px, 1.5px 20px; background-position: 75px calc(100% - 75px), 75px calc(100% - 75px), calc(100% - 75px) calc(100% - 75px), calc(100% - 75px) calc(100% - 75px); background-repeat: no-repeat; } #canvas.preview-printable.grid-layout-active { max-width: 100%; /* Keep grid mode full width */ margin: 0; box-shadow: none; border-radius: 0; padding: 0; } #customization { position: relative; display: none; right: 0; width: 300px; background-color: #ffffff; box-shadow: -1px 0 3px rgba(0, 0, 0, 0.1); padding: 24px; border-left: 1px solid #e2e8f0; overflow: auto; color: #334155; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; padding: 0; font-size: 13px; line-height: 1.5; } /* Draggable Items */ .draggable { text-align: center; cursor: grab; transition: all 0.2s ease; box-sizing: border-box; width: calc(50% - 6px); display: inline-block; margin-right: 8px; margin-bottom: 12px; padding: 12px 8px; font-size: 11px; color: #64748b; vertical-align: top; border-radius: 6px; background-color: #f8fafc; border: 1px solid #f1f5f9; min-height: 70px; /* Center content vertically */ display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; } .draggable:nth-child(2n) { margin-right: 4px; } /* Add this new class for the category container */ .category { display: block; width: 100%; margin-bottom: 20px; } .draggable:hover { background-color: #f1f5f9; border-color: #e2e8f0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); transform: translateY(-1px); } .draggable:active { cursor: grabbing; } /* Component Styles */ .component { padding: 16px; border: 1px solid #e2e8f0; background-color: #ffffff; border-radius: 6px; cursor: pointer; /* position: absolute; */ position: relative; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .component:hover { border-color: #94a3b8; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .text-component { font-size: 16px; color: #334155; line-height: 1.5; } .button-component { padding: 10px 20px; background-color: #3b82f6; color: black; border: none; cursor: pointer; transition: all 0.2s ease; font-weight: 500; font-size: 14px; } .button-component:hover { transform: translateY(-1px); } .header-component { font-size: 24px; font-weight: 700; color: #1e293b; margin: 0; } .image-component { max-width: 100%; border-radius: 6px; position: relative; display: flex; justify-content: center; background-color: #f8fafc; border: 2px dashed #cbd5e1; overflow: hidden; } /* Responsive Preview Modes */ .preview-desktop { max-width: 100%; transition: all 0.5s ease; } .preview-tablet { max-width: 100%; max-width: 768px; margin-left: auto; margin-right: auto; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); transition: all 0.5s ease; overflow-x: hidden; } @media (max-width: 768px) { .preview-tablet { width: 100%; } } .canvas { overflow-x: hidden; } .preview-mobile { max-width: 375px; margin-left: auto; margin-right: auto; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); transition: all 0.5s ease; } .table-cell-content { box-sizing: border-box; padding: 8px 12px; width: 100%; height: 100%; } /* Utility Classes */ .hidden { display: none; } /* Editable components on the canvas */ .editable-component { border: 1px dashed #cbd5e1; cursor: text; position: relative; pointer-events: auto; background-color: #ffffff; transition: all 0.2s ease; } .component-text-content { display: block; height: 100%; width: 100%; box-sizing: border-box; } .component-resizer { overflow: hidden !important; resize: both !important; } /* Container Component */ .container-component { border: 1px dashed #cbd5e1; position: relative; pointer-events: auto; box-sizing: border-box; border-radius: 4px; min-height: 100px; min-width: 100px; } .container-component:hover { border-color: #3b82f6; box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4); } .container-component.container-grid-active { display: block; } .container-highlight { border-color: #3b82f6 !important; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important; } /* Draggable Icons */ .component-icon { width: 28px; height: 28px; object-fit: contain; transition: opacity 0.2s ease; opacity: 0.7; } .draggable:hover .component-icon { opacity: 1; } /* Custom component letter styling */ .custom-component-letter { width: 28px; height: 28px; background-color: #3b82f6; color: white; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; } /* Drag text styling */ .drag-text { font-size: 10px; font-weight: 500; color: #6b7280; margin-top: 4px; line-height: 1.2; text-align: center; } .nav-icon { width: 25px; height: 25px; object-fit: contain; } .left-buttons, .right-buttons { display: flex; gap: 8px; } .center-text { font-size: 18px; font-weight: 600; color: #1e293b; text-align: center; flex-grow: 1; display: flex; justify-content: center; align-items: center; } .component-label, .column-label { position: absolute; top: -2px; left: 6px; background-color: #1e293b; color: white; font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 4px; display: none; z-index: 9000; pointer-events: none; pointer-events: none; } .column:hover .column-label { display: block; } /* Upload button styling */ .upload-btn { position: absolute; top: 8px; left: 8px; background-color: rgba(255, 255, 255, 0.9); color: #64748b; border: 1px solid #e2e8f0; padding: 6px; border-radius: 4px; cursor: pointer; font-size: 14px; display: none; z-index: 10; transition: all 0.2s ease; } .image-component:hover .upload-btn { display: block; } .upload-btn:hover { background-color: #f1f5f9; color: #475569; } /* Notification styling */ .notification { position: fixed; bottom: 20px; right: 20px; background-color: #10b981; color: white; padding: 12px 20px; border-radius: 6px; font-size: 14px; font-weight: 500; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); opacity: 0; } .notification.visible { opacity: 1; } .notification.hidden { opacity: 0; } /* Dialog styling */ .dialog { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; } .dialog.hidden { display: none; } .dialog-content { background: white; padding: 24px; border-radius: 8px; text-align: center; width: 350px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); } .dialog-btn { margin: 8px 6px; padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 14px; } #dialog-yes { background-color: #ef4444; color: white; } #dialog-yes:hover { background-color: #dc2626; } #dialog-no { background-color: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; } #dialog-no:hover { background-color: #e2e8f0; } /* Control panel that appears on hover */ .component-controls { display: none; position: absolute; top: 4px; right: 4px; align-items: center; z-index: 9000; cursor: pointer; background-color: rgba(255, 255, 255, 0.95); border-radius: 4px; padding: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .component-controls img { pointer-events: auto; } .delete-icon { width: 14px; height: 14px; cursor: pointer; transition: all 0.2s ease; opacity: 0.7; } .delete-icon:hover { opacity: 1; transform: scale(1.1); } /* Layers mode toggle styling */ .layers-mode-toggle { display: flex; background-color: #f8fafc; border-bottom: 1px solid #e2e8f0; padding: 0; margin: 0; } .layers-mode-toggle button { flex: 1; padding: 10px 12px; background-color: transparent; color: #64748b; border: none; cursor: pointer; font-size: 12px; transition: all 0.2s ease; border-right: 1px solid #e2e8f0; } .layers-mode-toggle button:last-child { border-right: none; } .layers-mode-toggle button:hover { background-color: #f1f5f9; color: #334155; } .layers-mode-toggle button.active { background-color: #3b82f6; color: #ffffff; } #component-name { background-color: #f8fafc; color: #334155; padding: 12px 14px; margin: 0; border-bottom: 1px solid #e2e8f0; font-weight: 600; font-size: 13px; border-radius: 0; } #component-name span { font-size: 11px; color: #64748b; font-weight: 400; } /* Main controls container */ #controls { padding: 0; gap: 0; background-color: #ffffff; height: calc(100vh - 139px); overflow: auto; } /* Control wrapper styling - more compact */ .control-wrapper { display: flex; flex-direction: column; margin: 0; gap: 6px; padding: 10px 14px; background-color: transparent; border: none; border-bottom: 1px solid #e2e8f0; border-radius: 0; } .control-wrapper:last-child { border-bottom: none; } .control-wrapper label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; } /* Input field styling */ .control-wrapper input[type="number"], .control-wrapper input[type="text"] { padding: 8px 10px; font-size: 13px; border: 1px solid #cbd5e1; border-radius: 3px; background-color: #ffffff; color: #334155; transition: all 0.2s ease; } .control-wrapper input[type="number"]:focus, .control-wrapper input[type="text"]:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); } .control-wrapper select { padding: 8px 10px; font-size: 13px; border: 1px solid #cbd5e1; border-radius: 3px; background-color: #ffffff; color: #334155; transition: all 0.2s ease; } .control-wrapper select:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); } /* Input wrapper for inline controls */ .input-wrapper { display: flex; align-items: center; gap: 8px; } .input-wrapper input[type="number"] { width: 60px; padding: 6px 8px; font-size: 12px; } .input-wrapper select { padding: 6px 8px; font-size: 12px; min-width: 50px; } /* Color input styling - Made rectangular */ .control-wrapper input[type="color"] { width: 32px; height: 32px; border: 1px solid #ffff; cursor: pointer; border-radius: 4px; padding: 0; margin: 0; background-color: transparent; } .control-wrapper input[type="color"]:hover { border-color: #94a3b8; } /* Color value display */ #color-value { font-size: 12px; border: 1px solid #cbd5e1; border-radius: 3px; color: #334155; padding: 4px 6px; background-color: #f8fafc; font-family: 'Courier New', monospace; width: 70px; } /* Close button styling */ .close-button { position: fixed; top: 3.5rem; right: 18.3rem; background-color: red; color: #000; border: 1px solid #000; border-radius: 3px; width: 26px; height: 26px; cursor: pointer; font-size: 15px; display: flex; justify-content: center; align-items: center; transition: all 0.2s ease; } .close-button:hover { background-color: #ef4444; color: white; border-color: #ef4444; } /* Functions panel styling */ #functions-panel { background-color: #ffffff; color: #334155; padding: 0; } #functions-panel .control-wrapper { background-color: transparent; border-bottom: 1px solid #e2e8f0; } #functions-panel .control-wrapper:last-child { border-bottom: none; } /* Layers view styling */ #layers-view { background-color: #ffffff; color: #334155; padding: 14px; font-size: 13px; } /* Compact styling variations */ .control-wrapper.compact { padding: 8px 14px; gap: 6px; } .control-wrapper.compact label { font-size: 11px; min-width: 60px; } .control-wrapper.vertical { flex-direction: column; align-items: flex-start; } /* Hover effects */ .control-wrapper:hover { background-color: rgba(59, 130, 246, 0.05); } /* Scrollbar styling for sidebar */ #customization::-webkit-scrollbar { width: 4px; } #customization::-webkit-scrollbar-track { background: #f8fafc; } #customization::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; } #customization::-webkit-scrollbar-thumb:hover { background: #94a3b8; } /* Typography refinements */ #customization * { font-size: inherit; line-height: inherit; } /* Ensure proper spacing and alignment */ .control-wrapper input, .control-wrapper select { width: 100%; box-sizing: border-box; } .input-wrapper input, .input-wrapper select { width: auto; flex: 1; } /* Better visual hierarchy */ .control-wrapper label { opacity: 0.9; } .control-wrapper input:focus+label, .control-wrapper select:focus+label { color: #3b82f6; } /* Improved form controls */ .control-wrapper input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: #3b82f6; } /* Better button styling in functions panel */ #functions-panel button { background-color: #3b82f6; color: white; border: none; padding: 8px 14px; border-radius: 3px; font-size: 12px; cursor: pointer; transition: all 0.2s ease; } #functions-panel button:hover { background-color: #2563eb; } /* Set attribute button */ .set-attribute-button { display: block; width: 100%; margin-bottom: 6px; background-color: #3b82f6; color: white; border: none; padding: 8px 14px; border-radius: 3px; font-size: 12px; cursor: pointer; transition: all 0.2s ease; } .set-attribute-button:hover { background-color: #2563eb; } /* Delete attribute button */ .delete-attribute-button { display: block; width: 100%; margin-bottom: 6px; background-color: #fff1f2 !important; color: #dc2626 !important; border: 1px solid #fecaca !important; padding: 8px 14px; border-radius: 3px; font-size: 12px; cursor: pointer; transition: all 0.2s ease; } .delete-attribute-button:hover { background-color: #fee2e2 !important; border-color: #f87171 !important; color: #b91c1c !important; } /* Improved spacing for multi-input controls */ .input-wrapper { flex-wrap: wrap; } .input-wrapper input[type="text"] { font-family: 'Courier New', monospace; font-size: 11px; width: 70px; flex: none; } /* Modal styles */ #preview-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #ffffff; z-index: 9999; overflow: auto; } /*************************************EXPORT MODAL************************************/ #close-modal-btn { position: absolute; top: 16px; left: 16px; background-color: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; border-radius: 4px; width: 36px; height: 36px; font-size: 18px; cursor: pointer; z-index: 10000; transition: all 0.2s ease; } #close-modal-btn:hover { background-color: #f1f5f9; color: #475569; } .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); justify-content: center; align-items: center; z-index: 9000; transition: all 0.3s ease; } .modal.show { display: flex; opacity: 1; } .modal.hide { opacity: 0; } .export-modal-content { position: relative; background: white; width: 90%; height: 70%; max-width: 1000px; max-height: 600px; display: flex; border-radius: 8px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); padding: 20px; } .close-btn { position: absolute; right: 2px } .modal-section { width: 50%; } .modal-section h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; color: #1e293b; } .code-block { width: 95%; height: 80%; font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace; font-size: 12px; padding: 16px; border-radius: 6px; border: 1px solid #e2e8f0; color: #e2e8f0; background-color: #1e293b; overflow-y: auto; white-space: pre-wrap; line-height: 1.5; } .tag { color: #7dd3fc; } .attribute { color: #fbbf24; } .string { color: #34d399; } .property { color: #a78bfa; } .value { color: #fbbf24; } .bracket { color: #f97316; } .button-wrapper { display: flex; flex-direction: column; padding: 20px; gap: 8px; } .export-btn { position: absolute; bottom: 20px; right: 20px; padding: 10px 20px; font-size: 14px; font-weight: 500; color: #fff; background-color: #3b82f6; border: none; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; } .export-btn:hover { background-color: #2563eb; transform: translateY(-1px); } .modal-search-container { position: relative; display: flex; align-items: center; } .search-icon { position: absolute; right: 20px; width: 18px; height: 18px; color: #999; } .modal-search-input { padding-left: 32px; width: 100%; border-radius: 5px; padding: 5px; outline: none; } /*************************************TABLE COMPONENT************************************/ .table-component { background-color: #ffffff; border-radius: 6px; padding: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .table-component { border-radius: 4px; overflow: auto; } .table-cell { box-sizing: border-box; } .table-row { border-inline: 1px solid #2F3132; padding: 0 0.7px; } /************************************LINK COMPONENT************************************/ .link-component { border: none; display: flex; gap: 8px; align-items: center; padding: 8px; background-color: #ffffff; border-radius: 4px; } .link-component-label { text-decoration: none; color: #3b82f6; font-size: 14px; font-weight: 500; cursor: pointer; margin: 0; transition: all 0.2s ease; } .link-component-label:hover { color: #2563eb; text-decoration: underline; } .edit-link { background-color: #f8fafc !important; position: absolute; bottom: 2px; left: 4px; padding: 2px 6px; cursor: pointer; display: none; border: 1px solid #e2e8f0; font-size: 10px; border-radius: 3px; color: #64748b; font-weight: 500; transition: all 0.2s ease; } .link-component:hover .edit-link { display: block; } .edit-link:hover { background-color: #f1f5f9 !important; } .edit-link-form { display: none; flex-direction: column; gap: 8px; padding: 12px; background-color: #ffffff; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); border: 1px solid #e2e8f0; } .edit-link-form input, .edit-link-form button { padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 13px; transition: all 0.2 } .edit-link-form button { background-color: #3b82f6; color: white; border: none; cursor: pointer; font-weight: 500; } .edit-link-form button:hover { background-color: #2563eb; } /* Category headings */ .categoryHeading { margin: 0 0 16px 0; text-align: left; font-size: 11px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; padding-left: 4px; } /* Video component */ .video-component { width: 300px; height: 300px; position: relative; background-color: #f8fafc; display: flex; justify-content: center; align-items: center; border: 2px dashed #cbd5e1; border-radius: 6px; } .video-component .upload-text { color: #64748b; text-align: center; font-weight: 500; } /* Export dropdown */ .export-dropdown { display: none; position: absolute; background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 6px; margin-top: 4px; right: 20px; z-index: 1000; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); overflow: hidden; } .export-dropdown.visible { display: block; } .export-option { padding: 10px 16px; cursor: pointer; border: none; background: transparent; font-size: 13px; font-weight: 500; color: #374151; transition: all 0.2s ease; width: 100%; text-align: left; } .export-option:hover { background-color: #f8fafc; color: #1e293b; } /* Expandable configuration panels */ .expand-config { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; } /* Fix dropdown button styling */ .dropdown-btn { background-color: #ffffff; border: 1px solid #e2e8f0; padding: 12px 16px; text-align: left; font-weight: 600; cursor: pointer; border-radius: 6px; transition: all 0.2s ease; color: #374151; font-size: 14px; width: 100%; } .dropdown-btn.active { background-color: #f8fafc; border-color: #3b82f6; color: #3b82f6; } .dropdown-btn:hover { background-color: #f8fafc; border-color: #cbd5e1; } .dropdown-panel { margin-top: 6px; padding: 12px; background-color: #ffffff; border-left: 3px solid #3b82f6; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); } #functions-panel { display: flex; flex-direction: column; margin-top: 6px; padding: 12px; background-color: #ffffff; border-left: 3px solid #3b82f6; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); } /* Layer management */ .layers-mode-toggle { display: flex; margin-bottom: 12px; border-radius: 6px; overflow: hidden; border: 1px solid #e2e8f0; } /* Layer management buttons */ .layers-mode-toggle button { flex: 1; padding: 4px; background-color: #f8fafc; border: 1px solid #e2e8f0; cursor: pointer; font-weight: 500; color: #374151; transition: all 0.2s ease; font-size: 13px; } .layers-mode-toggle button.active { background-color: #3b82f6; color: white; border-color: #3b82f6; } .layers-mode-toggle button:hover:not(.active) { background-color: #f1f5f9; color: #1e293b; } /* Enhanced layer/tree structure */ .layer-item { display: flex; align-items: center; justify-content: space-between; list-style: none; padding: 10px 2px; border: 1px solid #f1f5f9; transition: all 0.2s ease; background-color: #ffffff; margin-bottom: 2px; border-radius: 6px; font-size: 13px; color: #374151; min-height: 36px; } .layer-item:hover { background-color: #f8fafc; border-color: #e2e8f0; transform: translateX(2px); } .layer-children { padding: 0 0 0 16px; margin: 4px 0; max-height: 0; list-style: none; transition: all 0.3s ease; overflow: hidden; border-left: 2px solid #f1f5f9; } .layer-children.expanded { max-height: 400px; opacity: 1; } .layer-expand-toggle { cursor: pointer; margin-right: 10px; padding: 4px 6px; border-radius: 4px; transition: all 0.2s ease; color: #64748b; font-size: 14px; background-color: #f8fafc; border: 1px solid #e2e8f0; min-width: 24px; text-align: center; } .layer-expand-toggle:hover { background-color: #f1f5f9; color: #374151; } /* Drop preview styling */ .drop-preview { border: 2px dashed #3b82f6; background-color: rgba(59, 130, 246, 0.05); position: absolute; pointer-events: none; display: none; border-radius: 4px; } .drop-preview.visible { display: block; } /* Scrollbar styling */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; } ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: #94a3b8; } /* Responsive adjustments */ @media (max-width: 1200px) { #sidebar { width: 90px; } .draggable { width: 100%; margin-right: 0; } .draggable:nth-child(2n) { margin-right: 0; } #customization { width: 320px; } } @media (max-width: 1400px) { #customization { width: 300px; } } @media (max-width: 550px) { .nav-icon { width: 20px; height: 20px; } .preview-btn { padding: 4px 6px; } .center-text { font-size: 17px; } } /***************************************************ATTRIBUT SEED MODAL*************************************/ .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.6); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); } .modal-content { position: relative; z-index: 10001; width: 100%; max-width: 500px; background-color: white; display: flex; flex-direction: column; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); overflow: hidden; animation: fadeInScale 0.2s ease-out; border: 1px solid rgba(0, 0, 0, 0.05); } @keyframes fadeInScale { from { opacity: 0; transform: scale(0.95) translate3d(0, -10px, 0); } to { opacity: 1; transform: scale(1) translate3d(0, 0, 0); } } .modal-header { background-color: #fafafa; border-bottom: 1px solid #e5e5e5; padding: 20px 24px; } .modal-header-content { display: flex; justify-content: space-between; align-items: center; } .modal-title { font-size: 18px; font-weight: 600; color: #111827; margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } .modal-close-button { background: none; border: none; color: #6b7280; cursor: pointer; padding: 6px; border-radius: 6px; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; } .modal-close-button:hover { color: #374151; background-color: #f3f4f6; } .modal-close-button svg { width: 20px; height: 20px; } .modal-body { padding: 24px; max-height: 60vh; overflow-y: auto; } .modal-form { display: flex; flex-direction: column; gap: 16px; } .form-field { display: flex; flex-direction: column; border: 1px solid #e5e7eb; border-radius: 8px; background-color: #fefefe; overflow: hidden; } /* Expandable header styles */ .form-field-header { display: flex; align-items: center; padding: 12px 16px; cursor: pointer; background-color: #f8fafc; border-bottom: 1px solid #e5e7eb; transition: background-color 0.2s ease; } .form-field-header:hover { background-color: #f1f5f9; } .expand-button { background: none; border: none; padding: 0; margin-right: 12px; cursor: pointer; color: #6b7280; display: flex; align-items: center; justify-content: center; } .expand-icon { width: 16px; height: 16px; transition: transform 0.2s ease; } .title-key-container { display: flex; flex-direction: column; gap: 2px; flex: 1; } .form-title { font-size: 14px; font-weight: 600; color: #374151; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } .form-key { font-size: 12px; color: #6b7280; font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace; font-weight: 500; } /* Value container styles */ .form-value-container { padding: 16px; background-color: white; transition: all 0.3s ease; overflow: hidden; } .form-value-collapsed { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; } .form-label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; text-transform: uppercase; letter-spacing: 0.025em; margin-right: 6px; } .form-input { padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; transition: all 0.2s ease; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background-color: white; } .form-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); background-color: #fefefe; } .form-input:disabled { background-color: #f9fafb; color: #6b7280; cursor: not-allowed; } .form-display-value { color: #374151; border-radius: 8px; user-select: text; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; word-wrap: break-word; white-space: pre-wrap; } .image-wrapper { display: flex; flex-direction: column; align-items: center; gap: 12px; } .image-preview { width: 100%; max-width: 240px; border-radius: 8px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); object-fit: contain; max-height: 160px; border: 1px solid #e5e7eb; } .image-input { width: 100%; } .error-text { color: #dc2626; font-size: 13px; font-weight: 500; } .modal-footer { background-color: #fafafa; border-top: 1px solid #e5e5e5; padding: 16px 24px; display: flex; justify-content: flex-end; gap: 12px; } .save-button { padding: 10px 20px; background-color: #2563eb; color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; min-width: 80px; } .save-button:hover { background-color: #1d4ed8; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3); } .save-button:active { transform: translateY(0); } .save-button:focus { outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3); } /* Hide modal by default */ .modal-hidden { display: none !important; } /* In your CSS file */ .form-field.selected { border: 2px solid #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3); transform: translateY(-2px); transition: all 0.2s ease-in-out; } /****************************************************ATTRIBUTE SECTION OF CUSTOMIZATION SIDEBAR****************************************************************************************************/ .attribute-input-container { margin-bottom: 20px; padding: 6px; border: 1px solid #e2e8f0; border-radius: 8px; background: #ffffff; transition: all 0.2s ease; position: relative; display: flex; flex-wrap: wrap; } .attribute-input-container:hover { border-color: #cbd5e1; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .attribute-input-container.input-focused { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); } .attribute-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; } .attribute-label { font-weight: 600; font-size: 14px; color: #374151; margin: 0; } .readonly-badge { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; } .attribute-input-wrapper { position: relative; display: flex; align-items: center; } .attribute-input { width: 100%; padding: 10px 12px; border: 2px solid #e5e7eb; border-radius: 6px; font-size: 14px; font-family: inherit; background: #ffffff; transition: all 0.2s ease; outline: none; } .attribute-input:focus { border-color: #3b82f6; background: #fefefe; } .attribute-input:disabled { background: #f9fafb; color: #6b7280; cursor: not-allowed; border-color: #d1d5db; } .attribute-input::placeholder { color: #9ca3af; font-style: italic; } .input-status-indicator { position: absolute; right: 8px; width: 8px; height: 8px; border-radius: 50%; transition: all 0.2s ease; } .input-status-indicator.editable { background: #10b981; box-shadow: 0 0 4px rgba(16, 185, 129, 0.3); } .input-status-indicator.readonly { background: #f59e0b; box-shadow: 0 0 4px rgba(245, 158, 11, 0.3); } .event-configurator { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f3f4f6; width: 100%; } .event-trigger-section { background: #f8fafc; padding: 8px; border-radius: 1px; border: 1px solid #e2e8f0; } .trigger-header { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; } .trigger-icon { font-size: 14px; color: #f59e0b; } .trigger-label { font-size: 12px !important; font-weight: 600; color: #4b5563; text-transform: uppercase; letter-spacing: 0.5px; margin: 0; } .trigger-select-wrapper { position: relative; display: inline-block; width: 100%; } .event-selector { width: 100%; padding: 6px 30px 6px 10px; border: 1px solid #d1d5db; border-radius: 4px; background: #ffffff; font-size: 12px !important; color: #374151; cursor: pointer; appearance: none; transition: all 0.2s ease; } .event-selector:hover { border-color: #9ca3af; } .event-selector:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); } .select-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #6b7280; pointer-events: none; font-size: 10px; transition: transform 0.2s ease; } .trigger-select-wrapper:hover .select-arrow { color: #374151; } .trigger-select-wrapper.trigger-changed { animation: pulse-border 0.3s ease; } .trigger-select-wrapper.trigger-changed .select-arrow { transform: translateY(-50%) rotate(180deg); } /* Animation for trigger change feedback */ @keyframes pulse-border { 0% { border-color: #d1d5db; } 50% { border-color: #10b981; } 100% { border-color: #d1d5db; } } /* Dark mode support (optional) */ @media (prefers-color-scheme: dark) { .attribute-input-container { background: #1f2937; border-color: #374151; } .attribute-label { color: #f9fafb; } .attribute-input { background: #111827; border-color: #4b5563; color: #f9fafb; } .attribute-input:focus { background: #1f2937; } .event-trigger-section { background: #111827; border-color: #374151; } .trigger-label { color: #d1d5db; } .event-selector { background: #1f2937; border-color: #4b5563; color: #f9fafb; } } /****************************************************ATTRIBUTE RULE SET FOR TABLE ROW OF CUSTOMIZATION SIDEBAR****************************************************************************************************/ .rules-panel { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; } .panel-title { font-size: 1.25rem; font-weight: bold; color: #1a202c; margin: 0; } .rules-list { display: flex; flex-direction: column; gap: 0.75rem; } .rule-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem; background-color: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); } .rule-item-text { font-size: 0.875rem; color: #4a5568; } .rule-item-text strong { color: #2b6cb0; } .rule-item-text strong:nth-child(2) { color: #38a169; } .rule-item-text strong:nth-child(3) { color: #805ad5; } .delete-rule-btn { padding: 0.25rem; color: #a0aec0; transition: color 0.2s ease-in-out; background: none; border: none; cursor: pointer; border-radius: 0.25rem; } .delete-rule-btn:hover { color: #e53e3e; } .rule-builder-form { border-top: 1px solid #e2e8f0; } .rule-builder-form-title { font-weight: 600; font-size: 1.125rem; color: #2d3748; margin-bottom: 1rem; } .form-row { display: flex; gap: 0.5rem; margin-bottom: 1rem; } .form-row select, .form-row input { flex: 1; padding: 0.5rem 0.1rem; border: 1px solid #e2e8f0; border-radius: 0.375rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); outline: none; } .form-row select:focus, .form-row input:focus { border-color: #4299e1; box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2); } .add-rule-btn { display: flex; align-items: center; justify-content: center; flex: 1; padding: 0.5rem; background-color: #3182ce; color: white; border-radius: 0.375rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); cursor: pointer; transition: background-color 0.2s ease-in-out; border: none; gap: 0.5rem; } .add-rule-btn:hover { background-color: #2b6cb0; } .icon { width: 1rem; height: 1rem; } /*------------------------------*/ .editable-component.selected, .table-cell-content.selected, .table-row.selected { border: 2px solid #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); outline: none; position: relative; } .editable-component.selected>.component-controls:first-of-type { display: flex !important; } .editable-component.selected>.component-label:first-of-type { display: block !important; } .editable-component:hover>.component-label:first-of-type { display: block !important; } .editable-component:hover>.component-controls:first-of-type { display: flex; gap: 2px; } .editable-component:hover { border-color: #3b82f6; box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4); }