/* Updated styles for GLANCE Developer with 3-column layout */
:root {
  --primary: #10B981;
  --primary-light: #34D399;
  --primary-dark: #059669;
  --bg-dark: #111827;
  --bg-medium: #1F2937;
  --bg-light: #374151;
  --text-light: #F9FAFB;
  --text-muted: #9CA3AF;
  --border-color: #4B5563;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --transition: all 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
  color: var(--text-light);
  background: var(--bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

header {
  background: linear-gradient(to right, var(--bg-medium), var(--bg-dark));
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

.logo svg {
  margin-right: 0.5rem;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-light);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.btn-group-vertical {
  flex-direction: column;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 0.875rem;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn.active {
  background: var(--primary);
  color: white;
}

.btn-primary {
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(to right, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow-md);
}

.btn-full {
  width: 100%;
  margin-top: 0.5rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info span {
  color: var(--text-muted);
}

.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-light);
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.help-icon:hover {
  background: var(--primary);
}

main {
  padding: 1rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* Three column layout */
.app-container {
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  gap: 1.5rem;
  height: calc(100vh - 130px);
  max-height: calc(100vh - 130px);
}

.left-panel, .right-panel {
  background: var(--bg-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.panel-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.panel-section:last-child {
  border-bottom: none;
}

.section-header {
  background: var(--bg-medium);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.section-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* padding: 1rem; */
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
}

/* Main sections styling */
.editor-container,
.preview-section {
    background: var(--bg-medium);
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* Editor/Workflow area */
.code-editor-wrapper,
.workflow-area {
    background: var(--bg-dark);
    flex: 1;
    overflow: hidden;
}

/* Preview section */
.preview-section {
    background: var(--bg-medium);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0;
    min-height: 200px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Preview header */
.preview-header {
    background: var(--bg-medium);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

/* Canvas wrapper */
.canvas-wrapper {
    flex: 1;
    background: var(--bg-dark);
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Preview Canvas */
#preview-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
    object-fit: contain;
}

/* Resize handle */
.resize-handle {
    position: absolute;
    bottom: -3px;
    left: 1rem;
    right: 1rem;
    height: 5px;
    background-color: var(--bg-light);
    cursor: ns-resize;
    z-index: 10;
    transition: background-color 0.2s ease;
    border-radius: 3px;
}

.resize-handle:hover {
    background-color: var(--primary);
}

/* Canvas and Grid styling */
#preview-canvas {
  position: absolute;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  z-index: 3;
}

/* Ensure pixel-perfect canvas rendering */
canvas#preview-canvas {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* Canvas controls styling */
.canvas-zoom-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  z-index: 10;
  background: rgba(31, 41, 55, 0.8);
  padding: 5px;
  border-radius: var(--radius-sm);
}

.canvas-zoom-controls button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.canvas-zoom-controls button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* Grid overlay */
.grid-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
}

/* Error display */
.code-errors {
  background: rgba(220, 38, 38, 0.1);
  border-left: 3px solid #DC2626;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #F87171;
  border-radius: var(--radius-sm);
  max-height: 120px;
  overflow-y: auto;
}

.code-errors ul {
  margin: 0;
  padding-left: 1.5rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-light) var(--bg-dark);
}

/* Styling for code blocks with copy buttons */
.code-with-copy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.code-block {
  flex: 1;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: 'Fira Code', monospace;
  overflow-x: auto;
}

.copy-btn {
  background: var(--bg-light);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  height: fit-content;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--primary-dark);
  color: var(--text-light);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.copy-btn.copied {
  background: var(--primary);
  color: white;
}

.syntax-error {
  background-color: rgba(239, 68, 68, 0.2);
  border-bottom: 2px wavy #EF4444;
  cursor: help;
}

textarea#php-code {
  display: none !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  height: 0 !important;
  width: 0 !important;
  visibility: hidden !important;
  overflow: hidden !important;
}

/* Grid control */
.grid-control {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 5px;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
}

.grid-control input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.grid-control label {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

/* Workflow Container (replaces code editor) */
.workflow-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--bg-dark);
  overflow: hidden;
}

.workflow-controls {
  display: none !important;
}

.add-block-btn {
  display: none !important;
}

/* Workflow area base */
.workflow-area {
    background: var(--bg-dark);
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    min-height: 300px;
}

/* Empty workflow message - the dotted container */
.empty-workflow-message {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin: 0.5rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-dark);  /* Darker background inside dotted lines */
    width: calc(100% - 1rem);     /* Almost full width */
    font-style: italic;
}

/* Individual workflow blocks */
.workflow-block {
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0.75rem 0.5rem;
    width: calc(100% - 1rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
}

.workflow-block:hover {
    border-color: var(--primary);
}

.workflow-block.selected {
    border-color: var(--primary);
}

.workflow-block .block-title-container {
    display: flex;
    align-items: center;  /* Vertically center icon and text */
    gap: 0.75rem;        /* Space between icon and text */
}

.workflow-block .block-title-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

/* Block icon styling in workflow */
.workflow-block .block-icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;      /* Prevent icon from shrinking */
}

.workflow-block .block-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.workflow-block .block-actions {
  display: flex;
  gap: 0.5rem;
}

.workflow-block .block-actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
}

.workflow-block .block-actions button:hover {
  color: var(--primary);
}

.properties-container {
  padding: 1rem;
}

.properties-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.form-group-container {
  padding: 1rem;
}

.form-group-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.block-properties .form-group {
  margin-bottom: 1rem;
}

.block-properties .form-group:last-child {
  margin-bottom: 0;
}

.block-properties label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.block-properties input, 
.block-properties select {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-light);
}

/* Block Library Layout */
.block-library {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  background: var(--bg-medium);
  border-radius: 8px;
}

.blocks-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    gap: 1rem;
    padding: 0.5rem;
}

