.modal {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.8);
  color: var(--white);
  transition: opacity 1s var(--curve);
}

.modal .modal-card {
  position: relative;
  background-color: #030303;
  border-radius: 16rem;
  width: 90%;
  max-width: 880rem;
  max-height: 90%;
  display: flex;
  border: 1px solid #FFFFFF29;
  transition: opacity 1s var(--curve), transform 1s var(--curve);
}

.modal .modal-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 55rem;
  padding-top: 65rem;
}


.modal .modal-left .modal-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: none;
  padding: 0;
  margin-bottom: 58rem;
}

.modal .modal-left .modal-header .broweye {
  text-transform: uppercase;
  color: var(--orange);
  font-size: 16rem;
}

.modal .modal-left .modal-header .modal-title {
  font-size: 32rem;
}

.modal .modal-left .modal-header p {
  margin: 0;
  font-size: 18rem;
}

.modal .modal-left .modal-form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32rem;

}

.modal .modal-left .continue-btn {
  color: var(--white);
}

.modal .close-btn {
    width: 56rem;
    height: 56rem;
    position: absolute;
    top: 32rem;
    right: 32rem;
    z-index: 9;
    svg {
      width: 20%;
    }
    use {
      transform-origin: 50% 50%;
    }
    &:hover {
      use:nth-child(1) {
        transform: translateX(-110%) rotate(-90deg);
      }
    }
    &:not(:hover) {
      use:nth-child(2) {
        transform: translateX(110%) rotate(90deg);
      }
    }
  }

.modal .modal-image {
  width: 440rem;
  min-width: 440rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 0 16rem 16rem 0;
  transition: background-size 2.5s ease;
}

.modal .modal-buttons {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  justify-content: space-between;

  a:nth-child(2) {
    font-size: 14rem;
    font-family: 'Plexes';
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    &:not(:hover) {
      opacity: 0.35;
    }
  }
}

.modal .modal-footer {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 90rem;
  border-top: 1px solid #303030;
  padding-top: 24rem;
  font-family: 'Plexes';
  font-weight: 900;
  font-size: 14rem;
  text-transform: uppercase;
  .underline {
    display: inline;
  }
}

.modal .modal-footer .small {
  font-size: 14rem;
}

.modal .modal-footer a.highlight {
  color: var(--orange);
}

.modal:not(.show) {
  opacity: 0;
  pointer-events: none;
}

.modal:not(.show) .modal-card {
  opacity: 0;
  transform: scale(0.9) translateY(100%);
}

@media (max-width: 1024px) {
  .modal {
    .modal-card {
      width: calc(100% - 16px * 2);
      height: auto;
      max-height: calc(100% - 16px * 2);
      display: inline-flex;
      flex-direction: column;
      overflow-y: auto;
      justify-content: flex-start;

      &::webkit-scrollbar,
      &::scrollbar {
        display: none;
        width: 0;
      }
    }

    .modal-image {
      width: 100%;
      min-width: auto;
      height: min(40vh, 180px);
      background-size: cover;
      flex-shrink: 0;
      border-radius: 0;
      order: 2;
    }

    .modal-left {
      padding: 32px 24px;
      order: 3;

      .modal-header {
        .broweye {
          line-height: 1;
        }

        strong {
          font-size: 28px;
        }
      }
    }

    .modal-form .modal-form-group {
      gap: 24px !important;
      min-height: auto !important;
    }

  }
}

@media (max-width: 740px) {
  .modal .close-btn {
    width: 48rem;
    height: 48rem;
    top: 16rem;
    right: 16rem;
    svg {
      width: 25%;
    }
  }
  .modal .modal-image {
    height: 250px;
  }

  .modal .modal-left {
    padding-bottom: 24px;
  }

  .modal .modal-left .modal-header p {
    font-size: 16px;
    line-height: 1.17;
  }

  .modal .modal-form .modal-form-group {
    gap: 16px !important;
  }

  .modal .modal-footer {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 18px;
    margin-top: 24px;
    font-size: 14px;
  }
}