/* PHX Facing Foreclosure - match PHX Buyers Shortcode form styling (light card UI)
   NOTE: Only CSS changed. Form fields/markup unchanged. */

:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e5e7eb;
  --shadow: 0 18px 40px rgba(2, 6, 23, 0.08);
  --radius:18px;

  --input-bg:#ffffff;
  --input-text:#0f172a;
  --input-border:#e5e7eb;
  --input-border-focus:#94a3b8;

  --btn:#b91c1c;          /* deep red like screenshot */
  --btn-hover:#991b1b;
  --btn-text:#ffffff;

  --danger:#dc2626;
}

/* Page container */
.phx-ff-wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 14px;
}

/* Card */
.phx-ff-card{
  background: var(--card);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  color: var(--text);
}

/* Header */
.phx-ff-hdr{
  text-align: center;
  margin-bottom: 18px;
}
.phx-ff-brand{
  justify-content:center;
}
.phx-ff-logo{
  display:none; /* buyers form screenshot doesn't show logo block */
}
.phx-ff-brand-text{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.phx-ff-brand-name{
  font-size: 36px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}
.phx-ff-brand-sub{
  margin-top: 8px;
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
}
.phx-ff-subcopy{
  display:none; /* buyers form shows subtitle under title via brand-sub */
}

/* Form */
.phx-ff-form{
  margin-top: 18px;
}
.phx-ff-grid{
  display:flex;
  flex-wrap:wrap;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

/* Columns */
.phx-ff-col-12{ width:100%; }
.phx-ff-col-6{ width: calc(50% - 8px); }
.phx-ff-col-3{ width: calc(25% - 12px); }

@media (max-width: 860px){
  .phx-ff-card{ padding: 22px; }
  .phx-ff-col-6, .phx-ff-col-3{ width:100%; }
  .phx-ff-brand-name{ font-size: 30px; }
}

/* Fields */
.phx-ff-field label{
  display:block;
  font-size: 15px;
  color: var(--text);
  font-weight: 700;
  margin: 8px 0 8px;
}
.phx-ff-field input{
  width:100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--input-text);
  outline:none;
  font-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.phx-ff-field input::placeholder{
  color: #94a3b8;
}
.phx-ff-field input:focus{
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.25);
}

/* Errors */
.phx-ff-err{
  min-height: 16px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--danger);
}

/* Button */
.phx-ff-btn{
  width:100%;
  margin-top: 8px;
  padding: 16px 16px;
  border-radius: 12px;
  border: none;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 800;
  font-size: 16px;
  cursor:pointer;
  transition: filter .15s ease, transform .05s ease, background .15s ease;
}
.phx-ff-btn:hover{ background: var(--btn-hover); }
.phx-ff-btn:active{ transform: translateY(1px); }
.phx-ff-btn:disabled{ opacity:.6; cursor:not-allowed; }

/* Fine print */
.phx-ff-fine{
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Honeypot */
.phx-ff-hp{ position:absolute; left:-9999px; top:-9999px; }

/* Modal (keep consistent, but light UI) */
.phx-ff-modal{ position:fixed; inset:0; display:none; z-index:99999; }
.phx-ff-modal[aria-hidden="false"]{ display:block; }
.phx-ff-modal-backdrop{ position:absolute; inset:0; background: rgba(2,6,23,.55); }

.phx-ff-modal-card{
  position:relative;
  max-width: 560px;
  margin: 12vh auto 0;
  background: var(--card);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(2,6,23,.22);
  padding: 18px;
  color: var(--text);
}

.phx-ff-modal-top{ display:flex; gap:12px; align-items:flex-start; }
.phx-ff-modal-icon{
  width:38px; height:38px;
  border-radius: 12px;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.25);
  display:flex; align-items:center; justify-content:center;
  font-weight: 900;
  color: #16a34a;
}
.phx-ff-modal-title{ font-weight: 800; }
.phx-ff-modal-text{ color: var(--muted); margin-top: 4px; }