.block-item {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  gap: 0.5rem;
  cursor: pointer;
  height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: move;
  user-select: none;
  transition: border-color 0.2s;
  position: relative;
  
}

.block-item:hover {
    border-color: var(--primary);
}

.block-item .block-icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 16px;
    line-height: 36px;
}

.block-item .block-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
}

/* Block Types Colors */
.block-item[data-block-type="drawText"] .block-icon {
  background-color: #0A1F5C;
  color: #93C5FD;
}

.block-item[data-block-type="setPixel"] .block-icon {
  background-color: #054937;
  color: #6EE7B7;
}

.block-item[data-block-type="getData"] .block-icon {
  background-color: #4f1b0a;
  color: #FDBA74;
}



/* Block Container */
.blocks-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0.75rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.block-item:hover {
  border-color: var(--primary);
}

.block-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.block-label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  line-height: 1;
}

.right-panel {
  min-width: 250px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


/* Workflow Block Styling */
.workflow-block-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1rem;
    min-height: 48px;
}

.workflow-block-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 120px;
}

.workflow-block-middle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.workflow-block-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.block-type {
    font-weight: 500;
    font-size: 0.9rem;
}

.block-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.layer-indicator {
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.block-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.block-edit, .block-delete {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
}

.block-edit:hover, .block-delete:hover {
    background: var(--bg-light);
    color: var(--text-light);
}

.block-drag-handle {
    cursor: grab;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-drag-handle:hover {
    background: var(--bg-light);
}

.block-drag-handle:active {
    cursor: grabbing;
}

/* Update the no block selected message styling */
.no-block-selected-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-color);
    font-style: italic;
    margin: 1rem;
}

/* Color swatch for workflow blocks */
.color-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 6px;
    vertical-align: middle;
}

.preview-notification {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    opacity: 0.9;
    animation: fadeOut 2s ease-in-out;
}

@keyframes fadeOut {
    0% { opacity: 0.9; }
    70% { opacity: 0.9; }
    100% { opacity: 0; }
}

