.transformations_loader_overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 52, 102, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.transformations_loader_overlay.is-visible {
    display: flex;
}

.transformations_loader_content {
    text-align: center;
    color: #ffffff;
    font-size: 16px;
}

.transformations_loader_spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #7ab8ff;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: transformations_loader_spin 1s linear infinite;
}

.transformations_loader_text {
    font-weight: 600;
    letter-spacing: .5px;
}

.btn-loading {
    opacity: .8;
    position: relative;
}

.btn-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.6);
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
    animation: transformations_loader_spin .8s linear infinite;
}

@keyframes transformations_loader_spin {
    to {
        transform: rotate(360deg);
    }
}

/**
 * Edit Page - Outermost Container Styles
 * Matching Figma design specifications for the main form container
 */

/* Edit form container - matching Figma design */
form.edit_form {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 55px;
}


/**
 * Test Page Version Dropdown Styles
 * Custom dropdown for selecting transformation versions on the test page
 */

.test_version_dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.test_version_dropdown_trigger {
    width: 100%;
    padding: 12px 40px 12px 15px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    font-family: inherit;
    min-height: 44px;
}

.test_version_dropdown_trigger:hover {
    border-color: #2196F3;
}

.test_version_dropdown.test_version_dropdown_open .test_version_dropdown_trigger {
    border-color: #2196F3;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.test_version_dropdown_arrow {
    color: #666;
    font-size: 12px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.test_version_dropdown.test_version_dropdown_open .test_version_dropdown_arrow {
    transform: rotate(180deg);
}

.test_version_dropdown_options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #2196F3;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.test_version_dropdown.test_version_dropdown_open .test_version_dropdown_options {
    display: block;
}

