/* Edit-icon visibility rules for Sui-registered cards/tables that ship
 * their own .fa-* edit affordances (drag handle / trash / pencil).
 *
 * The canonical home for these rules is the per-component SCSS partials
 * under resources/sass/theme/designer/smdComponents/ — they're compiled
 * into theme.css. However, when the served theme.css predates a new
 * SCSS rule (or when the SASS pipeline hasn't been re-run), the icons
 * fall back to FontAwesome's default `display: inline-block` and leak
 * through into normal (non-edit) mode.
 *
 * This standalone file plugs the gap so the visibility toggle works
 * regardless of theme.css build state. Once the SCSS has been
 * recompiled and shipped, the rules in theme.css simply duplicate
 * these (no harm) and this file can be removed.
 *
 * Components covered:
 *   - DataTable          (DataTable.js, .DataTable-tools-wrapper)
 *   - ModbusRatedDataCard (modbusRatedDataCard.js, .ModbusRatedDataCard-util)
 *
 * Add new entries below when registering more Sui components that
 * decorate their container with always-rendered .fa-* icons.
 */

/* DataTable — per-table edit + trash inside a DataTable-tools-wrapper.
 * The tools-wrapper itself stays display:flex regardless so its layout
 * doesn't collapse when the icons inside are hidden. */
.DataTable-container .DataTable-tools-wrapper {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}
.DataTable-container .DataTable-tools-wrapper .DataTable-edit-icon,
.DataTable-container .DataTable-tools-wrapper .DataTable-delete-icon {
    display: none;
}
.DataTable-container.edit .DataTable-tools-wrapper .DataTable-edit-icon,
.DataTable-container.edit .DataTable-tools-wrapper .DataTable-delete-icon {
    display: inline;
}

/* ModbusRatedDataCard — drag-handle + trash icons sit in a
 * .ModbusRatedDataCard-util holder that's appended to the card body
 * by #addEditUtil. Same toggle pattern as DataFieldCard.
 * The wrapper is hidden as a whole when not editing, then becomes a
 * flex row aligned to the right when the container has the .edit class. */
.ModbusRatedDataCard-container .ModbusRatedDataCard-util {
    display: none;
}
.ModbusRatedDataCard-container.edit .ModbusRatedDataCard-util {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}
.ModbusRatedDataCard-container.edit .ModbusRatedDataCard-util .ModbusRatedDataCard-drag {
    color: #009688;
}
.ModbusRatedDataCard-container.edit .ModbusRatedDataCard-util .ModbusRatedDataCard-delete {
    color: red;
}
