@charset "utf-8";

@use "sass:map";
@use "sass:math";
@use "../Foundation/variables" as *;
@use "../Foundation/mixin" as *;

.c-modal {
  $this:&;

  height: 100%;
  left: 0;
  opacity: 0;
  position: fixed;
  top: 0;
  visibility: hidden;
  width: 100%;
  z-index: 999;

  &__inner {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    position: relative;
    width: 100%;
  }

  &__main {
    background-color: #fff;
    max-height: calc(var(--vh-always, 1vh) * 100 - 80px);
    opacity: 0;
    position: relative;
    transform: translateY(10px);
    width: 600px;
    z-index: 1;
  }

  &__content {
    height: 100%;
    overflow: auto;
    padding: 50px;
    width: 100%;
  }

  &__content-wrap {
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  &__close {
    background-color: #000;
    border-radius: 50%;
    height: 50px;
    position: absolute;
    right: 20px;
    top: 20px;
    width: 50px;
    z-index: 1;

    &.is-open span {

      &:before {
        transform: rotate(-45deg);
      }

      &:after {
        transform: rotate(45deg);
      }
    }

    span {
      align-items: center;
      display: flex;
      height: 100%;
      justify-content: center;
      position: relative;
      width: 100%;

      &:before,
      &:after {
        @include icon-ini;

        background-color: #fff;
        height: 23px;
        transform-origin: center;
        transition: transform $comMS $comES;
        width: 1px;
        will-change: transform;
      }

      &:before {
        transform: rotate(-90deg);
      }

      &:after {
        transform: rotate(90deg);
      }
    }
  }

  &__bg {
    background-color: rgba(#000, .9);
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
  }
}
