/* Pine Forest housing survey + privacy choices.
   Scoped under .pfw so it does not restyle the theme or /lots/. */

.pfw-launch,
.pfw-dock-opt,
.pfw-choice,
.pfw-btn,
.pfw-textbtn,
.pfw-footer-choice,
.pfw-privacy-chip,
.pfw-scale button,
.pfw-yn button {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pfw-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 43, 69, 0.28);
  z-index: 100000;
  pointer-events: none;
}

.pfw-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(640px, 100%);
  height: 100vh;
  height: 100dvh;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  background-color: #cdc1c3;
  background-image: linear-gradient(rgba(255, 250, 245, 0.22), rgba(255, 250, 245, 0.22)), url("survey-bg.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #1b2733;
  box-shadow: -16px 0 40px rgba(15, 43, 69, 0.18);
}

.pfw-progress {
  height: 4px;
  background: #dde5ec;
  flex: none;
}
.pfw-progress > span {
  display: block;
  height: 100%;
  background: #b8862f;
  width: 0;
  transition: width 0.25s ease;
}

.pfw-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px 0;
}
.pfw-brand {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  color: #0f2b45;
  font-size: 16px;
  font-weight: 700;
}
.pfw-step {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7c8896;
  font-weight: 700;
}
.pfw-x {
  appearance: none;
  border: 0;
  background: transparent;
  color: #4c5b6b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.pfw-x:hover { color: #0f2b45; }

.pfw-body {
  flex: 1;
  overflow: auto;
  padding: 22px 28px 8px;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
}
.pfw-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8862f;
}
.pfw-body h2 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  color: #0f2b45;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  margin: 0 0 10px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}
.pfw-lead {
  margin: 0 0 18px;
  color: #4c5b6b;
  font-size: 15.5px;
  line-height: 1.5;
}
.pfw-choices { display: flex; flex-direction: column; gap: 8px; }
.pfw-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid #dde5ec;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.4;
  color: #1b2733;
  cursor: pointer;
}
.pfw-choice:hover { border-color: #4a8bc2; }
.pfw-choice[aria-checked="true"] {
  border-color: #135788;
  background: #eaf2f9;
  box-shadow: inset 3px 0 0 #b8862f;
}
.pfw-mark {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1.5px solid #7c8896;
  flex: none;
  border-radius: 50%;
  background: #fff;
}
.pfw-choice.multi .pfw-mark { border-radius: 4px; }
.pfw-choice[aria-checked="true"] .pfw-mark {
  border-color: #135788;
  background: #135788;
  box-shadow: inset 0 0 0 3px #fff;
}
.pfw-other {
  margin-top: 8px;
}

.pfw-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.pfw-scale button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid #dde5ec;
  background: #fff;
  color: #0f2b45;
  font-weight: 700;
  cursor: pointer;
}
.pfw-scale button[aria-checked="true"] {
  background: #135788;
  border-color: #135788;
  color: #fff;
}
.pfw-scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: #4c5b6b;
}

