
/* modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(1px);
  animation: fadeIn 0.25s ease forwards;

  align-items: center;
  justify-content: center;
}

.modal-content {
  border-radius: 1.2rem;
  background: #131921;
  color: #333;
  border-radius: 1.6rem;
  padding: 24px 28px;
  width: 90%;
  max-width: 32rem;
  margin: 10% auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(30px);
  opacity: 0;
  animation: slideUp 0.3s ease forwards;
  position: relative;
  
  /* Ensure content is visible on mobile */
  @media screen and (max-width: 768px) {
    width: 85%;
    max-width: 28rem;
    margin: 15% auto;
    padding: 20px 24px;
  }

  .modal-body {
    height: 100%;
    width: 100%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

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

      .modal-image-coming-soon {
        height: 16.5rem;
        width: 13.9rem;
        position: relative;
        margin-top: 3.2rem;

        .icon {
          object-fit: cover;
        }
      }
    }

    .modal-title {
      font-size: 2rem;
      font-weight: 600;
      line-height: 140%;
      font-family: "sfProDisplay600Normal";
      color: #fff;
    }

    .modal-description {
      font-size: 1.3rem;
      font-weight: 400;
      line-height: 1.6rem;
      color: rgba(255, 255, 255, 0.6);
      font-family: "sfProDisplay400Normal";
      text-align: center;

      padding: 0.8rem;
    }

    .modal-button {
      margin-top: 2.8rem;

      width: 100%;
      max-width: 30rem;
      max-height: 4.8rem;
      height: 4.8rem;
      border-radius: 8px;
      border: 1px solid var(--2-d-5-fff, #2d5fff);
      background: linear-gradient(0deg, #1953fb 0%, #1c3ea2 100%);

      display: flex;
      align-items: center;
      justify-content: center;

      font-size: 1.6rem;
      font-weight: 600;
      line-height: 140%;
      color: #fff;
      font-family: var(--font-inter);
      text-align: center;
      transition: 0.4s;
    }

    .modal-button:hover {
      transform: scale(1.005);
      transition: 0.4s;
    
      cursor: pointer;
    }
  }
}

.close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2.2rem;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  transition: transform 0.4s ease, color 0.4s ease;
}

.close:hover {
  transform: scale(1.08);
  transition: 0.4s;
  color: #fff;
}

/* ============ ANIMATION ============ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(30px);
    opacity: 0;
  }
}

.modal.closing {
  animation: fadeOut 0.25s ease forwards;
}

.modal.closing .modal-content {
  animation: slideDown 0.3s ease forwards;
}

/* Fallback for mobile - ensure modal content is always visible */
@media screen and (max-width: 768px) {
  .modal:not(.closing) .modal-content {
    /* Force visibility on mobile if animation fails */
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
  
  /* Ensure proper z-index stacking on mobile */
  .modal {
    z-index: 10000;
  }
}
