@use '/src/styles/animations';
@use '/src/styles/typography';
@use '/src/styles/variables';

.dialog {
  @include animations.fade-in();

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--cl-shadow-background);

  &__closing {
    @include animations.fade-out();
  }
}

.layout {
  @include typography.font-style(core, base);

  z-index: variables.$modal;
  background-color: var(--cl-primary-background);
  box-shadow: var(--cl-box-shadow);
  color: var(--cl-primary-color);
  padding: var(--cl-m-gap) var(--cl-l-gap);

  height: 90%;
  position: absolute;
  bottom: 0;
  left: 0;
  border-top-left-radius: var(--cl-border-radius);
  border-top-right-radius: var(--cl-border-radius);

  &_button {
    position: absolute;
    right: var(--cl-m-gap);
    top: var(--cl-m-gap);
  }

  @media only screen and (min-width: variables.$tablets) {
    width: fit-content;
    height: fit-content;
    position: relative;
    min-width: 40%;
    max-width: 90%;
    max-height: 90%;
    border-bottom-left-radius: var(--cl-border-radius);
    border-bottom-right-radius: var(--cl-border-radius);
  }
}
