@use "sass:map";

$drawerWidth: 680px;

@keyframes drawerIn {
  0% {
    right: -$drawerWidth;
  }

  100% {
    right: 0;
  }
}

.vuiDrawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: $drawerWidth;
  background-color: $colorEmptyShade;
  border-left: 1px solid $borderColor;
  z-index: $drawerZIndex;
  animation: drawerIn $transitionSpeed cubic-bezier(0, 1, 0, 1);
}

.vuiDrawerHeader {
  padding: $sizeS $sizeL;
  background-color: $colorLightShade;
}

.vuiDrawerHeader__title {
  font-size: $fontSizeMedium;
  font-weight: $fontWeightBold;
  line-height: 1.2;
  color: $colorText;
}

.vuiDrawerContent {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vuiDrawerContent__inner {
  padding: $sizeL $sizeL;
}

// Color
$color: (
  primary: (
    "color": $colorPrimary
  ),
  danger: (
    "color": $colorDanger
  )
);

@each $colorName, $colorValue in $color {
  .vuiDrawer--#{$colorName} {
    .vuiDrawerHeader {
      .vuiIcon {
        color: #{map.get($colorValue, "color")};
      }
    }
  }
}
