/**
 * @license
 * Copyright Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
@use '../../core/styles/elevation';
@use '../base/mixins' as base-mixins;

@mixin core-styles() {
  @include base-mixins.core-styles;

  .forge-drawer {
    &--modal {
      @include base;

      &.forge-drawer--closing,
      &.forge-drawer--closed {
        @include closed;
      }

      &.forge-drawer--closing {
        &.forge-drawer--right {
          transform: translateX(100%);
        }
      }
    }
    
    &__scrim {
      @include scrim;

      &--closed {
        display: none;
      }
    }
    
    &.forge-drawer--right {
      @include right;
    }

    &--display-none {
      display: none !important;
    }
  }
}

@mixin base() {
  z-index: #{elevation.z-index-variable(dialog)};
  box-shadow: #{elevation.value(24)};
  position: absolute;
  top: 0;
  max-width: 80%;
}

@mixin right() {
  right: 0;
}

@mixin closed() {
  box-shadow: none;
}

@mixin scrim() {
  z-index: #{elevation.z-index-variable(dialog)};
}