.test_version_dropdown_option {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.test_version_dropdown_option:last-child {
    border-bottom: none;
}

.test_version_dropdown_option:hover {
    background: #f5f5f5;
}

.test_version_dropdown_option.test_version_dropdown_option_selected {
    background: #e3f2fd !important;
    font-weight: 500;
    color: #1976d2;
}

.test_version_dropdown_selected_text {
    flex: 1;
    text-align: left;
}

/* Custom scrollbar for options */
.test_version_dropdown_options::-webkit-scrollbar {
    width: 8px;
}

.test_version_dropdown_options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.test_version_dropdown_options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.test_version_dropdown_options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Disabled state */
.test_version_dropdown.test_version_dropdown_disabled .test_version_dropdown_trigger {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .test_version_dropdown {
        width: 100%;
    }
    
    .test_version_dropdown_options {
        max-height: 250px;
    }
}


/**
 * File Search Styles
 * Search input for filtering files from connected apps
 */

 .file-search-container {
    position: relative;
    width: 100%;
}

.file-search-input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.file-search-input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.file-search-input::placeholder {
    color: #999;
}



/**
 * Edit Page - Reference Content Management Styles
 * Styles for adding/removing reference labels in edit.html
 * Naming convention: edit_classname_functionality
 */

/* Make stakeholder insight container full width */
.stakeholder_insight_container {
    width: 100%;
    box-sizing: border-box;
}

/* Make reference container full width with gap */
.edit_references_container_wrapper {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edit_reference_item {
    width: 100%;
    box-sizing: border-box;
    background: #FFF;
    border: 1px solid #BFBFBF;
    border-radius: 5px;
    padding: 18px;
    margin-bottom: 0;
    display: flex !important;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.edit_reference_item:hover {
    border-color: #BFBFBF;
    box-shadow: none;
}

/* Show and style the label div */
.edit_reference_label {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-width: 100px;
}

.edit_reference_label strong {
    color: #364153;
    font-family: Helvetica;
    font-size: 14px;
    font-weight: 700;
    line-height: 21px;
}

.edit_reference_input_wrapper {
    flex: 1;
    width: 100%;
}

.edit_reference_input {
    width: 100%;
    padding: 12px 16px !important;
    border: 1px solid #D1D5DC !important;
    border-radius: 5px;
    background: #FFF !important;
    color: #0A0A0A;
    font-family: Helvetica;
    font-size: 14px !important;
    font-style: normal;
    line-height: 21px;
    box-sizing: border-box;
    height: auto;
    min-height: 44px;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.edit_reference_input:focus {
    outline: none;
    border-color: #D1D5DC !important;
    box-shadow: none !important;
}

.edit_reference_input::placeholder {
    color: #999;
}

.edit_reference_input_error {
    border-color: #d32f2f !important;
    background-color: #ffebee !important;
}

/* Error styling for all input fields (reusing reference error colors) */
/* Target all form elements with error class - the !important ensures it overrides any specific background rules */
input.edit_input_error,
textarea.edit_input_error,
select.edit_input_error {
    border-color: #d32f2f !important;
    background-color: #ffebee !important;
}

.edit_reference_remove_btn_wrapper {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit_reference_remove_btn {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    border: 1px solid #FB2C36;
    background: #FFF;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10);
    color: #FB2C36;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit_reference_remove_btn:hover {
    background: #FB2C36;
    color: #FFF;
    transform: none;
}

.edit_reference_remove_btn:active {
    transform: none;
}

.edit_reference_remove_btn i {
    width: 13px;
    height: 15px;
    flex-shrink: 0;
    aspect-ratio: 13/15;
    color: #FB2C36;
}

.edit_reference_remove_btn:hover i {
    color: #FFF;
}

/* #add_insight_btn {
    margin-bottom: 30px;
} */

#stakeholder_insight_container {
    margin-bottom: 30px;
}

/* SEO Details Styles */
.edit_seo_textarea {
    height: 50px !important;
    min-height: 50px !important;
    resize: none;
    overflow-y: auto;
}

.edit_seo_container {
    /* margin-bottom: 15px; */
    width: 100%;
    gap: 12px;
    display: flex;        /* Add this - makes gap work */
    flex-direction: column;
}

.edit_seo_item {
    /* margin-bottom: 20px; */
    padding: 18px;
    border: 1px solid #BFBFBF;
    background: #F9FAFB;
    border-radius: 5px;
    display: flex;
    /* width: 100%; */
    /* height: 206px; */
    /* padding: 18px 0 18px 18px; */
    flex-direction: column;
    /* align-items: flex-start; */
    gap: 16px;
    /* flex-shrink: 0; */
    position: relative;
}

.edit_seo_field {
    margin-bottom: 15px;
}

.edit_seo_field:last-child {
    margin-bottom: 0;
}

.edit_seo_input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    height: 40px;
}

.edit_seo_input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.edit_seo_solution_item,
.edit_seo_stakeholder_item {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.edit_seo_solution_item:hover,
.edit_seo_stakeholder_item:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.edit_seo_remove_btn_wrapper {
    display: flex;
    /* padding: 6px 10px; */
    align-items: center;
    /* gap: 4px; */
}

.edit_seo_remove_btn {
    border-radius: 5px;
    border: 1px solid #FB2C36;
    background: #FFF;
    color: #FB2C36;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 14px;
    font-family: inherit;
}

.edit_seo_remove_btn:hover {
    background: #FB2C36;
    color: #FFF;
}

.edit_seo_remove_btn:active {
    transform: scale(0.95);
}

.edit_seo_remove_btn i {
    font-size: 14px;
    line-height: 1;
}

/**
 * Edit Page - Insights Builder
 */

.insights_container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.insight_item {
    width: 100%;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid #BFBFBF;
    background: #FFF;
    padding: 0;
}

.insight_item_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 63px;
    padding: 0 16px;
    gap: 12px;
    margin-bottom: 0;
    cursor: pointer;
}

.insight_item_header_left {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
}

.insight_item_header_right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.insight_title {
    color: #333;
    font-size: 16px;
}

.insight_remove_btn {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    border: 1px solid #FB2C36;
    background: #FFF;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10);
    color: #FB2C36;
    width: 32px;
    height: 32px;
}

.insight_remove_btn i {
    width: 13px;
    height: 15px;
    flex-shrink: 0;
    aspect-ratio: 13/15;/* Red icon color to match border */
}

.insight_remove_btn:hover {
    background: #FB2C36;
    color: #FFF;
}

.insight_fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px 16px;
    border-radius: 5px;
    background: #FFF;
}

/* Collapsible insight styles */
.insight_item.collapsed .insight_fields {
    display: none;
}


/* Collapse button uses dropdown icon container style - rotation for collapsed state */
.insight_item.collapsed .edit_section_content_item_select_icon_container .edit_section_content_item_select_icon {
    transform: rotate(-90deg);
}



.edit_system_prompt_textarea {
    height: 48px !important;
    min-height: 48px !important;
    resize: none;
    overflow-y: auto;
}

.insight_data_type_config {
    padding: 14px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.insight_data_type_config > .edit_section_content_item:not(:last-child),
.insight_data_type_config > .insight_paired_field_group:not(:last-child),
.insight_data_type_config > .insight_dynamic_column_group:not(:last-child) {
    margin-bottom: 14px;
}

.insight_data_type_config .edit_section_content_item_label {
    color: #364153 !important;
    font-family: "Helvetica Neue" !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 450 !important;
    line-height: 21px !important;
}

.insight_data_type_description {
    margin-top: 8px;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #BFBFBF;
    background: #F4F4F4;
    font-size: 14px;
    color: #364153;
    font-style: normal;
    white-space: pre-wrap;
    font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif;
    line-height: 21px;
    width: 100%;
    box-sizing: border-box;
}


.insight_dynamic_column_group {
    display: grid !important;
    grid-template-columns: 2fr 1.5fr 6.5fr !important;
    column-gap: 16px;
    row-gap: 0;
    padding: 12px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.insight_dynamic_column_group .edit_section_content_item {
    margin-bottom: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.insight_dynamic_column_group .edit_section_content_item_label {
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 5px;
}

.insight_dynamic_column_group .edit_section_content_item input,
.insight_dynamic_column_group .edit_section_content_item textarea,
.insight_dynamic_column_group .edit_section_content_item select {
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box !important;
    max-width: 100%;
    margin: 0;
}

.insight_dynamic_column_group .edit_section_content_item:not(:last-child) {
    margin-right: 0;
}

.insight_paired_field_group {
    display: grid;
    grid-template-columns: 3fr 7fr;
    column-gap: 16px;
    padding: 12px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.insight_paired_field_group .edit_section_content_item {
    margin-bottom: 0;
}

/**
 * View Page Styles
 */

.view_actions_buttons {
    display: flex;
    gap: 10px;
}

/**
 * Test Page - Reference Content Section Styles
 * Styles for the reference content section in test.html
 */

.test_description_reference_content {
    margin: 5px 0 10px 0;
    font-size: 14px;
}

/**
 * Test Page - Insights select all
 * Row above insight cards for "Select all" checkbox (test.html)
 */

.test_insights_select_all_row {
    margin-bottom: 8px;
    font-size: 14px;
}

.test_insights_select_all_label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #333;
}

.test_insights_select_all_checkbox {
    cursor: pointer;
    flex-shrink: 0;
}

/**
 * Test Page - Meta Parameters Styles
 * Styles for LLM model parameters during testing
 * Naming convention: test_meta_parameter_classname
 */

.test_meta_parameter_field {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
    align-items: flex-start;
}

.test_meta_parameter_field:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.test_meta_parameter_field_label {
    flex: 1;
}

.test_meta_parameter_field_label label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.test_meta_parameter_field_label strong {
    color: #2196F3;
    font-size: 14px;
}

.test_meta_parameter_suffix {
    font-size: 12px;
    color: #999;
    font-weight: normal;
    margin-left: 5px;
}

.test_meta_parameter_description {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.test_meta_parameter_hint {
    margin: 3px 0 0 0;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.test_meta_parameter_field_input {
    flex: 0 0 180px;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.test_meta_parameter_input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 40px;
}

.test_meta_parameter_input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.test_meta_parameter_input::placeholder {
    color: #999;
}

.test_meta_parameter_checkbox_wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

.test_meta_parameter_checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.test_meta_parameter_checkbox_label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

/* Mobile responsive for Meta parameters */
@media (max-width: 768px) {
    .test_meta_parameter_field {
        flex-direction: column;
        gap: 10px;
    }
    
    .test_meta_parameter_field_input {
        flex: 0 0 auto;
        width: 100%;
    }
}

/**
 * Test Page Styles
 * Styles for transformation testing page (test.html)
 */

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

/* Page reload overlay animation */
#page_reload_overlay {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Split Pane Styles */
#split_container {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    overflow-x: hidden;
}

/* Ensure content wraps and doesn't overflow */
#left_panel *,
#right_panel * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

#left_panel pre,
#right_panel pre {
    overflow-x: auto;
    max-width: 100%;
}

/* Ensure form elements don't overflow */
#left_panel textarea,
#left_panel input[type="text"],
#left_panel select {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix textarea height and resize */
#left_panel textarea {
    min-height: 200px !important;
    resize: vertical !important;
    display: block !important;
}

#reference_text {
    min-height: 200px !important;
    resize: vertical !important;
    display: block !important;
}

/* Ensure textarea resize handle is visible */
textarea {
    overflow: auto !important;
}

/* Fix for all textareas in form fields */
form.edit_form ._field textarea {
    display: block !important;
}

/* Specific fix for resizable textareas - highest specificity */
form.edit_form ._field ._value textarea.resizable-textarea,
textarea.resizable-textarea,
#reference_text {
    display: block !important;
    resize: vertical !important;
    overflow: auto !important;
    -webkit-appearance: textfield !important;
    appearance: textfield !important;
}

/* Override global flex display on all textareas */
div._value textarea {
    display: block !important;
}

/* Scrollbar styles for panels */
#left_panel::-webkit-scrollbar,
#right_panel::-webkit-scrollbar {
    width: 8px;
}

#left_panel::-webkit-scrollbar-track,
#right_panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#left_panel::-webkit-scrollbar-thumb,
#right_panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#left_panel::-webkit-scrollbar-thumb:hover,
#right_panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Version selector */
#version_selector:hover {
    border-color: #999 !important;
}

