/* SPEC 231 - the referral partner's website questionnaire (.pe-*) and the
   "Embed on your website" snippet block (.pes-*). Standalone on purpose: the
   questionnaire is framed on partners' own websites and loads no base.html. */

.pe-body {
  margin: 0;
  background: #f4f7fb;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
.pe-body.pe-embed { background: transparent; }
.pe-body *, .pe-body *::before, .pe-body *::after { box-sizing: border-box; }

.pe-header {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto;
  padding: 18px 16px 6px;
  font-weight: 800;
  color: #0b3d75;
}
.pe-logo { height: 34px; width: auto; }

.pe-card {
  max-width: 680px;
  margin: 12px auto;
  padding: 22px 18px;
  background: #ffffff;
  border: 1px solid #d8e4f7;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(21, 101, 192, 0.08);
}
.pe-embed .pe-card { margin: 0 auto; box-shadow: none; }
.pe-card h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; color: #0b3d75; }
.pe-lead { margin: 0 0 6px; color: #374151; }
.pe-referred { margin: 0 0 14px; color: #1565c0; font-weight: 700; font-size: 0.95rem; }
.pe-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-weight: 600;
}

.pe-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pe-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pe-field > span { font-weight: 700; font-size: 0.92rem; color: #1f2937; }
.pe-field em { font-style: normal; font-weight: 500; color: #6b7280; }
.pe-field input,
.pe-field select,
.pe-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #c7d2e3;
  border-radius: 10px;
  background: #ffffff;
  font: inherit;
  color: inherit;
}
.pe-field input:focus,
.pe-field select:focus,
.pe-field textarea:focus { outline: 2px solid #1565c0; outline-offset: 1px; border-color: #1565c0; }

@media (min-width: 560px) {
  .pe-grid { grid-template-columns: 1fr 1fr; }
  .pe-wide { grid-column: 1 / -1; }
  .pe-address { grid-template-columns: 2fr 1fr 1fr; }
  .pe-card { padding: 28px 26px; }
}

.pe-submit {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: #1565c0;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.pe-submit:hover { background: #0d4f9c; }
.pe-fine { margin: 10px 0 0; text-align: center; color: #6b7280; font-size: 0.85rem; }
.pe-footer { max-width: 680px; margin: 0 auto; padding: 8px 16px 24px; color: #6b7280; font-size: 0.85rem; text-align: center; }

/* The honeypot: off-screen, never display:none (some bots skip hidden fields). */
.pe-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- The snippet block (partner portal + staff partner page) ---- */
.pes-wrap { display: grid; gap: 16px; }
.pes-block { padding: 14px; border: 1px solid #d8e4f7; border-radius: 12px; background: #ffffff; min-width: 0; }
.pes-block h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 800; color: #111827; }
.pes-block p { margin: 0 0 8px; color: #4b5563; font-size: 0.92rem; }
.pes-code {
  width: 100%;
  min-height: 84px;
  padding: 10px;
  border: 1px solid #c7d2e3;
  border-radius: 8px;
  background: #f8fafc;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 0.8rem;
  resize: vertical;
}
.pes-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.pes-url { flex: 1 1 220px; min-width: 0; padding: 8px 10px; border: 1px solid #c7d2e3; border-radius: 8px; font-size: 0.85rem; }
.pes-copy {
  padding: 8px 14px;
  border: 1px solid #1565c0;
  border-radius: 999px;
  background: #1565c0;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.pes-copy.is-copied { background: #15803d; border-color: #15803d; }
.pes-preview { width: 100%; height: 720px; border: 1px dashed #c7d2e3; border-radius: 10px; background: #f4f7fb; }
.pes-steps details { border-top: 1px solid #eef2f7; padding: 8px 0; }
.pes-steps summary { cursor: pointer; font-weight: 700; }
.pes-steps ol { margin: 8px 0 0; padding-left: 20px; color: #374151; font-size: 0.92rem; }
.pes-muted { color: #6b7280; }
.pes-gap { margin-top: 10px !important; }
.pes-page { max-width: 880px; margin: 0 auto; padding: 18px 16px 40px; }
.pes-title { margin: 10px 0 4px; font-size: 1.5rem; font-weight: 800; }
.pes-intro { color: #4b5563; }

/* ---- V2 (2026-10-13): rentals questions, back button, guide link ---- */
.pe-checks { border: 0; margin: 0; padding: 0; }
.pe-checks legend { padding: 0; margin-bottom: 4px; font-weight: 700; font-size: 0.92rem; color: #1f2937; }
.pe-check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 500; }
.pe-check input { width: 18px; height: 18px; margin: 0; }
.pe-back {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  background: #1565c0;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}
.pe-back:hover { background: #0d4f9c; }
.pes-link-btn { display: inline-block; text-decoration: none; }

/* ---- V2: the printable guide (templates/partner_embed_guide.html) ---- */
.peg-body {
  margin: 0;
  background: #f4f7fb;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
.peg-body *, .peg-body *::before, .peg-body *::after { box-sizing: border-box; }
.peg-toolbar { max-width: 820px; margin: 0 auto; padding: 14px 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.peg-page { max-width: 820px; margin: 12px auto 32px; padding: 26px 28px; background: #ffffff; border: 1px solid #d8e4f7; border-radius: 14px; }
.peg-brand { font-weight: 800; color: #1565c0; letter-spacing: 0.02em; }
.peg-head h1 { margin: 4px 0 2px; font-size: 1.55rem; font-weight: 800; color: #0b3d75; }
.peg-for { margin: 0 0 12px; color: #4b5563; font-weight: 600; }
.peg-intro, .peg-note { color: #374151; }
.peg-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e5ebf3; }
.peg-section h2 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.peg-section p { margin: 0 0 8px; }
.peg-section ol { margin: 4px 0 0; padding-left: 20px; }
.peg-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #1565c0; color: #ffffff; font-size: 0.9rem; }
.peg-code {
  margin: 6px 0 8px;
  padding: 10px 12px;
  border: 1px solid #c7d2e3;
  border-radius: 8px;
  background: #f8fafc;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-all;
}
.peg-platforms { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .peg-platforms { grid-template-columns: repeat(3, 1fr); } }
.peg-platform { padding: 10px 12px; border: 1px solid #e5ebf3; border-radius: 10px; }
.peg-platform h3 { margin: 0 0 4px; font-size: 0.98rem; font-weight: 800; }
.peg-platform ol { font-size: 0.88rem; }
.peg-help a { word-break: break-all; }

@media print {
  @page { margin: 14mm; }
  .peg-body { background: #ffffff; font-size: 11pt; }
  .peg-toolbar { display: none; }
  .peg-page { margin: 0; padding: 0; border: 0; border-radius: 0; max-width: none; }
  .peg-section { break-inside: avoid; page-break-inside: avoid; }
  .peg-platforms { grid-template-columns: repeat(3, 1fr); }
  .peg-code { font-size: 8pt; background: #ffffff; }
  .peg-num { background: #ffffff; color: #111827; border: 1px solid #111827; }
  a { color: #111827; }
}
