/* ===============================
   CPOPUP – Professional UI
   =============================== */

.cpopup-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65); /* slate tint */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
}

/* Popup container */
.cpopup-box{
  background: #ffffff;
  width: 92%;
  height: 90%;
  max-width: 980px;
  border-radius: 14px;
  box-shadow:
    0 20px 40px rgba(0,0,0,0.18),
    0 8px 16px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
  animation: cpopupFadeIn 0.25s ease-out;
  display: flex;
  flex-direction: column;
}

/* Header */
#cpopupTitle{
  padding: 18px 60px 18px 24px;
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #0f172a;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(to right, #f8fafc, #ffffff);
}

/* Content area */
#cpopupContent{
  padding: 22px 24px 80px;
  color: #334155;
  font-size: 15.5px;
  line-height: 1.7;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Typography inside content */
#cpopupContent p{ margin: 0 0 14px; }
#cpopupContent ul{ padding-left: 18px; }
#cpopupContent li{ margin-bottom: 6px; }

/* Close buttons */
.cpopup-close{
  border: none;
  background: #0f172a;
  color: #ffffff;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.cpopup-close:hover{
  background: #020617;
  transform: translateY(-1px);
}

/* Top close (icon style) */
.cpopup-close-top{
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  background: #e5e7eb;
  color: #111827;
}

.cpopup-close-top:hover{
  background: #d1d5db;
}

/* Bottom close */
.cpopup-close-bottom{
  position: absolute;
  bottom: 16px;
  right: 16px;
}

/* Animation */
@keyframes cpopupFadeIn{
  from{
    opacity: 0;
    transform: scale(0.97) translateY(10px);
  }
  to{
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Mobile refinement */
@media (max-width: 640px){
  .cpopup-box{
    width: 96%;
    height: 94%;
    border-radius: 12px;
  }

  #cpopupTitle{
    font-size: 18px;
    padding: 16px 52px 16px 18px;
  }

  #cpopupContent{
    font-size: 14.5px;
    padding: 18px 18px 70px;
  }
}

/*   for forms in popup */

.cpopup-form label{
  display:block;
  margin-bottom:6px;
  font-weight:500;
}

.cpopup-form input,
.cpopup-form textarea{
  width:100%;
  padding:10px;
  margin-bottom:14px;
  border:1px solid #d1d5db;
  border-radius:6px;
  font-size:14px;
}

.cpopup-form button{
  background:#0f172a;
  color:#fff;
  padding:10px 18px;
  border:none;
  border-radius:8px;
  cursor:pointer;
}


