/*
 * alignvu UI v2.1: Align > datafeed wizard > Field Mappings > Add / Edit mapping, the steps as pages of their own
 * (Static Value and Model Field in application/views/configuration/configure/field_mapping_steps.php, Value Mappings in
 * value_mappings.php, Filter Conditions in filter_conditions.php; behaviour: js/align_to/configure/field_mapping_steps.js).
 * Each step is a Panel: its title and intro, its body, then Back / Cancel on the left and Next or Save on the right.
 * Loaded after css/v21_align_field_mappings.css and v21_align_field_mapping_rows.css, whose dialog rules it turns
 * into page rules.
 */

.app-align-mapping-step {
    padding: 0 0 var(--space-6);
}

/* A Panel, not a pop-up (overrides the fixed widths, padding, shadow and 80vh height of .filter-conditions and
   .value-mappings in css/align_to.css and v21_align_field_mappings.css) */
.app-align-mapping-step .app-align-mapping-step__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: var(--space-5) var(--space-6);
    background: var(--surface);
    box-shadow: none;
    overflow: visible;
}

.app-align-mapping-step .modal-body,
.app-align-mapping-step .value-mappings {
    width: auto;
    max-height: none;
    margin: 0;
    overflow: visible;
}

.app-align-mapping-step .app-dialog__actions {
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* Value Mappings and Filter Conditions keep a readable width on a wide screen */
.app-align-mapping-step:is([data-view="configuration value mappings"], [data-view="configuration filter conditions"]) .app-align-mapping-step__panel {
    max-width: 960px;
}

/* Static Value */
.app-align-mapping-step__static {
    max-width: 420px;
}

/* Model Field: the native field's row (its table and field chips) and the data model picker beside it, under the
   Field Mappings headings with the picker's four columns named */
.app-align-mapping-step__picker.app-align-fields {
    gap: 12px;
}

.app-align-mapping-step .app-align-mapping-step__model-headings {
    grid-template-columns: var(--app-align-fields-model);
}

.app-align-mapping-step .align-mapping-model-canvas {
    min-height: 120px;
    padding: 12px 0;
}

/* the picker's chips stay clickable here (Field Mappings lets clicks through a saved mapping's chips) */
.app-align-mapping-step .end-to-end-data-model-container .icx-mapping-tag:not(.display) {
    pointer-events: auto;
}

.app-align-mapping-step .align-mapping-model-error {
    margin: 0;
}

/* the row's saved mappings stay on Field Mappings (the picker shows the field being picked) */
.app-align-mapping-step .align-mapping-model-canvas .field-mapping-display-row {
    display: none;
}

/* hidden buttons stay hidden (.av-btn sets its own display) */
.app-align-mapping-step .av-btn[hidden] {
    display: none;
}

/* the step's title (overrides the grey heading of .filter-conditions in css/align_to.css) */
.app-align-mapping-step .app-dialog__title {
    margin: 0;
    font: 600 17px/24px var(--font-display);
    color: var(--heading-ink);
}
