.cpf-popup-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.cpf-popup-overlay.active { opacity: 1; pointer-events: auto; }

.cpf-popup-content {
  background: #fff;
  padding: 18px 22px;
  border-radius: 12px;
  text-align: left;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.cpf-popup-title { font-size: 19px; font-weight: 700; text-align: center; margin-bottom: 5px; }

.cpf-popup-subheading { text-align: center; font-size: 12px; margin-bottom: 8px; }

.cpf-form label { display: block; font-size: 13px; color: #333; font-weight: 500; margin: 4px 0; }
.required { color: red; }

.cpf-form input, .cpf-form select {
  width: 100%;
  margin-bottom: 5px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
}

.cpf-country-select { width: 40%;}
#cpfCountryCode { width: 100%; padding: 6px; border: 1px solid #ccc; border-top: none; border-radius: 0 0 6px 6px; font-size: 12px;}

.cpf-phone-wrapper { display: flex; gap: 6px; }
.cpf-phone-wrapper input { width: 60%; }

.cpf-gender-inline { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; margin-top: 8px; }
.cpf-gender-inline label { display: flex; align-items: center; gap: 4px; font-size: 13px; }

button.cpf-submit,
[type=submit].cpf-submit {
  background: #00a025 !important;
  color: #fff !important;
  padding: 9px 14px !important;
  border: none !important;
  border-radius: 6px !important;
  cursor: pointer;
  width: 100%;
  font-weight: 600;
  font-size: 14px;
}
#cpfCustomCode {
  width: 100%;
  margin-top: 5px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  display: none; /* Hidden until "Other" is selected */
}
.cpf-submit:hover { background: #007a70; }
.cpf-popup-close { margin-top: 10px; text-align: center; cursor: pointer; font-size: 13px; }
.cpf-spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #00a093;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
  animation: cpf-spin 0.8s linear infinite;
}
.cpf-popup-success{
  display:none; color:green; font-weight:400;font-size: medium;
}
@keyframes cpf-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
