.popup-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  &.active {
    display: flex;
  }
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  z-index: 9998;
}

.popup-content {
  position: relative;
  background-color: #000000;
  border: 1px solid var(--color-yellow);
  border-radius: var(--border-radius-secondary);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  z-index: 10000;
  animation: popupSlideIn 0.3s ease-out;

  @media (max-width: 768px) {
    padding: 30px;
    max-width: 95%;
  }

  @media (max-width: 576px) {
    padding: 20px;
  }
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;

  .close-icon {
    width: 24px;
    height: 24px;
    position: relative;
    display: inline-block;

    &:before,
    &:after {
      content: '';
      position: absolute;
      width: 24px;
      height: 2px;
      background-color: var(--color-yellow);
      top: 50%;
      left: 0;
    }

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

    &:after {
      transform: translateY(-50%) rotate(-45deg);
    }
  }

  &:hover .close-icon:before,
  &:hover .close-icon:after {
    background-color: #ffffff;
  }

  &:focus {
    outline: none;
    box-shadow: 0 0 8px 2px var(--color-pink);
    border-radius: 4px;
  }
}

.popup-inner {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  text-align: center;
}

.popup-title {
  font-size: clamp(1.625rem, 1.375rem + 0.75vw, 2.125rem);
  color: var(--color-yellow);
  margin-bottom: 0;
}

.popup-body {
  color: #ffffff;
  font-family: var(--font-body-primary);
  font-size: 1.2rem;
  line-height: 1.6;

  p {
    margin-bottom: 1rem;

    &:last-child {
      margin-bottom: 0;
    }
  }

  a {
    color: var(--color-yellow);
    font-weight: 700;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

.popup-inner .btn,
.popup-inner a.btn {
  display: inline-block;
  margin-top: var(--spacing-xs);
  align-self: center;
}