#version_selector:focus {
    outline: none;
    border-color: #2196F3 !important;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Input mode cards */
.input-mode-card {
    transition: all 0.3s ease;
}

.input-mode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.input-mode-card.active {
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Parameter mode cards */
.param-mode-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Parameter items */
.parameter_item {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

.parameter_item:hover {
    border-color: #bbb !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* App items */
.app_item:hover {
    background: #f5f5f5;
}

.app_item.active {
    background: #e3f2fd;
}

.app_item img {
    width: 24px !important;
    height: 24px !important;
}

.app_item i.fa-fw {
    font-size: 24px;
}

/* File items */
.file_item {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file_item:hover {
    background: #f9f9f9;
}

.file_item.selected {
    background: #e8f5e9;
    border-color: #4CAF50;
}

.file_item input[type="radio"] {
    width: 18px;
    height: 18px;
}

/* Selected file chips */
.selected_file_chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 16px;
    margin: 4px;
    font-size: 13px;
}

.selected_file_chip .remove_btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin: 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    #split_container {
        flex-direction: column !important;
        min-height: calc(100vh - 150px);
        max-width: 100vw !important;
    }
    
    #left_panel {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #ddd;
        max-height: none;
    }
    
    #divider {
        display: none !important;
    }
    
    #right_panel {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 400px;
    }
    
    .input-mode-card {
        padding: 15px !important;
    }
    
    .input-mode-card h4 {
        font-size: 14px !important;
    }
    
    .input-mode-card p {
        font-size: 12px !important;
    }
    
    #version_selector {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .input-mode-container {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    #mode_card_text,
    #mode_card_files {
        margin-bottom: 0 !important;
    }
}

