/**
 * ═══════════════════════════════════════════════════════════════════════════════════════
 * VISUAL BUILDER - ENTERPRISE-GRADE CSS
 * ═══════════════════════════════════════════════════════════════════════════════════════
 * 
 * A professional, state-of-the-art Visual Builder UI inspired by:
 * - Storyblok Visual Editor
 * - Builder.io
 * - Contentful Live Preview
 * - Webflow Designer
 * 
 * Features:
 * - Modern three-column layout
 * - Smooth transitions and micro-interactions
 * - Edit mode overlays with hover states
 * - Responsive viewport previews
 * - Dark sidebar with light content area
 */

/* ═══════════════════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ═══════════════════════════════════════════════════════════════════════════════════════ */

:root {
    /* Colors */
    --vb-primary: #3b82f6;
    --vb-primary-hover: #2563eb;
    --vb-primary-light: rgba(59, 130, 246, 0.1);
    --vb-success: #10b981;
    --vb-error: #ef4444;
    --vb-warning: #f59e0b;
    
    /* Sidebar */
    --vb-sidebar-bg: #0f172a;
    --vb-sidebar-hover: #1e293b;
    --vb-sidebar-active: #334155;
    --vb-sidebar-text: #e2e8f0;
    --vb-sidebar-muted: #94a3b8;
    --vb-sidebar-border: #334155;
    
    /* Preview Area */
    --vb-preview-bg: #f1f5f9;
    --vb-frame-bg: #ffffff;
    --vb-frame-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    
    /* Properties Panel */
    --vb-panel-bg: #ffffff;
    --vb-panel-border: #e2e8f0;
    --vb-panel-header: #f8fafc;
    
    /* Edit Indicators */
    --vb-edit-border: rgba(59, 130, 246, 0.5);
    --vb-edit-border-hover: #3b82f6;
    --vb-edit-bg: rgba(59, 130, 246, 0.03);
    
    /* Typography */
    --vb-font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --vb-font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    
    /* Spacing */
    --vb-sidebar-width: 280px;
    --vb-panel-width: 340px;
    --vb-toolbar-height: 52px;
    
    /* Transitions */
    --vb-transition: 0.15s ease;
    --vb-transition-slow: 0.25s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--vb-preview-bg);
    font-family: var(--vb-font-sans);
}

.vb-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--vb-panel-border);
    border-top-color: var(--vb-primary);
    border-radius: 50%;
    animation: vb-spin 0.8s linear infinite;
}

.vb-loading p {
    margin-top: 16px;
    color: #64748b;
    font-size: 14px;
}

@keyframes vb-spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-layout {
    display: grid;
    grid-template-columns: var(--vb-sidebar-width) 1fr var(--vb-panel-width);
    height: 100vh;
    overflow: hidden;
    font-family: var(--vb-font-sans);
    transition: grid-template-columns var(--vb-transition-slow);
}

.vb-layout.vb-panel-collapsed {
    grid-template-columns: var(--vb-sidebar-width) 1fr 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   LEFT SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-sidebar {
    background: var(--vb-sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
}

.vb-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--vb-sidebar-border);
    flex-shrink: 0;
}

/* Tab Bar - Content / Settings / SEO */
.vb-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--vb-sidebar-border);
    flex-shrink: 0;
}

.vb-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 8px;
    font-size: 12px;
    color: var(--vb-sidebar-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--vb-transition);
    white-space: nowrap;
}

.vb-tab:hover {
    color: var(--vb-sidebar-text);
    background: var(--vb-sidebar-hover);
}

.vb-tab.active {
    color: var(--vb-primary);
    border-bottom-color: var(--vb-primary);
}

.vb-tab-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Status badge in toolbar */
.vb-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
}

.vb-status-draft {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.vb-status-published {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.vb-status-archived {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

/* Read-only field display */
.vb-readonly-field {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--vb-sidebar-border);
    border-radius: 6px;
    color: var(--vb-sidebar-text);
    font-size: 13px;
}

/* Scrollable Content Area - Contains fields, sections list, and add section */
.vb-sidebar-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Important for flex overflow to work */
}

.vb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--vb-sidebar-muted);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 12px;
    transition: color var(--vb-transition);
}

.vb-back-link:hover {
    color: var(--vb-sidebar-text);
}

.vb-back-link svg {
    width: 14px;
    height: 14px;
}

.vb-page-title {
    color: var(--vb-sidebar-text);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vb-content-type {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    background: var(--vb-sidebar-hover);
    color: var(--vb-sidebar-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

/* Field List - Now inside scrollable container */
.vb-field-list {
    padding: 16px;
}

.vb-structure-list {
    border-bottom: 1px solid var(--vb-sidebar-border);
}

.vb-structure-btn {
    border: 1px solid transparent;
}

.vb-structure-btn.selected {
    border-color: rgba(255, 255, 255, 0.2);
}

.vb-structure-item {
    display: flex;
    flex-direction: column;
}

.vb-section-title {
    color: var(--vb-sidebar-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.vb-field-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: background var(--vb-transition);
}

.vb-field-btn:hover {
    background: var(--vb-sidebar-hover);
}

.vb-field-btn.selected {
    background: var(--vb-primary);
}

.vb-field-label {
    display: block;
    color: var(--vb-sidebar-text);
    font-size: 13px;
    font-weight: 500;
}

.vb-field-preview {
    display: block;
    color: var(--vb-sidebar-muted);
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vb-field-btn.selected .vb-field-label,
.vb-field-btn.selected .vb-field-preview {
    color: white;
}

/* Nested field group header */
.vb-field-group-header {
    display: block;
    padding: 8px 12px 4px;
    margin-top: 8px;
    color: var(--vb-primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid var(--vb-sidebar-border);
}

/* Nested field button - indented */
.vb-field-btn.vb-field-nested {
    padding-left: 20px;
}

.vb-field-btn.vb-field-nested .vb-field-label {
    font-size: 12px;
}

/* Sidebar Footer - Fixed at bottom */
.vb-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--vb-sidebar-border);
    flex-shrink: 0;
    background: var(--vb-sidebar-bg);
}

.vb-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: var(--vb-sidebar-active);
    color: var(--vb-sidebar-text);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--vb-transition);
}

.vb-save-btn:hover:not(:disabled) {
    background: var(--vb-sidebar-hover);
}

.vb-save-btn.has-changes {
    background: var(--vb-primary);
    color: white;
}

.vb-save-btn.has-changes:hover:not(:disabled) {
    background: var(--vb-primary-hover);
}

.vb-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vb-save-btn svg {
    width: 16px;
    height: 16px;
}

.vb-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: vb-spin 0.7s linear infinite;
}

.vb-save-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
}

