@use "system/breakpoints";
@use "system/spacing";

$ods-modal-popup-height: 607px !default;
$ods-modal-popup-width: 600px !default;

.ods-modal {
  align-items: center;
  background-color: rgb(0 0 0 / 60%);
  display: none;
  justify-content: center;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483647;
  width: 100vw;
  height: 100vh;

  &__popup {
    padding: 0.25rem;
    background: white;
    height: 100vh;
    width: 100%;
    overflow: auto;
    position: fixed;
    left: 0;
    top: 0;

    @include breakpoints.medium {
      background: transparent;
      height: $ods-modal-popup-height;
      width: $ods-modal-popup-width;
      margin: 0 auto;
      position: static;
    }
  }

  &--open {
    display: flex;
  }

  &--scoped {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }

  &__button {
    background: white;
    display: flex;
    justify-content: flex-end;
    @extend %ods-padding-4;

    @include breakpoints.medium {
      background: transparent;
      padding: 0;
    }

    div {
      background-color: white;
      flex-grow: 1;
    }
  }

  &__content {
    background: white;
    overflow: auto;
    @extend %ods-padding-top-0;
    @extend %ods-padding-bottom-13;
    @extend %ods-padding-horizontal-13;
  }
}
