/* code-launcher.css — Launch button and sandboxed preview modal */

.code-launch-bar {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin: calc(-1 * var(--space-sm)) 0 var(--space-md) 0;
}

.code-launch-btn,
.code-save-btn {
    font-size: 0.875rem;
}

.code-launch-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.6);
    padding: var(--space-lg);
}

.code-launch-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-launch-dialog {
    display: flex;
    flex-direction: column;
    width: min(1100px, 100%);
    height: min(85vh, 100%);
    background-color: var(--color-surface, #fff);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.code-launch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.code-launch-title {
    font-weight: 600;
}

.code-launch-badge {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.1em 0.5em;
    margin-left: var(--space-sm);
}

.code-launch-close {
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0 var(--space-xs);
}

.code-launch-close:hover {
    color: var(--color-text, #000);
}

.code-launch-frame {
    flex: 1;
    width: 100%;
    border: none;
    background-color: #fff;
}

/* Lock page scroll while the preview is open */
body.code-launch-no-scroll {
    overflow: hidden;
}