.vb-save-message.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--vb-success);
}

.vb-save-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--vb-error);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   CENTER PREVIEW AREA
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-preview-area {
    display: flex;
    flex-direction: column;
    background: var(--vb-preview-bg);
    overflow: hidden;
}

/* Toolbar */
.vb-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--vb-toolbar-height);
    padding: 0 16px;
    background: white;
    border-bottom: 1px solid var(--vb-panel-border);
}

.vb-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vb-toolbar-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.vb-unsaved-badge {
    padding: 3px 8px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--vb-warning);
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

/* Viewport Switcher */
.vb-viewport-switcher {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--vb-preview-bg);
    border-radius: 8px;
}

.vb-viewport-switcher button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all var(--vb-transition);
}

.vb-viewport-switcher button:hover {
    color: #374151;
}

.vb-viewport-switcher button.active {
    background: white;
    color: var(--vb-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.vb-viewport-switcher button svg {
    width: 18px;
    height: 18px;
}

/* Toolbar Right */
.vb-toolbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vb-preview-link,
.vb-panel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all var(--vb-transition);
    text-decoration: none;
}

.vb-preview-link:hover,
.vb-panel-toggle:hover {
    background: var(--vb-preview-bg);
    color: #374151;
}

.vb-preview-link svg,
.vb-panel-toggle svg {
    width: 18px;
    height: 18px;
}

/* Preview Viewport */
.vb-preview-viewport {
    flex: 1;
    padding: 24px;
    overflow: auto;
    transition: padding var(--vb-transition-slow);
}

.vb-preview-viewport.vb-viewport-tablet {
    padding: 24px calc((100% - 768px) / 2);
}

.vb-preview-viewport.vb-viewport-mobile {
    padding: 24px calc((100% - 375px) / 2);
}

/* Preview Frame */
.vb-preview-frame {
    background: var(--vb-frame-bg);
    border-radius: 12px;
    box-shadow: var(--vb-frame-shadow);
    overflow: hidden;
    min-height: 100%;
    position: relative;
}

/* Preview Iframe - Shows the actual page! */
.vb-preview-iframe {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - var(--vb-toolbar-height) - 48px);
    border: none;
    background: white;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   EDITABLE FIELDS - THE MAGIC!
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-editable-field {
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--vb-transition);
}

.vb-editable-field:hover {
    outline: 2px dashed var(--vb-edit-border-hover);
    outline-offset: 4px;
    background: var(--vb-edit-bg);
}

.vb-editable-field.vb-selected {
    outline: 2px solid var(--vb-primary);
    outline-offset: 4px;
    background: var(--vb-primary-light);
}

/* Edit Indicator */
.vb-edit-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--vb-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--vb-transition);
    pointer-events: none;
    z-index: 10;
}

.vb-editable-field:hover .vb-edit-indicator,
.vb-editable-field.vb-selected .vb-edit-indicator {
    opacity: 1;
    transform: scale(1);
}

.vb-edit-indicator svg {
    width: 12px;
    height: 12px;
    color: white;
}

/* Sections Placeholder */
.vb-sections-placeholder {
    margin: 32px 0;
    padding: 40px;
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    text-align: center;
}

.vb-section-info {
    color: #64748b;
}

.vb-section-info svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.vb-section-info p {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px 0;
}

.vb-section-hint {
    font-size: 12px;
    color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   RIGHT PROPERTIES PANEL
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-properties {
    display: flex;
    flex-direction: column;
    background: var(--vb-panel-bg);
    border-left: 1px solid var(--vb-panel-border);
    overflow-x: hidden;
    overflow-y: auto;
    transition: width var(--vb-transition-slow), transform var(--vb-transition-slow);
}

.vb-properties.collapsed {
    width: 0;
    transform: translateX(100%);
}

.vb-properties-header {
    padding: 16px 20px;
    background: var(--vb-panel-header);
    border-bottom: 1px solid var(--vb-panel-border);
}

.vb-properties-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.vb-properties-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

/* Property Editor */
.vb-property-editor {
    padding: 20px;
    border-bottom: 1px solid var(--vb-panel-border);
}

.vb-property-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.vb-property-input,
.vb-property-textarea {
    width: 100%;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--vb-font-sans);
    color: #111827;
    transition: all var(--vb-transition);
    resize: vertical;
}

