/* PaiaFinance — brochure download modal. Uses the site's existing pf-* tokens. */

.pfb-overlay {
  position: fixed;
  inset: 0;
  /* Above the chat widget (9999), which is otherwise painted over the modal. */
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(16, 22, 38, .55);
  overflow-y: auto;
}

.pfb-overlay[hidden] { display: none; }

.pfb-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  background: #fff;
  border-radius: var(--pf-r-lg, 16px);
  box-shadow: 0 24px 64px rgba(16, 22, 38, .28);
  font-family: var(--pf-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.pfb-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--pf-muted, #5F6578);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.pfb-close:hover { background: var(--pf-surface, #F6F7F8); }

.pfb-title {
  margin: 0 0 .5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pf-navy, #25375B);
}

.pfb-sub {
  margin: 0 0 1.5rem;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--pf-muted, #5F6578);
}

.pfb-field { margin-bottom: 1rem; }

.pfb-field label {
  display: block;
  margin-bottom: .375rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--pf-navy, #25375B);
}

.pfb-field input {
  width: 100%;
  padding: .75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--pf-navy, #25375B);
  background: #fff;
  border: 1px solid #D7DBE3;
  border-radius: var(--pf-r-md, 12px);
  transition: border-color .15s, box-shadow .15s;
}

.pfb-field input::placeholder { color: #9AA1B1; }

.pfb-field input:focus {
  outline: none;
  border-color: var(--pf-blue, #1680EB);
  box-shadow: 0 0 0 3px rgba(22, 128, 235, .15);
}

.pfb-input--bad { border-color: #D93025 !important; }

.pfb-error,
.pfb-formerror {
  display: block;
  margin-top: .375rem;
  font-size: .8125rem;
  color: #D93025;
}

.pfb-formerror {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  background: #FDECEA;
  border-radius: var(--pf-r-md, 12px);
}

/* Author display rules outrank the UA [hidden] rule, so restate it. */
.pfb-error[hidden],
.pfb-formerror[hidden] { display: none; }

.pfb-consent {
  margin: 1.25rem 0;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--pf-muted, #5F6578);
}

.pfb-consent a { color: var(--pf-blue, #1680EB); }

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.pfb-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pfb-actions {
  display: flex;
  gap: .75rem;
  margin: 0;
}

.pfb-actions--center { justify-content: center; }

.pfb-btn {
  flex: 1;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--pf-r-md, 12px);
  cursor: pointer;
  transition: background-color .15s, opacity .15s;
}

.pfb-btn--primary {
  color: #fff;
  background: var(--pf-blue, #1680EB);
}

.pfb-btn--primary:hover { background: #1268C4; }
.pfb-btn--primary:disabled { opacity: .6; cursor: default; }

.pfb-btn--ghost {
  color: var(--pf-navy, #25375B);
  background: #fff;
  border-color: #D7DBE3;
}

.pfb-btn--ghost:hover { background: var(--pf-surface, #F6F7F8); }

.pfb-tick {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  color: #fff;
  background: var(--pf-teal, #00BBA7);
  border-radius: 50%;
}

#pfb-view-done { text-align: center; }

.pfb-note {
  margin: 1rem 0 0;
  font-size: .8125rem;
  color: var(--pf-muted, #5F6578);
}

@media (max-width: 480px) {
  .pfb-modal { padding: 1.5rem; }
  .pfb-title { font-size: 1.25rem; }
  .pfb-actions { flex-direction: column-reverse; }
}
