/* ProFacet FSL Playground Styles */

.fsl-playground-container {
    display: flex;
    flex-direction: column;
    margin: 2em 0;
    border: 1px solid var(--table-border-color);
    border-radius: 8px;
    background-color: var(--bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.fsl-playground-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5em 1em;
    background-color: var(--table-header-bg);
    border-bottom: 1px solid var(--table-border-color);
}

.fsl-playground-title {
    font-weight: bold;
    font-size: 0.9em;
    color: var(--fg);
}

.fsl-run-button {
    background-color: #0b8043;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: background-color 0.2s;
}

.fsl-run-button:hover {
    background-color: #086333;
}

.fsl-run-button:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

.fsl-editor-pane {
    height: 300px;
    width: 100%;
    position: relative;
    border-bottom: 1px solid var(--table-border-color);
}

/* Viewer and Output area */
.fsl-preview-area {
    display: flex;
    flex-direction: row;
    height: 350px;
    position: relative;
}

@media (max-width: 700px) {
    .fsl-preview-area {
        flex-direction: column;
        height: auto;
    }
}

.fsl-viewer-pane {
    flex: 2;
    background-color: #1e1e1e; /* Dark background for 3D viewer */
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.fsl-output-pane {
    flex: 1;
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 10px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
    overflow-y: auto;
    border-left: 1px solid var(--table-border-color);
    min-width: 200px;
    white-space: pre-wrap;
    max-height: 350px;
}

.fsl-output-line {
    margin: 2px 0;
    line-height: 1.4;
}

.fsl-output-error {
    color: #ff6b6b;
    font-weight: bold;
}

.fsl-output-success {
    color: #51cf66;
}

/* Ace Editor Customization to match mdbook themes if possible */
.ace-profacet-dark {
    background-color: #1e1e1e;
    color: #d4d4d4;
}

.ace-profacet-dark .ace_gutter {
    background: #252526;
    color: #858585;
}

.ace-profacet-dark .ace_cursor {
    color: #a7a7a7;
}

.ace-profacet-dark .ace_marker-layer .ace_selection {
    background: #264f78;
}
