/*
 * This file belongs to Hoist, an application development toolkit
 * developed by Extremely Heavy Industries (www.xh.io | info@xh.io)
 *
 * Copyright © 2026 Extremely Heavy Industries Inc.
 */

.xh-action-col-cell {
  .xh-show-on-hover {
    .xh-record-action-button {
      visibility: hidden;
    }
  }

  // Keep the buttons in the action column a consistent size so we can calc the column width
  button.xh-record-action-button {
    max-width: 24px;
  }

  // Ensure buttons center-align within their button group if column set to (default) align:center.
  &.xh-align-center .xh-button-group {
    justify-content: center;
  }
}

// Tighten up buttons in for the various grid sizing modes to avoid clipping/overflow.
.xh-ag-grid {
  &--large {
    .xh-action-col-cell {
      button.xh-record-action-button {
        min-height: 28px;
        max-height: 28px;

        svg.svg-inline--fa {
          width: 1.2em;
        }
      }
    }
  }

  &--compact {
    .xh-action-col-cell {
      button.xh-record-action-button {
        min-height: 20px;
        max-height: 20px;

        svg.svg-inline--fa {
          width: 0.9em;
        }
      }
    }
  }

  &--tiny {
    .xh-action-col-cell {
      button.xh-record-action-button {
        max-height: 14px;
        min-height: 14px;

        svg.svg-inline--fa {
          width: 0.7em;
        }
      }
    }
  }
}

.ag-row.ag-row-hover {
  .xh-action-col-cell {
    .xh-show-on-hover {
      .xh-record-action-button {
        visibility: visible;
      }
    }
  }
}