.vb-property-input:focus,
.vb-property-textarea:focus {
    outline: none;
    border-color: var(--vb-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.vb-property-textarea {
    line-height: 1.6;
}

/* Date and color inputs */
.vb-property-input[type="date"] {
    cursor: pointer;
}
.vb-property-input[type="color"] {
    padding: 2px;
    cursor: pointer;
}

.vb-property-hint {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
    font-family: var(--vb-font-mono);
}

/* Quick Actions */
.vb-quick-actions {
    padding: 16px 20px;
    border-bottom: 1px solid var(--vb-panel-border);
}

.vb-quick-actions h3 {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.vb-quick-actions .vb-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: all var(--vb-transition);
}

.vb-quick-actions .vb-action-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.vb-quick-actions .vb-action-btn svg {
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

/* No Selection State */
.vb-no-selection {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

.vb-no-selection svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.vb-no-selection p {
    font-size: 13px;
    max-width: 200px;
}

/* SEO Preview - styled for sidebar dark theme */
.vb-seo-preview {
    margin-top: 16px;
    padding: 16px 0 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   SECTION LIST & MANAGEMENT (Sidebar)
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-sections-list {
    padding: 12px 16px;
    border-top: 1px solid var(--vb-sidebar-border);
}

.vb-section-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: var(--vb-sidebar-hover);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--vb-transition);
    border: 1px solid transparent;
}

.vb-section-item:hover {
    background: var(--vb-sidebar-active);
}

.vb-section-item.selected {
    border-color: var(--vb-primary);
    background: rgba(59, 130, 246, 0.15);
}

.vb-section-item-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vb-section-item-template {
    font-size: 10px;
    font-weight: 600;
    color: var(--vb-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vb-section-item-title {
    font-size: 13px;
    color: var(--vb-sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vb-section-item-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.vb-section-item-children {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.vb-section-child-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 7px 9px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.22);
    color: var(--vb-sidebar-text);
    font-size: 12px;
    text-align: left;
    transition: all var(--vb-transition);
}

.vb-section-child-btn:hover {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.12);
}

.vb-section-child-btn.selected {
    border-color: var(--vb-primary);
    background: rgba(59, 130, 246, 0.2);
}

.vb-section-child-btn small {
    color: var(--vb-sidebar-muted);
    font-size: 11px;
}

.vb-structure-children,
.vb-structure-node-children {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vb-structure-children {
    margin: 4px 0 8px;
}

.vb-structure-node {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: calc(var(--vb-structure-depth, 0) * 14px);
}

.vb-structure-node-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vb-structure-node-btn {
    flex: 1;
    min-width: 0;
}

.vb-structure-node-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vb-structure-node-actions .vb-action-btn {
    min-width: 28px;
    padding: 4px 6px;
}

.vb-action-btn {
  padding: 4px 8px;
  border: 1px solid var(--vb-sidebar-border);
    background: var(--vb-sidebar-bg);
    color: var(--vb-sidebar-text);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--vb-transition);
}

.vb-action-btn:hover:not(:disabled) {
    background: var(--vb-sidebar-active);
    border-color: var(--vb-primary);
}

.vb-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vb-action-btn.danger:hover:not(:disabled) {
    background: var(--vb-error);
    border-color: var(--vb-error);
    color: white;
}

/* Add Section Panel */
.vb-add-section {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--vb-sidebar-border);
}

.vb-template-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.vb-template-group + .vb-template-group {
    margin-top: 18px;
}

.vb-template-group-title {
    margin-bottom: 10px;
    color: var(--vb-sidebar-text);
    font-size: 12px;
    font-weight: 600;
}

.vb-template-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 8px;
    background: var(--vb-sidebar-hover);
    border: 1px solid var(--vb-sidebar-border);
    border-radius: 8px;
    color: var(--vb-sidebar-text);
    font-size: 11px;
    cursor: pointer;
    transition: all var(--vb-transition);
}

.vb-template-btn:hover {
    background: var(--vb-sidebar-active);
    border-color: var(--vb-primary);
    transform: translateY(-1px);
}

.vb-template-btn svg {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.vb-template-btn small {
    display: block;
    color: var(--vb-sidebar-muted);
    font-size: 11px;
    line-height: 1.4;
    text-align: left;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   SECTION WRAPPER (Preview Area)
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-section-wrapper {
    position: relative;
    margin-bottom: 16px;
    border: 2px dashed transparent;
    border-radius: 8px;
    transition: all var(--vb-transition);
    cursor: pointer;
}

.vb-section-wrapper:hover {
    border-color: var(--vb-edit-border);
    background: var(--vb-edit-bg);
}

.vb-section-wrapper.vb-section-selected {
    border-color: var(--vb-primary);
    border-style: solid;
    background: rgba(59, 130, 246, 0.03);
}

.vb-section-toolbar {
    display: none;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--vb-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.vb-section-wrapper:hover .vb-section-toolbar,
.vb-section-wrapper.vb-section-selected .vb-section-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.vb-section-type {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vb-section-title {
    opacity: 0.9;
}

.vb-section-placeholder {
    padding: 40px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   SECTION PROPERTIES (Right Panel for Sections)
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-section-properties {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vb-entity-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.vb-section-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--vb-panel-border);
}

.vb-section-template-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--vb-primary-light);
    color: var(--vb-primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vb-property-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vb-property-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.vb-property-input,
.vb-property-textarea,
.vb-property-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--vb-panel-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--vb-font-sans);
    transition: all var(--vb-transition);
    background: #ffffff;
    box-sizing: border-box;
}

.vb-property-input:focus,
.vb-property-textarea:focus,
.vb-property-select:focus {
    outline: none;
    border-color: var(--vb-primary);
    box-shadow: 0 0 0 3px var(--vb-primary-light);
}

.vb-property-textarea {
    min-height: 80px;
    resize: vertical;
}

.vb-property-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 36px;
}

.vb-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.vb-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--vb-primary);
}

.vb-property-hint {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
}

.vb-section-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--vb-panel-border);
}

