@use "./variables" as *;

.#{$component-prefix}floating-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: $floating-panel-z-index;
  display: flex;
  flex-direction: column;
  width: 100vw;
  touch-action: none;
  background: $floating-panel-background;
  border-top-left-radius: $floating-panel-rounded-border-radius;
  border-top-right-radius: $floating-panel-rounded-border-radius;
  will-change: transform;

  &::after {
    position: absolute;
    bottom: -100vh;
    display: block;
    width: 100vw;
    height: 100vh;
    content: "";
    background-color: inherit;
  }

  &__header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: $floating-panel-header-height;
    cursor: grab;
    user-select: none;

    &-bar {
      width: $floating-panel-bar-width;
      height: $floating-panel-bar-height;
      background: $floating-panel-bar-color;
      border-radius: $border-radius-sm;
    }
  }

  &__content {
    flex: 1;
    overflow-y: auto;
    background-color: $floating-panel-background;
  }
}