.phx-ff-modal-actions{
  margin-top: 14px;
  display:flex;
  justify-content:flex-end;
}
.phx-ff-btn.phx-ff-ghost{
  width:auto;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
}
.phx-ff-btn.phx-ff-ghost:hover{
  background: #f8fafc;
}


/* Form section faint gray background (like buyers form) */
.phx-ff-grid{
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 18px;
  margin-top: 14px;
}

/* Consent checkbox styling */
.phx-ff-consent-label{
  display:flex;
  align-items:center;
  gap: 12px;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
  margin: 0;
}
.phx-ff-consent-label span{
  font-size: 16px;
}
.phx-ff-consent input[type="checkbox"]{
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid #94a3b8;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  display:inline-grid;
  place-content:center;
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.10);
}
.phx-ff-consent input[type="checkbox"]:checked{
  border-color: #b91c1c;
  background: #b91c1c;
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.14);
}
.phx-ff-consent input[type="checkbox"]:checked::after{
  content:"";
  width: 10px;
  height: 6px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
  margin-top: -1px;
}
.phx-ff-consent input[type="checkbox"]:focus{
  outline:none;
}


/* Slightly smaller consent checkbox + text */
.phx-ff-consent-label span{ font-size: 14px; }
.phx-ff-consent input[type="checkbox"]{
  width: 18px;
  height: 18px;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.10);
}
.phx-ff-consent input[type="checkbox"]:checked::after{
  width: 8px;
  height: 5px;
  border-left-width: 2px;
  border-bottom-width: 2px;
}

/* Select styling to match inputs */
.phx-ff-field select{
  width:100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--input-text);
  outline:none;
  font-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
  -webkit-appearance:none;
}
.phx-ff-field select:focus{
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.25);
}
.phx-ff-opt{ font-weight:600; color:#94a3b8; font-size:12px; }

/* Error styling to match screenshot */
.phx-ff-field.has-error input,
.phx-ff-field.has-error select{
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18) !important;
}
.phx-ff-err{
  color:#b91c1c;
  font-weight: 800;
  font-size: 18px;
  margin-top: 10px;
}
@media (max-width: 860px){
  .phx-ff-err{ font-size:16px; }
}

/* Consent checkbox size + spacing */
.phx-ff-consent-label{ gap: 10px; }
.phx-ff-consent-label span{ font-size: 15px; }
.phx-ff-consent input[type="checkbox"]{
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.10);
}
.phx-ff-consent input[type="checkbox"]:checked::after{
  width: 8px;
  height: 5px;
  border-left-width: 2px;
  border-bottom-width: 2px;
}


/* Modal: truly center on viewport (not page flow) */
.phx-ff-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.phx-ff-modal[aria-hidden="false"]{
  display: flex;
}
.phx-ff-modal-card{
  margin: 0 !important;
  max-width: 620px;
  width: 100%;
}


/* Force error glow even if theme overrides */
.phx-ff-field input.is-error,
.phx-ff-field select.is-error,
.phx-ff-field textarea.is-error{
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.22) !important;
}


/* Stronger error state (override theme styles) */
#phxFFForm .phx-ff-field.has-error input,
#phxFFForm .phx-ff-field.has-error select,
#phxFFForm .phx-ff-field.has-error textarea{
  border: 2px solid #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.22) !important;
  background: rgba(254, 242, 242, 0.30) !important; /* faint red tint like buyers form */
}

/* After submit attempt, style any native invalid fields too */
#phxFFForm.phx-ff-submitted input:invalid,
#phxFFForm.phx-ff-submitted select:invalid,
#phxFFForm.phx-ff-submitted textarea:invalid{
  border: 2px solid #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.22) !important;
  background: rgba(254, 242, 242, 0.30) !important;
}

/* Ensure date picker icon/calendar shows (Chrome/Safari) */
#phxFFForm input[type="date"]{
  -webkit-appearance: auto !important;
  appearance: auto !important;
  padding-right: 14px;
}
