/* ── Preview panel (RIGHT) ───────────────────────── */
.preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    min-width: 200px;
}
.preview-panel-header {
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-panel);
    gap: 8px;
}
.preview-url-bar {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}
.preview-header-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.preview-header-btn:hover { color: var(--text-primary); background: var(--bg-surface); }
.preview-header-btn:disabled { opacity: 0.4; cursor: default; }

/* Signal-type panel wrappers (injected by SignalTypeRegistry) */
.signal-type-panel { flex:1; display:flex; flex-direction:column; min-height:0; overflow:hidden; }

/* When the website plugin is active (edit mode), suppress the native preview container
   so the signal-type-panel (editor) gets all available flex space */
.preview-panel.website-active #website-preview-content {
    display: none !important;
}

/* ── Website editor layout ─────────────────────── */
.website-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.website-mode-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-panel);
    flex-shrink: 0;
}

.website-mode-toggle button {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.website-mode-toggle button:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.website-mode-toggle button.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border);
}

.website-mode-spacer { flex: 1; }

.website-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.website-toggle-btn:hover { color: var(--text-primary); background: var(--bg-surface); }

#website-editor-host {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* Override html-editor canvas sizing for full-height website mode */
#website-editor-host .he-canvas {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* The edit-mode frame div — renders site body HTML in the main document
   so selection-manager hit-testing (document.elementFromPoint) works correctly */
.website-html-frame {
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    color: #000;
    /* No transform scaling — full-height scrollable document */
    transform: none !important;
    transform-origin: top left;
}