/**
 * Edit Page - Section Organization Styles
 * Highly visible section headings that act as navigation landmarks
 * Naming convention: edit_section_component
 */

/* Section Container - outer wrapper with border matching Figma design */
.edit_section_container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    padding: 1px;
    border: 1px solid #BFBFBF;
    border-radius: 5px;
    background: #FFF;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.10);
    margin-bottom: 12px;
}

/* Section Header Container */
.edit_section_header {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    padding: 15px;
    background: #E3F2FD;
    border-bottom: var(--borderd);
}

/* Inner frame inside header - matching Figma design */
.edit_section_header_frame {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.edit_insights_header_actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Section Heading Text */
.edit_section_heading {
    color: #364153;
    font-style: normal;
    font-family: Helvetica;
    font-size: 18px;
    font-weight: 700;
    line-height: 27px;
}

/* Question mark icon container - matching Figma design */
.edit_section_header_icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px;
    border-radius: 25px;
    border: 1px solid #364153;
    background: #FFF;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    align-self: center;
    box-sizing: border-box;
    line-height: normal;
    font-size: 14px;
    margin: 0;
    vertical-align: baseline;
    color: inherit;
}

.edit_section_header_icon:hover .edit_section_header_icon_frame i {
    color: #1976D2;
    font-size: 17px;
    font-weight: 1500;
}