/* Block Library Section */
.panel-section.block-library {
    display: flex;
    flex-direction: column;
    background: var(--bg-medium);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Title styling */
.panel-section.block-library .section-title {
    padding: 0.75rem 1rem;
    margin: 0;
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}



/* Properties Panel */
.properties {
    background: var(--bg-dark);
    border-radius: 8px;
    
    overflow: hidden;
}

.properties .section-title {
    background: var(--bg-medium);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin: 0;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.properties .section-title::after {
    content: '−';
    font-size: 1.2rem;
}

.properties.collapsed .section-title::after {
    content: '+';
}

.properties.collapsed .properties-container {
    display: none;
}

.properties-container {
    padding: 1rem;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    background: var(--bg-darker);
}

/* Scrollbar styling */
.properties-container::-webkit-scrollbar,
.blocks-container::-webkit-scrollbar {
    width: 6px;
}

.properties-container::-webkit-scrollbar-track,
.blocks-container::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

.properties-container::-webkit-scrollbar-thumb,
.blocks-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Update workflow editor styles to match code editor */
.workflow-editor-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Important for flex overflow */
    background: var(--editor-bg);
    border-radius: 6px;
    overflow: hidden;
}

.workflow-area {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.properties-panel {
    height: 200px;
    border-top: 1px solid var(--border-color);
    background: var(--editor-bg);
    padding: 1rem;
    overflow-y: auto;
}

/* Match resize handle styles */
.resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background-color: var(--bg-light);
    cursor: ns-resize;
    z-index: 10;
    transition: background-color 0.2s ease;
}


.preview-section {
    position: relative;
    background: var(--bg-medium);
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.workflow-container, .editor-container {
    position: relative;
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

/* Add consistent padding */
.editor-container,
.workflow-area,
.preview-section {
    padding: 1rem;
}

/* Help section restoration */
.help-section {
    border-bottom: 1px solid var(--border-color);
}

.help-header {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.help-header:hover {
    background: var(--bg-light);
}

.help-content {
    padding: 1rem;
    display: none;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.help-content p {
    margin-bottom: 0.5rem;
}

.help-content code {
    display: block;
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', monospace;
    overflow-x: auto;
}

/* CodeMirror styling */
.CodeMirror {
    height: 100% !important;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    background-color: var(--bg-darker) !important;
    display: block !important;
    visibility: visible !important;
}

.CodeMirror-gutters {
    background-color: var(--bg-medium) !important;
    border-right: 1px solid var(--border-color) !important;
}

/* Block type-specific colors - match library colors */
.workflow-block[data-block-type="drawText"] .block-icon {
    background-color: #0A1F5C;
    color: #93C5FD;
}

.workflow-block[data-block-type="setPixel"] .block-icon {
    background-color: #022018;
    color: #6EE7B7;
}

.workflow-block[data-block-type="getData"] .block-icon {
    background-color: #3A1407;
    color: #FDBA74;
}

/* Editor title styling */
.editor-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.editor-title svg {
    flex-shrink: 0;  /* Prevent icon from shrinking */
}

.editor-title span {
    line-height: 1;  /* Align text vertically with icon */
}

/* Form group styling */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.875rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Properties panel styling */
.properties-panel {
    background: var(--bg-medium);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.properties-title {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}

.properties-content {
    padding: 1rem;
}

.properties-content .form-group:last-child {
    margin-bottom: 0;
}

/* Preview controls styling */
.preview-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Shared styles for both labels and dimensions */
.preview-controls label,
.preview-dimensions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    background: var(--bg-darkest);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.preview-dimensions:hover {
    opacity: 0.9;
}
.preview-controls label:hover{
    border-color: var(--primary);
    opacity: 0.9;
}

/* Checkbox specific styles */
.preview-controls input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-darkest);
    position: relative;
    cursor: pointer;
    margin: 0;
}

.preview-controls input[type="checkbox"]:checked::before {
    content: '✓';
    position: absolute;
    color: var(--primary);
    font-size: 12px;
    left: 2px;
    top: 0;
}

.block-item {
    position: relative;
}

/* Remove ONLY these specific rules */
.block-item::after,
.block-item:hover::after,
.tooltip {
    display: none !important;
}

/* Keep all other existing CSS rules */
.blocks-canvas {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}


.block-library {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-medium);
}

/* .workflow-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
} */

/* .workflow-area {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--editor-bg);
} */

.properties {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-darker);
}

.resize-handle {
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    background-color: var(--bg-light);
    cursor: ns-resize;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.resize-handle:hover {
    background-color: var(--primary);
}

/* Right panel layout - EXACTLY like workflow/preview */
.right-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 300px;
    overflow: hidden;
}

.panel-section.block-library-section {
    flex: 1;
    min-height: 100px;
    overflow-y: auto;
    position: relative;
}

.panel-section.properties-section {
    height: 200px;
    min-height: 100px;
    overflow-y: auto;
}

.resize-handle {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    background-color: var(--bg-light);
    cursor: ns-resize;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.resize-handle:hover {
    background-color: var(--primary);
}

/* Active resize handle */
.right-panel-resize-handle.active {
    background-color: var(--primary);
    height: 6px; /* Slightly thicker when active */
}

/* No-code specific right panel styles */
.right-panel .panel-section {
    position: relative;
}

.right-panel .block-library-section {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.right-panel .properties-section {
    height: 250px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Simple divider specific styles */
.right-panel .simple-divider {
    height: 6px;
    background: var(--bg-light);
    cursor: ns-resize;
    margin: 0;
    transition: background-color 0.2s ease;
}

.right-panel .simple-divider:hover {
    background: var(--primary);
}

/* Keep existing block items and properties styling */
.blocks-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.properties-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Properties panel header */
.properties-section {
    height: 250px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.properties-section .section-title {
    background: var(--bg-medium);
    padding: 0.75rem 1rem;
    margin: 0;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

/* Simple divider for resizing */
.simple-divider {
    height: 6px;
    background: var(--bg-light);
    cursor: ns-resize;
    margin: 0;
    transition: background-color 0.2s ease;
}

.simple-divider:hover {
    background: var(--primary);
}


