/**
 * Condition Section Label Spacing - BLOCKLY ONLY
 * Adds right margin to condition section labels in Blockly workspace ONLY
 * All selectors are scoped to .blockly-workspace-wrapper to prevent affecting Normal mode
 */

/* Target all text nodes that end with ":" in condition sections - BLOCKLY ONLY */
/* These are typically the section labels like "End Conditions:", "Safety Conditions:", etc. */

/* General condition label spacing - BLOCKLY ONLY */
.blockly-workspace-wrapper .step-form span:contains(":"),
.blockly-workspace-wrapper [class*="condition"] span:first-of-type {
    margin-right: 12px !important;
}

/* Specific label patterns - BLOCKLY ONLY */
.blockly-workspace-wrapper span:contains("End:"),
.blockly-workspace-wrapper span:contains("Record:"),
.blockly-workspace-wrapper span:contains("Safety:"),
.blockly-workspace-wrapper span:contains("End Conditions:"),
.blockly-workspace-wrapper span:contains("Safety Conditions:"),
.blockly-workspace-wrapper span:contains("Record Conditions:"),
.blockly-workspace-wrapper span:contains("Functions:") {
    margin-right: 12px !important;
    display: inline-block;
}

/* Labels in flex containers - BLOCKLY ONLY */
.blockly-workspace-wrapper .flex.items-center > span:first-child {
    margin-right: 12px !important;
}

/* Labels before condition chips - BLOCKLY ONLY */
.blockly-workspace-wrapper .step-conditions-wrapper span:first-child,
.blockly-workspace-wrapper div:has(+ [class*="chip"]) {
    margin-right: 12px !important;
}

/* Text with colon at the end - BLOCKLY ONLY */
.blockly-workspace-wrapper span[class*="text-"]:first-child::after {
    content: "";
    display: inline-block;
    width: 4px;
}

/* Fallback: Add spacing to common label patterns - BLOCKLY ONLY */
.blockly-workspace-wrapper .bg-Surface-Primary span:first-of-type,
.blockly-workspace-wrapper .rounded-lg span:first-of-type,
.blockly-workspace-wrapper [class*="bg-"] > div > span:first-child {
    margin-right: 12px !important;
}

/* More specific selectors for step form labels - BLOCKLY ONLY */
.blockly-workspace-wrapper [class*="Step"] span[class*="text-"],
.blockly-workspace-wrapper [class*="step"] span[class*="text-"] {
    margin-right: 8px !important;
}

/* Extra spacing for standalone labels - BLOCKLY ONLY */
.blockly-workspace-wrapper span.font-medium:first-child,
.blockly-workspace-wrapper span.font-semibold:first-child {
    margin-right: 12px !important;
}