.vb-btn-secondary {
    width: 100%;
    padding: 10px 16px;
    background: #f3f4f6;
    border: 1px solid var(--vb-panel-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all var(--vb-transition);
}

.vb-btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   DYNAMIC CONTENT - Field Cards for ANY content type
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-dynamic-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vb-field-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

.vb-field-card:hover {
    border-color: var(--vb-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.vb-field-card.vb-selected {
    border-color: var(--vb-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: rgba(59, 130, 246, 0.02);
}

.vb-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.vb-field-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
    text-transform: capitalize;
}

.vb-field-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #64748b;
}

.vb-field-type.vb-type-text { background: #f0fdf4; color: #166534; }
.vb-field-type.vb-type-richtext { background: #eff6ff; color: #1d4ed8; }
.vb-field-type.vb-type-url { background: #fef3c7; color: #92400e; }
.vb-field-type.vb-type-image { background: #fce7f3; color: #9d174d; }
.vb-field-type.vb-type-object { background: #f3e8ff; color: #7c3aed; }
.vb-field-type.vb-type-array { background: #e0e7ff; color: #4338ca; }
.vb-field-type.vb-type-section { background: #fef2f2; color: #dc2626; }
.vb-field-type.vb-type-date { background: #ecfeff; color: #0891b2; }
.vb-field-type.vb-type-email { background: #f0fdfa; color: #0d9488; }

.vb-field-content {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
}

.vb-field-content.vb-content-richtext {
    white-space: pre-wrap;
}

.vb-placeholder {
    color: #94a3b8;
    font-style: italic;
}

.vb-json-preview {
    font-family: var(--vb-font-mono);
    font-size: 11px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    color: #475569;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.vb-richtext-preview {
    color: #475569;
    white-space: pre-wrap;
}

.vb-url-value {
    font-family: var(--vb-font-mono);
    font-size: 12px;
    color: #3b82f6;
    word-break: break-all;
}

/* Sections Area */
.vb-sections-area {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

.vb-sections-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vb-section-card {
    border-left: 3px solid var(--vb-primary);
}

.vb-section-preview {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    max-height: 200px;
    overflow: hidden;
}

/* Empty State */
.vb-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.vb-empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.vb-empty-icon svg {
    width: 100%;
    height: 100%;
}

.vb-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 8px 0;
}

.vb-empty-state p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   PAGE CONTENT STYLES (for preview rendering)
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-page-content {
    /* Inherit styles from actual page */
}

/* Make sure the page content imports work */
.vb-preview-frame .inner-banner-01,
.vb-preview-frame .sec-breadcrumb,
.vb-preview-frame .sec-job-glossar-single,
.vb-preview-frame .info-banner-1 {
    /* These inherit from the main site styles via Preline theme */
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    :root {
        --vb-sidebar-width: 240px;
        --vb-panel-width: 300px;
    }
}

@media (max-width: 1024px) {
    .vb-layout {
        grid-template-columns: 0 1fr var(--vb-panel-width);
    }
    
    .vb-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--vb-sidebar-width);
        z-index: 100;
        transform: translateX(-100%);
        transition: transform var(--vb-transition-slow);
    }
    
    .vb-sidebar.open {
        transform: translateX(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   SHADOW DOM HOST STYLES
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-shadow-host {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: var(--vb-frame-bg);
    border-radius: 8px;
    overflow: hidden;
}

.vb-shadow-host.loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vb-shadow-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-family: var(--vb-font-sans);
    font-size: 14px;
}

.vb-shadow-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--vb-primary);
    border-radius: 50%;
    animation: vb-spin 0.8s linear infinite;
}

/* Shadow host viewport modes */
.vb-shadow-host[data-viewport="tablet"] {
    max-width: 768px;
    margin: 0 auto;
}

.vb-shadow-host[data-viewport="mobile"] {
    max-width: 375px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   INLINE EDITING TOOLBAR
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-inline-toolbar {
    position: absolute;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: #1e293b;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    animation: vb-toolbar-appear 0.15s ease;
}

@keyframes vb-toolbar-appear {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vb-toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: all var(--vb-transition);
}

.vb-toolbar-btn:hover {
    background: #334155;
    color: #e2e8f0;
}

.vb-toolbar-btn.active {
    background: var(--vb-primary);
    color: white;
}

.vb-toolbar-btn svg {
    width: 18px;
    height: 18px;
}

.vb-toolbar-separator {
    width: 1px;
    height: 20px;
    background: #475569;
    margin: 0 4px;
}

/* Toolbar arrow pointer */
.vb-inline-toolbar::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #1e293b;
    transform: rotate(45deg);
    border-radius: 0 0 2px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   LIVE PREVIEW ISOLATION
   Hide header, footer, navigation - show only body content
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-live-preview > header,
.vb-live-preview header,
.vb-live-preview .header,
.vb-live-preview .site-header,
.vb-live-preview .navbar,
.vb-live-preview .main-header,
.vb-live-preview nav.navbar,
.vb-live-preview .menu-wrapper,
.vb-live-preview .header-wrapper {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

.vb-live-preview > footer,
.vb-live-preview footer,
.vb-live-preview .footer,
.vb-live-preview .site-footer,
.vb-live-preview .main-footer {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

.vb-live-preview .breadcrumb,
.vb-live-preview .breadcrumbs,
.vb-live-preview .breadcrumb-wrapper,
.vb-live-preview .back-link,
.vb-live-preview .page-breadcrumb {
    display: none !important;
}

.vb-live-preview .cookie-banner,
.vb-live-preview .cookie-consent,
.vb-live-preview .chat-widget,
.vb-live-preview .ChatWidget {
    display: none !important;
}

.vb-live-preview main,
.vb-live-preview .main-content,
.vb-live-preview article,
.vb-live-preview > main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.vb-live-preview {
    overflow: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   INLINE EDITING - CmsField & data-vb-field
   ═══════════════════════════════════════════════════════════════════════════════════════ */

[data-cms-field] {
    position: relative;
    transition: outline 0.15s ease, background-color 0.15s ease;
}

[data-cms-field][contenteditable="true"] {
    cursor: text;
}

[data-cms-field][contenteditable="true"]:hover {
    outline: 1px dashed rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
    background-color: rgba(59, 130, 246, 0.02);
}

[data-cms-field][contenteditable="true"]:focus {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px;
    background-color: rgba(59, 130, 246, 0.05) !important;
}

[data-cms-field].active {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px;
}

[data-cms-field][contenteditable="true"]:focus::after {
    content: '\270E';
    position: absolute;
    top: -10px;
    right: -10px;
    background: #3b82f6;
    color: white;
    width: 18px;
    height: 18px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    z-index: 1001;
    pointer-events: none;
}

/* data-vb-field editable elements */
[data-vb-field] {
    position: relative;
    transition: outline 0.15s ease, background-color 0.15s ease;
    cursor: text;
}

[data-vb-field]:hover {
    outline: 1px dashed rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
    cursor: text;
}

[data-vb-field].vb-editing {
    outline: 1px solid #3b82f6 !important;
    outline-offset: 2px;
    background-color: rgba(59, 130, 246, 0.03) !important;
    cursor: text;
}

[data-vb-field].vb-editing:focus {
    outline: 1px solid #3b82f6 !important;
}

[data-vb-field].vb-editing::after {
    content: '\270E';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #3b82f6;
    color: white;
    width: 16px;
    height: 16px;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    z-index: 1001;
    pointer-events: none;
}

/* Non-text editable elements (images, links, buttons) */
[data-vb-element-type] {
    position: relative;
    cursor: pointer;
    transition: outline 0.15s ease, box-shadow 0.15s ease;
}

[data-vb-element-type]:hover {
    outline: 2px dashed rgba(59, 130, 246, 0.6);
    outline-offset: 3px;
}

[data-vb-element-type="image"]:hover {
    outline-color: rgba(168, 85, 247, 0.6);
}

[data-vb-element-type="link"]:hover {
    outline-color: rgba(34, 197, 94, 0.6);
}

[data-vb-element-type="button"]:hover {
    outline-color: rgba(249, 115, 22, 0.6);
}

/* Type-specific edit indicator icons */
[data-vb-element-type]::after {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    color: white;
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

[data-vb-element-type]:hover::after {
    opacity: 1;
}

[data-vb-element-type="image"]::after {
    content: '\1F5BC';
    background: #a855f7;
}

[data-vb-element-type="link"]::after {
    content: '\1F517';
    background: #22c55e;
}

[data-vb-element-type="button"]::after {
    content: '\270E';
    background: #f97316;
}

/* Selected non-text element */
.vb-selected-nontext {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.vb-selected-nontext::after {
    opacity: 1 !important;
}

/* Section hover labels */
[data-vb-section] {
    position: relative;
}

[data-vb-section]:hover::after {
    content: attr(data-vb-section-title);
    position: absolute;
    top: 0;
    right: 0;
    background: #D43659;
    color: white;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 0 0 0 4px;
    z-index: 1000;
}

.vb-entity-overlay-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 30;
}

.vb-entity-overlay {
    position: absolute;
    border-radius: 12px;
    pointer-events: none;
}

.vb-entity-overlay-interactive {
    pointer-events: auto;
    cursor: pointer;
}

.vb-entity-overlay-section {
    border: 2px dashed rgba(212, 54, 89, 0.45);
    background: rgba(212, 54, 89, 0.04);
}

.vb-entity-overlay-item {
    border: 2px solid rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.04);
}

.vb-entity-overlay-collection {
    border: 2px solid rgba(16, 185, 129, 0.32);
    background: rgba(16, 185, 129, 0.05);
}

.vb-entity-overlay.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.vb-entity-overlay-badge {
    position: absolute;
    top: -12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border: none;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.vb-inline-collection-btn {
    position: absolute;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.vb-inline-add-btn {
    background: #10b981;
}

.vb-inline-remove-btn {
    background: #ef4444;
}

.vb-inline-move-btn {
    background: #0f172a;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   RICH TEXT TOOLBAR
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-richtext-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.vb-richtext-toolbar .vb-toolbar-btn {
    color: #475569;
}
.vb-richtext-toolbar .vb-toolbar-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.vb-richtext-toolbar .vb-toolbar-btn.active {
    background: var(--vb-primary);
    color: white;
}
.vb-richtext-toolbar .vb-toolbar-btn svg {
    width: 16px;
    height: 16px;
}

.vb-external-link-input {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    padding: 4px;
    background: #f8fafc;
    border-radius: 4px;
    border: 1px solid var(--vb-primary);
    animation: vb-fade-in 0.15s ease-out;
}

.vb-external-link-input input[type="url"] {
    flex: 1;
    padding: 4px 8px;
    font-size: 12px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    color: #1f2937;
    outline: none;
    min-width: 0;
}

.vb-external-link-input input[type="url"]:focus {
    border-color: var(--vb-primary);
}

.vb-external-link-input input[type="url"]::placeholder {
    color: #9ca3af;
}

.vb-external-link-input .vb-toolbar-btn {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

@keyframes vb-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.vb-richtext-editor {
    font-family: inherit;
    line-height: 1.5;
}

.vb-heading-input {
    font-weight: 600;
    font-size: 1.1em;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   FORM-BASED INLINE EDITOR (Singleton / Fallback)
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-inline-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.vb-inline-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vb-inline-field label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: capitalize;
}

.vb-inline-field input,
.vb-inline-field textarea,
.vb-inline-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--vb-font-sans);
    color: #111827;
    background: #ffffff;
    transition: all var(--vb-transition);
}

.vb-inline-field input:focus,
.vb-inline-field textarea:focus,
.vb-inline-field select:focus {
    outline: none;
    border-color: var(--vb-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.vb-inline-field textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.6;
}

.vb-inline-array {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.vb-inline-array-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.vb-inline-array-item {
    padding: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.vb-inline-array-item:last-child {
    border-bottom: none;
}

.vb-inline-array-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.vb-inline-array-item-title {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.vb-inline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.vb-inline-grid .vb-full-width {
    grid-column: 1 / -1;
}

.vb-inline-object {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    background: #fafbfc;
}

.vb-inline-object-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.vb-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all var(--vb-transition);
}

.vb-btn-sm:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.vb-btn-sm.danger {
    color: var(--vb-error);
    border-color: rgba(239, 68, 68, 0.3);
}

.vb-btn-sm.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.vb-btn-sm.primary {
    background: var(--vb-primary);
    color: white;
    border-color: var(--vb-primary);
}

.vb-btn-sm.primary:hover {
    background: var(--vb-primary-hover);
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   SEO PREVIEW (Sidebar)
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-seo-preview h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--vb-sidebar-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.vb-seo-card {
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--vb-sidebar-border);
    border-radius: 8px;
}

.vb-seo-title {
    font-size: 16px;
    font-weight: 500;
    color: #8ab4f8;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vb-seo-url {
    font-size: 12px;
    color: #bdc1c6;
    margin-bottom: 4px;
}

.vb-seo-desc {
    font-size: 13px;
    color: #9aa0a6;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   CMS ADMIN LAYOUT OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════════════════
   Preline Pro uses Tailwind CSS v4 @layer utilities — which are beaten by unlayered
   Bootstrap/site CSS. These overrides enforce the correct CMS admin layout.
   ═══════════════════════════════════════════════════════════════════════════════════════ */

/* --- CMS Header: fix z-index (site main.css sets header{z-index:3}) --- */
.hs-overlay-body-open > header.fixed {
    z-index: 48 !important;
}

@media (min-width: 1024px) {
    .hs-overlay-body-open > header.fixed {
        z-index: 61 !important;
    }
}

/* --- CMS Sidebar: fix transform and z-index --- */
#hs-pro-sidebar {
    z-index: 60 !important;
}

@media (min-width: 1024px) {
    /* Sidebar visible and translated into view on large screens */
    #hs-pro-sidebar.open,
    #hs-pro-sidebar.opened {
        transform: translateX(0) !important;
        display: block !important;
    }
}

/* --- CMS Main content: push right for sidebar (Bootstrap .px-3 uses !important) --- */
@media (min-width: 1024px) {
    .hs-overlay-body-open > main {
        padding-inline-start: 15rem !important; /* 240px = sidebar w-60 */
        padding-top: 3.25rem !important; /* 52px = header height */
        position: fixed !important;
        inset: 0 !important;
    }
}

/* --- Content card: correct height accounting for header --- */
@media (min-width: 1024px) {
    .hs-overlay-body-open > main > div:last-child {
        height: 100% !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   MEDIA PICKER MODAL
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-media-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vb-fade-in 0.15s ease-out;
}

@keyframes vb-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vb-media-picker {
    background: var(--vb-surface, #1e1e2e);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 12px;
    width: 90vw;
    max-width: 1100px;
    height: 80vh;
    max-height: 750px;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    grid-template-columns: 1fr 280px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: vb-scale-in 0.2s ease-out;
}

@keyframes vb-scale-in {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Header */
.vb-media-picker-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--vb-border, #2d2d3d);
}

.vb-media-picker-header h2 {
    color: var(--vb-text, #e0e0e0);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.vb-media-picker-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vb-media-picker-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--vb-primary, #3b82f6);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.vb-media-picker-upload-btn:hover {
    background: var(--vb-primary-hover, #2563eb);
}
.vb-media-picker-upload-btn svg {
    width: 16px;
    height: 16px;
}

.vb-media-picker-close {
    background: none;
    border: none;
    color: var(--vb-text-muted, #888);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.vb-media-picker-close:hover {
    color: var(--vb-text, #e0e0e0);
    background: rgba(255, 255, 255, 0.1);
}
.vb-media-picker-close svg {
    width: 20px;
    height: 20px;
}

.vb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Filter bar */
.vb-media-picker-filters {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--vb-border, #2d2d3d);
}

.vb-media-picker-search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.vb-media-picker-search svg {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    color: var(--vb-text-muted, #888);
    pointer-events: none;
}
.vb-media-picker-search input {
    width: 100%;
    padding: 7px 10px 7px 34px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text, #e0e0e0);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.vb-media-picker-search input:focus {
    border-color: var(--vb-primary, #3b82f6);
}
.vb-media-picker-search input::placeholder {
    color: var(--vb-text-muted, #888);
}

.vb-media-picker-folder-select {
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text, #e0e0e0);
    font-size: 13px;
    min-width: 140px;
    outline: none;
    cursor: pointer;
}
.vb-media-picker-folder-select option {
    background: var(--vb-surface, #1e1e2e);
}

/* Upload progress */
.vb-media-picker-upload-progress {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.08);
    border-bottom: 1px solid var(--vb-border, #2d2d3d);
}
.vb-media-picker-upload-progress span {
    color: var(--vb-text-muted, #888);
    font-size: 12px;
    white-space: nowrap;
}
.vb-media-picker-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}
.vb-media-picker-progress-fill {
    height: 100%;
    background: var(--vb-primary, #3b82f6);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Grid */
.vb-media-picker-grid {
    grid-column: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    align-content: start;
}
.vb-media-picker-grid::-webkit-scrollbar {
    width: 6px;
}
.vb-media-picker-grid::-webkit-scrollbar-track {
    background: transparent;
}
.vb-media-picker-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.vb-media-picker-loading,
.vb-media-picker-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--vb-text-muted, #888);
}
.vb-media-picker-loading svg,
.vb-media-picker-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

/* Item card */
.vb-media-picker-item {
    position: relative;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    background: rgba(255, 255, 255, 0.04);
}
.vb-media-picker-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}
.vb-media-picker-item.selected {
    border-color: var(--vb-primary, #3b82f6);
    box-shadow: 0 0 0 1px var(--vb-primary, #3b82f6);
}

.vb-media-picker-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.03);
}

.vb-media-picker-file-icon {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    color: var(--vb-text-muted, #888);
}
.vb-media-picker-file-icon svg {
    width: 32px;
    height: 32px;
}

.vb-media-picker-item-label {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.vb-media-picker-item-label span {
    font-size: 11px;
    color: var(--vb-text, #e0e0e0);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vb-media-picker-item-label small {
    font-size: 10px;
    color: var(--vb-text-muted, #888);
}

.vb-media-picker-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    background: var(--vb-primary, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vb-media-picker-check svg {
    width: 14px;
    height: 14px;
    color: white;
}

/* Detail sidebar */
.vb-media-picker-detail {
    grid-column: 2;
    grid-row: 3 / 5;
    border-left: 1px solid var(--vb-border, #2d2d3d);
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vb-media-picker-detail-preview {
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}
.vb-media-picker-detail-preview img {
    width: 100%;
    display: block;
    object-fit: contain;
    max-height: 180px;
}

.vb-media-picker-detail-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vb-media-picker-detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vb-media-picker-detail-field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--vb-text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.vb-media-picker-detail-field input {
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text, #e0e0e0);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.vb-media-picker-detail-field input:focus {
    border-color: var(--vb-primary, #3b82f6);
}
.vb-media-picker-detail-field input::placeholder {
    color: var(--vb-text-muted, #888);
}

.vb-media-picker-detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--vb-border, #2d2d3d);
}
.vb-media-picker-detail-info span {
    font-size: 11px;
    color: var(--vb-text-muted, #888);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Footer */
.vb-media-picker-footer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid var(--vb-border, #2d2d3d);
}

.vb-media-picker-cancel {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text-muted, #888);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.vb-media-picker-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--vb-text, #e0e0e0);
}

.vb-media-picker-confirm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--vb-primary, #3b82f6);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.vb-media-picker-confirm:hover:not(:disabled) {
    background: var(--vb-primary-hover, #2563eb);
}
.vb-media-picker-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.vb-media-picker-confirm svg {
    width: 16px;
    height: 16px;
}

/* Image field in VB property panel */
.vb-image-field-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--vb-border, #2d2d3d);
    margin-bottom: 8px;
}
.vb-image-field-preview img {
    width: 100%;
    display: block;
    object-fit: contain;
    max-height: 160px;
    background: repeating-conic-gradient(rgba(255,255,255,0.05) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
}

.vb-image-field-actions {
    display: flex;
    gap: 6px;
}

.vb-image-field-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text, #e0e0e0);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.vb-image-field-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
.vb-image-field-btn svg {
    width: 14px;
    height: 14px;
}

.vb-image-field-btn.primary {
    background: var(--vb-primary, #3b82f6);
    border-color: var(--vb-primary, #3b82f6);
    color: white;
}
.vb-image-field-btn.primary:hover {
    background: var(--vb-primary-hover, #2563eb);
}

.vb-image-field-btn.danger {
    color: var(--vb-error, #ef4444);
    border-color: rgba(239, 68, 68, 0.3);
}
.vb-image-field-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.vb-image-field-meta {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.vb-image-field-meta label {
    font-size: 11px;
    color: var(--vb-text-muted, #888);
    font-weight: 500;
}
.vb-image-field-meta input {
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 4px;
    color: var(--vb-text, #e0e0e0);
    font-size: 12px;
    outline: none;
}
.vb-image-field-meta input:focus {
    border-color: var(--vb-primary, #3b82f6);
}

.vb-image-field-id {
    font-size: 10px;
    color: var(--vb-text-muted, #888);
    font-family: monospace;
    opacity: 0.6;
    margin-top: 4px;
    word-break: break-all;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   CONTENT LINK PICKER
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-link-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vb-fade-in 0.15s ease-out;
}

.vb-link-picker {
    background: var(--vb-surface, #1e1e2e);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 12px;
    width: 90vw;
    max-width: 1000px;
    height: 80vh;
    max-height: 700px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    grid-template-columns: 1fr 280px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    animation: vb-scale-in 0.2s ease-out;
}

/* Header */
.vb-link-picker-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--vb-border, #2d2d3d);
}

.vb-link-picker-header h2 {
    color: var(--vb-text, #e0e0e0);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.vb-link-picker-close {
    background: none;
    border: none;
    color: var(--vb-text-muted, #888);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.vb-link-picker-close:hover {
    color: var(--vb-text, #e0e0e0);
    background: rgba(255, 255, 255, 0.1);
}
.vb-link-picker-close svg {
    width: 20px;
    height: 20px;
}

/* Filter bar */
.vb-link-picker-filters {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--vb-border, #2d2d3d);
}

.vb-link-picker-search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.vb-link-picker-search svg {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    color: var(--vb-text-muted, #888);
    pointer-events: none;
}
.vb-link-picker-search input {
    width: 100%;
    padding: 7px 10px 7px 34px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text, #e0e0e0);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.vb-link-picker-search input:focus {
    border-color: var(--vb-primary, #3b82f6);
}
.vb-link-picker-search input::placeholder {
    color: var(--vb-text-muted, #888);
}

.vb-link-picker-type-select {
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text, #e0e0e0);
    font-size: 13px;
    min-width: 160px;
    outline: none;
    cursor: pointer;
}
.vb-link-picker-type-select option {
    background: var(--vb-surface, #1e1e2e);
}

/* Content list (replaces media grid) */
.vb-link-picker-list {
    grid-column: 1;
    overflow-y: auto;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vb-link-picker-list::-webkit-scrollbar {
    width: 6px;
}
.vb-link-picker-list::-webkit-scrollbar-track {
    background: transparent;
}
.vb-link-picker-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.vb-link-picker-loading,
.vb-link-picker-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--vb-text-muted, #888);
}
.vb-link-picker-loading svg,
.vb-link-picker-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

/* Item row */
.vb-link-picker-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: rgba(255, 255, 255, 0.02);
}
.vb-link-picker-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}
.vb-link-picker-item.selected {
    border-color: var(--vb-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 1px var(--vb-primary, #3b82f6);
}

/* Content type badge */
.vb-link-picker-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}

.vb-link-picker-badge-blog { background: #dbeafe; color: #1d4ed8; }
.vb-link-picker-badge-karrieretipp { background: #fef3c7; color: #b45309; }
.vb-link-picker-badge-job-glossar { background: #d1fae5; color: #047857; }
.vb-link-picker-badge-homepage { background: #ede9fe; color: #6d28d9; }
.vb-link-picker-badge-default { background: #f3f4f6; color: #374151; }

/* Item info */
.vb-link-picker-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vb-link-picker-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--vb-text, #e0e0e0);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vb-link-picker-item-slug {
    font-size: 11px;
    color: var(--vb-text-muted, #888);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Check mark */
.vb-link-picker-check {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--vb-primary, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vb-link-picker-check svg {
    width: 14px;
    height: 14px;
    color: white;
}

/* Detail sidebar */
.vb-link-picker-detail {
    grid-column: 2;
    grid-row: 3;
    border-left: 1px solid var(--vb-border, #2d2d3d);
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vb-link-picker-detail-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vb-link-picker-detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vb-link-picker-detail-field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--vb-text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.vb-link-picker-detail-field input,
.vb-link-picker-detail-field select {
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text, #e0e0e0);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.vb-link-picker-detail-field input:focus,
.vb-link-picker-detail-field select:focus {
    border-color: var(--vb-primary, #3b82f6);
}
.vb-link-picker-detail-field input::placeholder {
    color: var(--vb-text-muted, #888);
}
.vb-link-picker-detail-field select option {
    background: var(--vb-surface, #1e1e2e);
}

.vb-link-picker-detail-value {
    font-size: 13px;
    color: var(--vb-text, #e0e0e0);
    padding: 5px 0;
    word-break: break-word;
}

.vb-link-picker-detail-mono {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--vb-text-muted, #888);
}

/* Footer */
.vb-link-picker-footer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid var(--vb-border, #2d2d3d);
}

.vb-link-picker-cancel {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text-muted, #888);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.vb-link-picker-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--vb-text, #e0e0e0);
}

.vb-link-picker-confirm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--vb-primary, #3b82f6);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.vb-link-picker-confirm:hover:not(:disabled) {
    background: var(--vb-primary-hover, #2563eb);
}
.vb-link-picker-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.vb-link-picker-confirm svg {
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════════════════
   CONTENT LINK FIELD (inline editor in VB property panel)
   ═══════════════════════════════════════════════════════════════════════════════════════ */

.vb-link-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vb-link-field-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.vb-link-field-row svg {
    flex-shrink: 0;
}
.vb-link-field-open {
    font-size: 11px;
    color: var(--vb-primary, #3b82f6);
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
.vb-link-field-open:hover {
    text-decoration: underline;
}

.vb-link-field-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--vb-border, #2d2d3d);
    margin-bottom: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vb-link-field-preview-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--vb-text, #e0e0e0);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vb-link-field-url {
    font-size: 11px;
    color: var(--vb-text-muted, #888);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vb-link-field-actions {
    display: flex;
    gap: 6px;
}

.vb-link-field-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 6px;
    color: var(--vb-text, #e0e0e0);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.vb-link-field-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
.vb-link-field-btn svg {
    width: 14px;
    height: 14px;
}

.vb-link-field-btn.primary {
    background: var(--vb-primary, #3b82f6);
    border-color: var(--vb-primary, #3b82f6);
    color: white;
}
.vb-link-field-btn.primary:hover {
    background: var(--vb-primary-hover, #2563eb);
}

.vb-link-field-btn.danger {
    color: var(--vb-error, #ef4444);
    border-color: rgba(239, 68, 68, 0.3);
}
.vb-link-field-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.vb-link-field-meta {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.vb-link-field-meta label {
    font-size: 11px;
    color: var(--vb-text-muted, #888);
    font-weight: 500;
}
.vb-link-field-meta input {
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--vb-border, #2d2d3d);
    border-radius: 4px;
    color: var(--vb-text, #e0e0e0);
    font-size: 12px;
    outline: none;
}
.vb-link-field-meta input:focus {
    border-color: var(--vb-primary, #3b82f6);
}