.pfw-field { margin-bottom: 12px; }
.pfw-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #1b2733;
  margin-bottom: 5px;
}
.pfw-input, .pfw-area {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1.5px solid #dde5ec;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  color: #1b2733;
  outline: none;
}
.pfw-input:focus, .pfw-area:focus { border-color: #135788; }
.pfw-area { min-height: 88px; resize: vertical; }
.pfw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pfw-yn { display: flex; gap: 8px; margin: 6px 0 12px; }
.pfw-yn button {
  border-radius: 999px;
  border: 1.5px solid #dde5ec;
  background: #fff;
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
  color: #0f2b45;
}
.pfw-yn button[aria-checked="true"] {
  background: #135788;
  border-color: #135788;
  color: #fff;
}

.pfw-consent label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.4;
  margin: 8px 0;
  font-weight: 400;
  color: #4c5b6b;
}
.pfw-consent input { margin-top: 3px; flex-shrink: 0; }
.pfw-legal {
  font-size: 11px;
  color: #666;
  margin: 8px 0 0;
  line-height: 1.4;
}
.pfw-legal a { color: #135788; }
.pfw-footnote { font-size: 11px; line-height: 1.4; color: #888; margin: 6px 0 0; }
.pfw-error { color: #8d2a2a; font-size: 13px; margin: 8px 0 0; min-height: 1em; }

.pfw-foot {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px 18px;
  background: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(221, 229, 236, 0.9);
}
.pfw-btn {
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.pfw-btn.primary { background: #135788; border: none; color: #fff; }
.pfw-btn.primary:hover { background: #0d3f63; }
.pfw-btn.primary:disabled { opacity: 0.45; cursor: default; }
.pfw-btn.ghost {
  background: transparent;
  border: 1.5px solid #dde5ec;
  color: #1b2733;
}
.pfw-btn.muted {
  background: #e7edf2;
  border: none;
  color: #6b7785;
}
.pfw-btn.muted:hover { background: #d5e0e8; color: #1b2733; }
.pfw-textbtn {
  background: none;
  border: 0;
  padding: 0;
  color: #135788;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.pfw-visitors { margin: 8px 0 12px; }
.pfw-visitor { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pfw-visitor .pfw-input { margin: 0; }
.pfw-hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
}

.pfw-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.pfw-dock[hidden] { display: none; }
.pfw-dock-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}
.pfw-dock:hover .pfw-dock-menu,
.pfw-dock.pfw-dock-open .pfw-dock-menu,
.pfw-dock:focus-within .pfw-dock-menu {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.pfw-dock-opt {
  background: #fff;
  color: #135788;
  border: 1px solid #d5e3ee;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 43, 69, 0.16);
}
.pfw-dock-opt.primary {
  background: #145688;
  color: #fff;
  border-color: #145688;
}
.pfw-dock-opt.primary:hover { background: #0d3f63; }
.pfw-launch {
  background: #145688;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 43, 69, 0.25);
}
.pfw-launch:hover { background: #0d3f63; }
.pfw-tip {
  position: fixed;
  right: 18px;
  bottom: 68px;
  z-index: 99990;
  background: #fff;
  color: #0f2b45;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(15, 43, 69, 0.16);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

.pfw-consentbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 100002;
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  color: #1b2733;
  border: 1px solid #dde5ec;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 43, 69, 0.18);
  padding: 16px 18px 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
body.pfw-survey-open .pfw-consentbar { top: 12px; bottom: auto; }
.pfw-consentbar h2 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 18px;
  margin: 0 0 6px;
  color: #0f2b45;
}
.pfw-consentbar p { margin: 0 0 10px; color: #4c5b6b; }
.pfw-consentbar a { color: #135788; }
.pfw-consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pfw-toggles { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.pfw-toggles label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #f6f4ef;
  border-radius: 10px;
  padding: 8px 10px;
}
.pfw-footer-choice {
  display: inline-block;
  margin: 6px 8px 0 0;
  background: none;
  border: 0;
  padding: 0;
  color: #4c5b6b;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.pfw-privacy-chip {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 99980;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 11px;
  border: 1px solid #e3e5ea;
  border-radius: 999px;
  background: #fff;
  color: #1d2230;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(21, 24, 34, 0.12);
}
.pfw-privacy-chip svg { display: block; flex: 0 0 auto; }
.pfw-privacy-chip[hidden],
body.pfw-survey-open .pfw-privacy-chip,
body.pfw-consent-open .pfw-privacy-chip { display: none; }

@media (max-width: 640px) {
  .pfw-body { padding: 16px 16px 8px; }
  .pfw-row { grid-template-columns: 1fr; }
  .pfw-foot { padding: 12px 16px 16px; }
  .pfw-dock { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .pfw-progress > span { transition: none; }
}
