#custom-popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#custom-popup-overlay.active {
    opacity: 1;
    display: flex; /* show as flex for centering */
}

#custom-popup {
    background: #fff;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    box-sizing: border-box;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

#custom-popup-overlay.active #custom-popup {
    transform: scale(1);
}

#popup-close {
    position: absolute;
    top: -15px;
    right: -20px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f1f1;
    color: #333;
    font-size: 20px;
    font-weight: bold;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

#popup-close:hover {
    background: #e74c3c;
    color: #fff;
}

/* ✅ Mobile responsive */
@media (max-width: 600px) {
  #custom-popup {
    width: 90% !important;      /* Mobile me chhota ho */
    max-width: 90% !important;  /* max width bhi 90% */
    left: 43%;
    transform: translateX(-50%) scale(1) !important; /* Center me ho */
  }

  #custom-popup input,
  #custom-popup button {
    width: 100% !important;   /* Inputs & button full width */
    box-sizing: border-box;
  }
}
