@import 'mixins/header';
@import 'mixins/footer';

@include b(drawer) {
  @include component-header;
  @include component-footer;

  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  outline: none;

  @include e(content) {
    position: absolute;
    z-index: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    max-height: 100%;
    background-color: var(--#{$rd-prefix}background-color);
    box-shadow: 0 8px 40px 0 var(--#{$rd-prefix}shadow-color);

    @include m(top) {
      top: 0;
      left: 0;
      width: 100%;
      border-radius: 0 0 var(--#{$rd-prefix}border-radius) var(--#{$rd-prefix}border-radius);
    }

    @include m(bottom) {
      bottom: 0;
      left: 0;
      width: 100%;
      border-radius: var(--#{$rd-prefix}border-radius) var(--#{$rd-prefix}border-radius) 0 0;
    }

    @include m(left) {
      top: 0;
      left: 0;
      height: 100%;
      border-radius: 0 var(--#{$rd-prefix}border-radius) var(--#{$rd-prefix}border-radius) 0;
    }

    @include m(right) {
      top: 0;
      right: 0;
      height: 100%;
      border-radius: var(--#{$rd-prefix}border-radius) 0 0 var(--#{$rd-prefix}border-radius);
    }
  }

  @include e(body) {
    position: relative;
    flex: 1 0 0;
    padding: 20px;
    overflow: hidden auto;
  }
}
