/* PastePanel hCaptcha modal widget — self-contained, isolated under .pphc__.
   No bleed into / from page styles. Used on every form across platform + tenants. */

.pphc__overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Khmer", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.pphc__overlay.pphc__is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pphc__card {
  position: relative;
  background: #ffffff;
  color: #0f172a;
  border-radius: 18px;
  padding: 28px 26px 22px;
  width: min(380px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.32),
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.05);
  text-align: center;
  transform: translateY(8px) scale(0.96);
  transition: transform .22s cubic-bezier(.2, .7, .4, 1.1);
}
.pphc__overlay.pphc__is-open .pphc__card {
  transform: translateY(0) scale(1);
}

.pphc__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}
.pphc__icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
}

.pphc__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #0f172a;
  font-family: inherit;
}
.pphc__subtitle {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.5;
  font-family: inherit;
}

.pphc__widget-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  margin: 0 0 18px;
}

.pphc__cancel {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 9px 16px;
  color: #64748b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.pphc__cancel:hover,
.pphc__cancel:focus-visible {
  background: #f1f5f9;
  color: #334155;
  outline: 0;
}
.pphc__cancel:focus-visible {
  box-shadow: 0 0 0 2px #3b82f6;
}

@media (max-width: 480px) {
  .pphc__card { padding: 24px 20px 18px; border-radius: 16px; }
  .pphc__title { font-size: 16px; }
  .pphc__subtitle { font-size: 13px; margin-bottom: 16px; }
  .pphc__icon { width: 44px; height: 44px; }
  .pphc__icon svg { width: 22px; height: 22px; }
}

@media (prefers-color-scheme: dark) {
  .pphc__card {
    background: #1e293b;
    color: #f1f5f9;
    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.55),
      0 4px 16px rgba(0, 0, 0, 0.35),
      0 0 0 1px rgba(255, 255, 255, 0.06);
  }
  .pphc__title { color: #f8fafc; }
  .pphc__subtitle { color: #94a3b8; }
  .pphc__cancel { color: #94a3b8; }
  .pphc__cancel:hover,
  .pphc__cancel:focus-visible {
    background: #334155;
    color: #f1f5f9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pphc__overlay, .pphc__card { transition: none; }
}
