@use '../../partials/dir';
@use '../../partials/screen';

.pw-modal {
  --modal-height: 774px;
  max-height: var(--modal-height) !important;
  height: 100%;

  @include screen.smallerThan(mobileBreakpoint) {
    --modal-height: 100%;
    border-radius: 0 !important;
    &__overlay {
      padding: 0 !important;
    }
  }
}

.pw {
  width: 100%;
  height: 100%;
  background-color: var(--bg-surface);

  display: flex;

  &__drawer {
    width: var(--popup-window-drawer-width);
    background-color: var(--bg-surface-low);
    @include dir.side(border, none, 1px solid var(--bg-surface-border));
  }
  &__content {
    flex: 1;
    min-width: 0;
  }

  &__drawer,
  &__content {
    display: flex;
    flex-direction: column;
  }
}


.pw__drawer__content,
.pw__content-container {
  padding-top: var(--sp-extra-tight);
  padding-bottom: var(--sp-extra-loose);
}
.pw__drawer__content__wrapper,
.pw__content__wrapper {
  flex: 1;
  min-height: 0;
}

.pw__drawer {
  & .header {
    padding-left: var(--sp-tight);
    @include dir.side(padding, var(--sp-tight), var(--sp-tight));
    & .header__title-wrapper {
      @include dir.side(margin, var(--sp-ultra-tight), var(--sp-extra-tight));
    }
  }
}

.pw-content-selector {
  margin: 0 var(--sp-extra-tight);
  border-radius: var(--bo-radius);
  &--selected {
    box-shadow: var(--bs-surface-border);
    background-color: var(--bg-surface);

    & .context-menu__item > button {
      &:hover {
        background-color: transparent;
      }
    }
  }

  & .context-menu__item > button {
    border-radius: var(--bo-radius);
    & .ic-raw {
      @include dir.side(margin, 0, var(--sp-tight));
    }
  }
}
