/* ── Overlay ───────────────────────────────────────────── */
.wp-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 48, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  z-index: 9999;
  padding: 20px;
  animation: wp-overlay-in 0.28s ease;
}

@keyframes wp-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal box ─────────────────────────────────────────── */
.wp-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: auto 0;
  background: var(--card);
  padding: 26px 28px 22px;
  border-radius: var(--radius, 18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  animation: wp-box-in 0.32s cubic-bezier(0.34, 1.20, 0.64, 1);
}

@keyframes wp-box-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Subtle top accent bar */
.wp-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius, 18px) var(--radius, 18px) 0 0;
  background: linear-gradient(90deg, #3d8bd4, #7ec3ee);
}

/* ── Close button ──────────────────────────────────────── */
.wp-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tint);
  color: var(--ink);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease;
}

.wp-close:hover {
  background: var(--border);
  transform: rotate(90deg);
}

/* ── Header area ───────────────────────────────────────── */
.wp-header {
  text-align: center;
  margin-bottom: 14px;
}

.wp-logo {
  height: 56px;
  width: auto;
  margin: 0 auto 12px;
}

.wp-box h2 {
  font-size: 18px;
  font-family: var(--font-heading, 'Sora', sans-serif);
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 5px;
}

.wp-subtitle {
  color: var(--text, #5b6472);
  font-size: 12.5px;
  line-height: 1.45;
}

/* ── Form fields ───────────────────────────────────────── */
.wp-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.wp-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.wp-field input,
.wp-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border, #e6ebf5);
  border-radius: 9px;
  background: var(--bg-tint, #f5f8ff);
  color: var(--ink, #0b1220);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13.5px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  resize: vertical;
  outline: none;
}

.wp-field input:focus,
.wp-field textarea:focus {
  border-color: var(--cyan, #3d8bd4);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
}

.wp-field input.wp-input-error,
.wp-field textarea.wp-input-error {
  border-color: #e05252;
  background: rgba(224, 82, 82, 0.12);
}

.wp-field input.wp-input-error:focus,
.wp-field textarea.wp-input-error:focus {
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.12);
}

/* ── Inline validation errors ──────────────────────────── */
.wp-error {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #e05252;
}

/* ── Submit button ─────────────────────────────────────── */
.wp-btn {
  margin-top: 4px;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  color: var(--navy-deep);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 16px rgba(10, 25, 48, 0.22);
}

.wp-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--violet) 0%, var(--cyan) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 79, 224, 0.28);
}

.wp-btn:active:not(:disabled) {
  transform: translateY(0);
}

.wp-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.wp-btn-icon {
  font-size: 13px;
}

/* ── Loading spinner inside button ─────────────────────── */
.wp-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(11, 31, 63, 0.35);
  border-top-color: var(--navy-deep);
  border-radius: 50%;
  animation: wp-spin 0.7s linear infinite;
}

@keyframes wp-spin {
  to { transform: rotate(360deg); }
}

/* ── Success state ─────────────────────────────────────── */
.wp-success {
  text-align: center;
  padding: 16px 4px 8px;
}

.wp-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3d8bd4, #7ec3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(47, 128, 237, 0.28);
}

.wp-success h2 {
  margin-bottom: 10px;
}

.wp-success p {
  color: var(--text, #5b6472);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 26px;
}

/* ── Scrollbar inside modal (subtle) ──────────────────── */
.wp-overlay::-webkit-scrollbar {
  width: 4px;
}

.wp-overlay::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 480px) {
  .wp-box {
    padding: 22px 18px 18px;
  }
}

/* ── Submit error message ── */
.wp-submit-error {
  color: #e74c3c;
  font-size: 0.82rem;
  text-align: center;
  margin: -4px 0 8px;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
}
