/* =============================================================
   CF7 Popup Notifications + Button Spinner — site-wide
   ============================================================= */

/* Hide only the form-level summary (replaced by popup).
   Leave inline field warnings visible (.wpcf7-not-valid-tip, .wpcf7-acceptance-missing). */
.wpcf7-response-output {
  display: none !important;
}

/* CF7 spinner — hide in every state */
.wpcf7-spinner,
.wpcf7 .wpcf7-spinner,
form .wpcf7-spinner,
form.submitting .wpcf7-spinner {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---- Submit button spinner wrapper ---- */
.sg-submit-wrap {
  display: block;
  position: relative;
  width: 100%;
}

/* Spinner via ::after on the wrapper span — works without touching <input> */
.sg-submit-wrap::after {
  content: '';
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  width: 15px;
  height: 15px;
  margin-top: -7.5px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sg-spin 0.7s linear infinite;
  pointer-events: none;
  z-index: 5;
}

.sg-submit-wrap.sg-loading input[type="submit"] {
  opacity: 0.75 !important;
  cursor: wait !important;
  pointer-events: none !important;
}

.sg-submit-wrap.sg-loading::after {
  display: block;
}

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

/* ---- Centered Popup Overlay ---- */
.sg-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 11, 30, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  box-sizing: border-box;
}

.sg-popup[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.sg-popup-box {
  background: #fff;
  width: 100%;
  max-width: 400px;
  padding: 48px 40px 40px;
  text-align: center;
  position: relative;
  transform: scale(0.94) translateY(14px);
  transition: transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1);
  box-sizing: border-box;
}

.sg-popup[aria-hidden="false"] .sg-popup-box {
  transform: scale(1) translateY(0);
}

/* Icon circle */
.sg-popup-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 auto 20px;
}

.sg-popup--success .sg-popup-icon { background: rgba(34,197,94,0.12);  color: #22C55E; }
.sg-popup--error   .sg-popup-icon { background: rgba(238,41,82,0.10);  color: #EE2952; }
.sg-popup--warning .sg-popup-icon { background: rgba(245,158,11,0.12); color: #F59E0B; }

/* Top accent line */
.sg-popup-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.sg-popup--success .sg-popup-box::before { background: #22C55E; }
.sg-popup--error   .sg-popup-box::before { background: #EE2952; }
.sg-popup--warning .sg-popup-box::before { background: #F59E0B; }

.sg-popup-title {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #141541;
  margin-bottom: 10px;
  line-height: 1.2;
}

.sg-popup-msg {
  font-family: 'Kumbh Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #4F627A;
  margin-bottom: 28px;
}

.sg-popup-btn {
  display: inline-block;
  background: #141541;
  color: #fff;
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 11px 28px;
  border: none;
  cursor: pointer;
  transition: background 140ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.sg-popup-btn:hover { background: #EE2952; }

/* Close (X) button */
.sg-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: #859AAD;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 140ms ease;
  line-height: 1;
}

.sg-popup-close:hover { color: #141541; }

/* Backdrop click area */
.sg-popup-bd {
  position: absolute;
  inset: 0;
  z-index: -1;
}

@media (max-width: 480px) {
  .sg-popup-box { padding: 40px 24px 32px; }
}
