/* === Custom Modal Overlay === */
.custom-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20000;

  /* NEW: matte dark overlay */
  background: rgba(25, 34, 49, 0.75);

  opacity: 0;
  animation: overlayFadeIn 0.4s ease forwards;
}


/* === MODAL CONTENT (Raised White Card) === */
.custom-modal-content {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 90%;
  max-width: 420px;
  text-align: center;

  color: var(--ink);
  font-family: Inter, sans-serif;
  font-size: 18px;

  border: 2px solid #f0f0f0;
  border-bottom: 4px solid #e5e5e5;

  box-shadow: none;

  transform: translateY(30px) scale(0.96);
  opacity: 0;
  animation: modalEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


/* Text inside modal */
.custom-modal-content p {
  margin: 0 0 18px 0;
  line-height: 1.55;
  color: #8e9aaf;
}


/* === BUTTONS (Raised System) === */
.custom-modal-button {
  margin-top: 15px;
  padding: 10px 22px;

  border-radius: 14px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 700;

  cursor: pointer;
  transition: all 0.1s ease;

  background: #ffffff;
  color: #192231;

  border: 2px solid #f0f0f0;
  border-bottom: 4px solid #4a6cf7;

  box-shadow: none;
}

.custom-modal-button:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}


/* === EXIT ANIMATION (when removed) === */
.custom-modal.closing .custom-modal-content {
  animation: modalExit 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.custom-modal.closing {
  animation: overlayFadeOut 0.35s ease forwards;
}


/* === ANIMATIONS (unchanged) === */
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes modalEnter {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalExit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }
}


/* === MOBILE === */
@media (max-width: 768px) {
  .custom-modal-content {
    width: 82%;
    padding: 24px 20px;
    font-size: 16px;
  }

  .custom-modal-button {
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 12px;
  }
}
