/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
@use '../theme';
@use '../utils/variables-grid';
@use '../utils/mixins-grid';
@use '../theme/theme-values';
@use './variables';

.forge-form-section {
  padding-bottom: 24px;
  border-bottom: theme-values.$border;

  &:last-of-type {
    padding-bottom: 0;
    border-bottom: none;
  }

  & .forge-form-section__header {
    margin-top: 12px;
    margin-bottom: 12px;
  }

  & .forge-form-section__field {
    min-height: 36px;
    margin-top: 8px;
    margin-bottom: 8px;
    & label {
      font-size: 0.85em;
      color: theme-values.$label-color;
      display: block;
      margin-bottom: 4px;
    }
  }

  & .forge-table {
    margin-top: -8px;
    margin-bottom: 24px;
  }
}

.forge-form-grid {
  display: grid;
  grid-gap: 0 #{variables-grid.$form-gap}px;
  grid-template-columns: repeat(auto-fill, #{variables-grid.$form-column-width}px);

  &__cell {
    &--cols-span {
      grid-column: 1 / -1;
      overflow: hidden;
    }
    &--cols-1 {
      @include mixins-grid.form-cell(1);
    }
    &--cols-2 {
      @include mixins-grid.form-cell(2);
    }
    &--cols-3 {
      @include mixins-grid.form-cell(3);
    }
    &--cols-4 {
      @include mixins-grid.form-cell(4);
    }
  }
}