.edit_section_header_icon_frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.edit_section_header_icon_frame i {
    color: #364153;
}

/* Section Content Container - matching Figma design */
.edit_section_content {
    display: flex;
    /* height: 388px; */
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    flex-shrink: 0;
    align-self: stretch;
}

.edit_section_content_item {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    /* height: 76px; */
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex-shrink: 0;
}

.edit_section_content_item_label {
    display: flex;
    /* width: 575px; */
    /* padding-right: 558px; */
    align-items: center;
    color: #364153;
    font-family: Helvetica;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 21px;
}

.edit_section_content_item_value_non_editable {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px !important;
    align-items: center;
    bottom: 0;
    border-radius: 5px;
    border: 1px solid #D1D5DC;
    background: #F4F4F4;
    color: #4A5565;
    font-family: Helvetica;
    font-size: 14px !important;
    font-style: normal;
    line-height: 21px; /* 150% */
}

.edit_section_content_item_value_editable {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px !important;
    align-items: center;
    bottom: 6px;
    border-radius: 5px;
    border: 1px solid #D1D5DC !important;
    background: #FFF !important;
    color: #0A0A0A;
    font-family: Helvetica;
    font-size: 14px !important;
    font-style: normal;
    line-height: 21px;
    box-shadow: none !important;
}

.edit_section_content_item_select_wrapper {
    position: relative;
    width: 100%;
}

.edit_section_content_item_select_icon_container {
    position: absolute;
    right: 8.5px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    width: 27px;
    height: 27px;
    justify-content: center;
    align-items: center;
    border-radius: 3.375px;
    background: #D1D5DC;
}

.edit_section_content_item_select_icon {
    height: 18px;
    flex-shrink: 0;
}

.edit_section_content_item_value_select {
    width: 100%;
    display: flex;
    height: 44px;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #D1D5DC;
    background: #FFF;
    -webkit-appearance: none;
}

.edit_section_content_item_value_textarea {
    display: flex;
    width: 100%;
    height: 110px;
    padding: 12px 16px !important;
    border-radius: 5px;
    border: 1px solid #D1D5DC;
    background: #FFF;
    /* position: absolute; */
    left: -1.5px;
    bottom: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px !important;
    resize: vertical;
}

/* Error message styling for edit section content items */
.edit_section_content_item ._error {
    padding: 6px 10px;
    color: #d32f2f;
    word-break: break-word;
    font-size: 14px;
    font-family: Helvetica, Arial, sans-serif;
    line-height: 21px;
    min-height: 21px;
    border: 1px solid #d32f2f;
    border-radius: 4px;
    margin-top: 4px;
}

