.wpop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999999;
}

.wpop-overlay.is-active {
  display: flex;
}

.wpop-modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: wpopFadeIn 0.22s ease;
}

@keyframes wpopFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wpop-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  color: #111;
}

.wpop-modal h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.1;
  color: #111;
}

.wpop-subtitle {
  margin: 0 0 20px;
  color: #666;
  font-size: 15px;
}

.wpop-form {
  display: grid;
  gap: 14px;
}

.wpop-field {
  display: grid;
  gap: 6px;
}

.wpop-field label {
  font-size: 14px;
  font-weight: 600;
  color: #222;
}

.wpop-field input {
  width: 100%;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
  box-sizing: border-box;
}

.wpop-field input:focus {
  border-color: #7a3cff;
  box-shadow: 0 0 0 3px rgba(122, 60, 255, 0.10);
}

.wpop-field input[readonly] {
  background: #f7f7f7;
}

.wpop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.wpop-button {
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, background .2s;
}

.wpop-submit {
  background: #111;
  color: #fff;
}

.wpop-submit:hover {
  opacity: 0.92;
}

.wpop-submit.is-loading {
  opacity: 0.72;
  cursor: wait;
}

.wpop-continue {
  background: #f2f2f2;
  color: #222;
}

.wpop-continue:hover {
  background: #e8e8e8;
}

.wpop-feedback {
  display: none;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.wpop-feedback.is-visible {
  display: block;
}

.wpop-feedback.is-success {
  color: #166534;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
}

.wpop-feedback.is-error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

body.wpop-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .wpop-modal {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .wpop-modal h3 {
    font-size: 24px;
  }

  .wpop-actions {
    grid-template-columns: 1fr;
  }
}
