@import '../../variables';
@import '../../mixins';

%ui-settings-panel {
  @extend %ui-container;

  @include hidden-animated-with-additional-transitions(
    $animation-duration,
    (
      height: (
        0.35s,
        cubic-bezier(0.4, 0, 0.2, 1),
      ),
      width: (
        0.35s,
        cubic-bezier(0.4, 0, 0.2, 1),
      ),
    )
  );

  $background-color: transparentize($color-background-menu, 0.15);

  backdrop-filter: blur(10px);
  background-color: $background-color;
  border-radius: $border-radius;
  bottom: 3.5em;
  box-shadow: 0 0 3px 0 transparentize($color: #000, $amount: 0.75);
  height: fit-content;
  max-height: 60%;
  min-width: fit-content;
  overflow: hidden;
  overflow-y: auto;
  padding: 0;
  position: absolute;
  right: max(1em, env(safe-area-inset-right, 0));
  width: 40%;

  > .#{$prefix}-container-wrapper {
    overflow-y: auto;
  }
}

.#{$prefix}-ui-settings-panel {
  @extend %ui-settings-panel;
}

// Remove margin inherited from controlbar
.#{$prefix}-container-wrapper > .#{$prefix}-ui-settings-panel {
  margin: 0;
}