.edit_section_content_item_value_seo_overview {
    display: flex;
    width: 100%;
    height: 80px;
    padding: 12px 16px;
    border-radius: 5px;
    border: 1px solid #D1D5DC;
    background: #FFF;
    left: -1.5px;
    bottom: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.edit_section_content_item_decision_outcomes_container {
    display: flex;
    /* width: 1320px;
    height: 206px; */
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    flex-shrink: 0;
    border-radius: 5px;
    border: 1px solid #BFBFBF;
    background: #F9FAFB;
}

.edit_section_content_item_decision_outcomes_heading_label {
    color: #364153;
    font-family: Helvetica;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
}

/* SEO Solutions label - blue color to distinguish as section header */
.seo_solutions_label {
    color: #1976D2;
    padding-top: 10px;
}

/* Solution Type wrapper - makes it look like a sub-part of SEO Solutions */
.solution_type_wrapper {
    padding-top: 10px;
    width: 100%;
    margin-bottom: 7px;
}

.solution_type_label {
    color: #364153;
    font-family: Helvetica;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 21px; /* 150% */
    padding-bottom: 4px;
}

.edit_section_content_item_decision_outcomes_heading_value {
    display: flex;
    margin-top: 2px !important;
    width: 100%;
    height: 47px !important;
    padding: 12px 16px !important;
    /* align-items: center; */
    /* position: absolute; */
    /* right: -308px; */
    /* bottom: 0; */
    border-radius: 5px;
    border: 1px solid #D1D5DC;
    background: #FFF;
    color: #0A0A0A;
    font-family: Helvetica;
    font-size: 14px !important;
    font-style: normal;
    /* font-weight: 400; */
    line-height: 21px;
}

.edit_section_content_item_decision_outcomes_body_value {
    display: flex;
    width: 100%;
    height: 80px;
    padding: 12px 16px;
    border-radius: 5px;
    border: 1px solid #D1D5DC;
    background: #FFF;
    left: -1.5px;
    bottom: 0;
    box-sizing: border-box;
    /* font-family: inherit; */
    /* font-size: 14px; */
    resize: vertical;
    
    color: #0A0A0A;
    font-family: Helvetica;
    font-size: 14px !important;
    font-style: normal;
    /* font-weight: 400; */
    line-height: 21px; /* 150% */
    
}

.edit_section_content_item_solutions_heading_label_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.edit_section_add_button {
    display: flex;
    padding: 8px 10px;
    align-items: center;
    gap: 4px;
    border-radius: 5px;
    border: 1px solid #1976D2;
    color: #1976D2;
    text-align: center;
    font-family: Helvetica;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 21px; /* 150% */
    background: #FFF;
}

.edit_section_add_button_full {
    display: flex;
    padding: 8px 10px;
    align-items: center;
    gap: 4px;
    border-radius: 5px;
    border: 1px solid #1976D2;
    background: #1976D2;
    text-align: center;
    font-family: Helvetica;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 21px; /* 150% */
    color: #FFF;
}

/* Edit Page - Description Text Styles */
.edit_description_text {
    padding-top: 2px;
    padding-bottom: 10px;
    color: #4A5565;
    font-family: Helvetica;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 21px; /* 150% */
}

#insights_dropdown_container {
    padding-top: 20px;
}

/* Edit Page - References Container Wrapper */
.edit_references_container_wrapper {
    margin-bottom: 15px;
}

/* Utils Page Styles */
.transformations_utils_container {
    max-width: 800px;
    margin: 0;
}

.transformations_utils_section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.transformations_utils_section_heading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.transformations_utils_section_content {
    padding: 10px 0;
}

.transformations_utils_description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/**
 * Edit Page - Action Buttons Container
 * Styles for Save, Publish, Unpublish, Test buttons matching Figma design
 */
.edit_actions_container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 15px;
    margin: 0;
    background: #FFF;
    border-top: var(--borderd);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--bgd);
}

