/* Hide the default screen-reader-response in visual UI; it remains for AT */
.wpcf7 .screen-reader-response { display: none !important; }

/* ===== Popup base ===== */
.cf7-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: cf7-fade-in 200ms ease-out both;
}
.cf7-popup::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55); /* slate-900/55 */
  backdrop-filter: blur(3px);
}
.cf7-popup-dialog {
  position: relative;
  width: min(520px, 92vw);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.88));
  border: 1px solid rgba(148,163,184,0.35);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(2,6,23,0.20);
  padding: 20px 20px 16px;
  transform: translateY(8px);
  animation: cf7-slide-up 220ms cubic-bezier(.2,.7,.2,1) both;
}
.cf7-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.cf7-popup-icon {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.35);
}
.cf7-popup-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}
.cf7-popup-body {
  color: #334155;
  font-size: .95rem;
  line-height: 1.6;
  padding: 6px 2px 10px;
}
.cf7-popup-message { word-wrap: break-word; }

.cf7-popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.cf7-popup-action,
.cf7-popup-close {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.cf7-popup-close {
  position: absolute;
  right: 8px; top: 8px;
  width: 36px; height: 36px;
  border-radius: 10px;
}
.cf7-popup-close:hover { background: rgba(2,6,23,0.06); }
.cf7-popup-action {
  background: #0ea5e9;
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(14,165,233,0.35);
  transition: transform 80ms ease, box-shadow 150ms ease;
}
.cf7-popup-action:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(14,165,233,0.4); }
.cf7-popup-action:active { transform: translateY(0); }

/* Variants */
.cf7-variant-success .cf7-popup-icon { background: rgba(34,197,94,.1); color: #059669; }
.cf7-variant-success .cf7-popup-action { background: #22c55e; box-shadow: 0 8px 20px rgba(34,197,94,.35); }
.cf7-variant-error .cf7-popup-icon { background: rgba(239,68,68,.1); color: #dc2626; }
.cf7-variant-error .cf7-popup-action { background: #ef4444; box-shadow: 0 8px 20px rgba(239,68,68,.35); }
.cf7-variant-info .cf7-popup-icon { background: rgba(59,130,246,.1); color: #2563eb; }
.cf7-variant-info .cf7-popup-action { background: #3b82f6; box-shadow: 0 8px 20px rgba(59,130,246,.35); }

/* ===== Loading overlay ===== */
.cf7-loading {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}
.cf7-loading-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.45);
  backdrop-filter: blur(2px);
}
.cf7-loading-spinner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  font-weight: 600;
  color: #e2e8f0;
}
.cf7-spinner {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 4px solid rgba(226,232,240,.35);
  border-top-color: #38bdf8;
  animation: cf7-spin 900ms linear infinite;
}
.cf7-loading-text { margin-top: 8px; }

/* Animations */
@keyframes cf7-spin { to { transform: rotate(360deg); } }
@keyframes cf7-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cf7-slide-up { from { transform: translateY(12px); opacity: .98; } to { transform: translateY(0); opacity: 1; } }