.edit_action_button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit_action_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.transformations_utils_sheet_link {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #1a73e8;
    text-decoration: none;
    margin-bottom: 20px;
}

.transformations_utils_sheet_link:hover {
    text-decoration: underline;
}

.transformations_sync_audience_button,
.transformations_sync_categories_button,
.transformations_sync_solutions_button {
    min-width: 150px;
    position: relative;
}

.transformations_sync_audience_button i,
.transformations_sync_categories_button i,
.transformations_sync_solutions_button i {
    margin-right: 8px;
}

.transformations_sync_audience_button:disabled,
.transformations_sync_categories_button:disabled,
.transformations_sync_solutions_button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.transformations_sync_audience_button_loading,
.transformations_sync_categories_button_loading,
.transformations_sync_solutions_button_loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.transformations_sync_audience_button i.fa-spin,
.transformations_sync_categories_button i.fa-spin,
.transformations_sync_solutions_button i.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Result message container */
.transformations_sync_audience_result,
.transformations_sync_categories_result,
.transformations_sync_solutions_result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    display: none;
    animation: transformations_sync_audience_fadeIn 0.3s ease-in;
}

.transformations_sync_audience_result:not(:empty),
.transformations_sync_categories_result:not(:empty),
.transformations_sync_solutions_result:not(:empty) {
    display: block;
}

.transformations_sync_audience_result_loading,
.transformations_sync_categories_result_loading,
.transformations_sync_solutions_result_loading {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    color: #1976d2;
}

.transformations_sync_audience_result_success,
.transformations_sync_categories_result_success,
.transformations_sync_solutions_result_success {
    background-color: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
}

.transformations_sync_audience_result_error,
.transformations_sync_categories_result_error,
.transformations_sync_solutions_result_error {
    background-color: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
}

.transformations_sync_audience_result_message,
.transformations_sync_categories_result_message,
.transformations_sync_solutions_result_message {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transformations_sync_audience_result_main,
.transformations_sync_categories_result_main,
.transformations_sync_solutions_result_main {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transformations_sync_audience_result_main i,
.transformations_sync_categories_result_main i,
.transformations_sync_solutions_result_main i {
    font-size: 16px;
}

.transformations_sync_audience_result_details,
.transformations_sync_categories_result_details,
.transformations_sync_solutions_result_details {
    font-size: 13px;
    color: #555;
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.transformations_sync_audience_result_details strong,
.transformations_sync_categories_result_details strong,
.transformations_sync_solutions_result_details strong {
    color: #333;
    font-weight: 600;
}

/* Edit page category dropdowns */
.edit_categories_container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.edit_categories_select {
    width: 100%;
    max-width: none;
    min-height: 38px;
    font-size: 14px;
}

.edit_categories_select option:first-child {
    font-style: italic;
    color: #999;
}

.edit_categories_select_placeholder {
    font-style: italic;
    color: #999;
}

.edit_categories_select_placeholder option:not(:first-child) {
    font-style: normal !important;
    color: #000 !important;
}

.edit_categories_select_loading {
    cursor: progress;
    color: #777;
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    background-size: 14px 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%23999' d='M10 0a10 10 0 0 1 0 20 1.4 1.4 0 0 1 0-2.8 7.2 7.2 0 1 0 0-14.4A1.4 1.4 0 0 1 10 0z'/%3E%3C/svg%3E");
}

@keyframes transformations_sync_audience_fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Version Audience Multi-Select */
.version_audience_multi_select {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.version_audience_selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
}

.version_audience_tag {
    display: inline-flex;
    align-items: center;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    gap: 6px;
}

.version_audience_remove {
    cursor: pointer;
    margin-left: 6px;
    font-size: 12px;
}

.version_audience_remove:hover {
    color: #d32f2f;
}

.version_audience_dropdown_wrapper {
    position: relative;
}

.version_audience_add_btn {
    display: flex;
    padding: 8px 10px;
    align-items: center;
    gap: 4px;
    border-radius: 5px;
    border: 1px solid #1976D2;
    color: #1976D2;
    text-align: center;
    font-family: Helvetica;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 21px;
    background: #FFF;
    cursor: pointer;
}

.version_audience_add_btn:hover {
    background-color: #f5f5f5;
}

.version_audience_dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.version_audience_dropdown_option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.version_audience_dropdown_option:last-child {
    border-bottom: none;
}

.version_audience_dropdown_option:hover {
    background-color: #f5f5f5;
}


/**
 * NEW: Readonly Insights Styles
 * Purpose: Visual styling for insights from global collection (non-editable)
 */
.insight_readonly {
    border-radius: 5px;
    border: 1px solid #BFBFBF !important;
    background: #F4F4F4 !important;
    padding: 0;
}

.insight_readonly input,
.insight_readonly textarea,
.insight_readonly select {
    background-color: #F4F4F4 !important;
    cursor: not-allowed !important;
    color: #4A5565 !important;
    border: 1px solid #D1D5DC !important;
    box-shadow: none !important;
    padding: 12px 16px !important;
}

/* Override disabled opacity for readonly insights */
.insight_readonly input[disabled],
.insight_readonly textarea[disabled],
.insight_readonly select[disabled] {
    opacity: 1 !important;
}

.insight_readonly .insight_item_header {
    display: flex;
    height: 63px;
    padding: 0 16px;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    justify-content: space-between;
}

/* When non-editable insight is expanded, header should be white */
.insight_readonly:not(.collapsed) .insight_item_header {
    background: #FFF;
}

/* When collapsed, header inherits the #F4F4F4 from parent */
.insight_readonly.collapsed .insight_item_header {
    background: #F4F4F4;
}

.insight_readonly .insight_item_header_left {
    gap: 12px;
}

.insight_readonly .insight_item_header_right {
    gap: 12px;
}

.insight_readonly .version_audience_selected {
    opacity: 0.8;
    pointer-events: none;
}

/* NEW: Allow remove button to work for Insight Solutions only (not Audience) in readonly insights */
/* Target only remove buttons within solutions field container that contains input.insight_field_solutions */
.insight_readonly .edit_section_content_item:has(input.insight_field_solutions) .version_audience_selected .version_audience_remove {
    pointer-events: auto;
    cursor: pointer;
}

/* NEW: Bright blue background for solution tags in published (readonly) insights */
.insight_readonly .version_audience_tag {
    background-color: #FFFFFF !important;
}

.insight_readonly_message {
    padding: 10px 12px;
    margin-bottom: 12px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insight_readonly_message i {
    color: #ffc107;
    font-size: 14px;
}

/* Prompt Modal */
.insight_prompt_modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.insight_prompt_modal_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.insight_prompt_modal_content {
    position: relative;
    background: white;
    width: 85%;
    max-width: 1200px;
    max-height: 85vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 1;
}

.insight_prompt_modal_header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.insight_prompt_modal_header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.insight_prompt_modal_close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insight_prompt_modal_close:hover {
    color: #333;
}

.insight_prompt_modal_body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.edit_column_names_empty_message {
    margin: 0;
    color: #4A5565;
    font-size: 14px;
}

.edit_column_names_table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}

.edit_column_names_table th,
.edit_column_names_table td {
    border: 1px solid #D1D5DC;
    padding: 10px 14px;
    text-align: left;
}

.edit_column_names_table th {
    background: #E5E7EB;
    color: #364153;
    font-weight: 700;
}

.insight_prompt_text {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: #333;
}

.insight_prompt_display {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.insight_prompt_section {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
}

.insight_prompt_section_title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.insight_prompt_section_collapsible .insight_prompt_section_title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.insight_prompt_section_collapsible .insight_prompt_section_title:hover {
    color: #0066cc;
}

.insight_prompt_content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    max-height: 500px;
    overflow-y: auto;
    margin: 0;
    outline: none;
    cursor: text;
}

.insight_prompt_content:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.insight_prompt_content[contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}