/*
Theme Name: offers-sanborn
Theme URI: https://offers.sanbornteam.com
Author: Sanborn Team
Description: Buyer's agent offer portal for Sanborn Team real estate listings.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.2
License: Proprietary
Text Domain: offers-sanborn
*/

/* === custom properties === */

:root {
  --bg-page:    #0d0d0d;
  --bg-header:  #111111;
  --bg-footer:  #0a0a0a;
  --surface-1:  #0f0f0f;
  --surface-2:  #171717;
  --surface-3:  #1a1a1a;
  --border:     #2e2e2e;
  --text-1:     #ffffff;
  --text-2:     #8c8c8c;
  --text-3:     #595959;
  --active-bg:  #145214;
  --active-fg:  #b2fab2;
  --urgent:     #f26666;
  --soon:       #f2a64d;
  --sale-bg:    #262626;
  --font-head:  'Merriweather', Georgia, serif;
  --font-body:  'PT Sans', Arial, sans-serif;
  --r:          3px;
  --pad-h:      80px;
  --pad-h-mob:  16px;
}

/* === reset === */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg-page);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { display: block; max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

.wp-site-blocks { padding: 0; }
.wp-block-group { margin: 0; }
.entry-content > * { margin-block-start: 0; }

/* === typography === */

h1, h2, h3 { font-family: var(--font-head); font-weight: 400; color: var(--text-1); }

.label-eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-1);
}

.badge-active {
  display: inline-block;
  background: var(--active-bg);
  color: var(--active-fg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: var(--r);
  line-height: 1.4;
  white-space: nowrap;
}

.badge-sale {
  display: inline-block;
  background: var(--sale-bg);
  color: var(--text-2);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--r);
  white-space: nowrap;
}

.deadline-urgent { color: var(--urgent); }
.deadline-soon   { color: var(--soon); }
.deadline-future { color: var(--text-2); }

/* === header === */

.site-header {
  background: var(--bg-header);
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-h);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .header-logo {
  height: 35px;
  width: auto;
  object-fit: contain;
}

.site-header .header-logo-text {
  font-family: var(--font-head);
  font-size: 18px;
  color: var(--text-1);
  letter-spacing: 0.04em;
}

.wp-block-button.btn-portal {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.wp-block-button.btn-portal .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ffffff !important;
  outline: none !important;
  box-shadow: none !important;
  color: #ffffff !important;
  background: transparent !important;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 20px !important;
  height: auto;
  border-radius: 0 !important;
  text-decoration: none;
  transition: background 0.2s;
}
.wp-block-button.btn-portal .wp-block-button__link:hover { background: rgba(255,255,255,0.1) !important; }
.wp-block-button.btn-portal .wp-block-button__link:focus { outline: none !important; box-shadow: none !important; }


/* === page-header === */

.page-header {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  padding: 40px var(--pad-h) 32px;
}
.page-header h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 6px 0 8px;
}
.page-header .subtitle {
  color: var(--text-2);
  font-size: 16px;
}

/* === toolbar === */

.listings-toolbar {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--pad-h);
}

.search-wrap {
  position: relative;
  width: 320px;
  flex-shrink: 0;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  width: 14px;
  height: 14px;
}
#listing-search {
  width: 100%;
  height: 36px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0 12px 0 36px;
  font-size: 12px;
  color: #111;
  outline: none;
}
#listing-search::placeholder { color: #888; }
#listing-search:focus { border-color: #999; }

.toolbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
#listing-sort {
  height: 36px;
  width: 190px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-1);
  font-size: 12px;
  padding: 0 10px;
  outline: none;
  cursor: pointer;
}
.listings-count-badge {
  background: #1f1f1f;
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-2);
  font-size: 11px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* === table === */

.listings-table-wrap {
  padding: 0 var(--pad-h);
  overflow-x: auto;
}

.listings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  border-top: none;
  border-bottom: none;
  border-left: 1px solid #2e2e2e;
  border-right: 1px solid #2e2e2e;
}

.listings-table thead tr {
  background: var(--surface-3);
  height: 44px;
}
.listings-table thead th {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  text-align: left;
  padding: 0 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.listings-table thead th:last-child { border-right: none; }

.listings-table tbody tr {
  height: 56px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.listings-table tbody tr:nth-child(odd)  { background: var(--surface-1); }
.listings-table tbody tr:nth-child(even) { background: var(--surface-2); }
.listings-table tbody tr:hover           { background: var(--surface-3); }

.listings-table td {
  padding: 0 12px;
  vertical-align: middle;
  border-right: 1px solid var(--border);
  font-size: 14px;
}
.listings-table td:last-child { border-right: none; }

.col-status   { width: 80px; }
.col-address  { width: 220px; }
.col-city     { width: 140px; }
.col-details  { width: 165px; }
.col-price    { width: 130px; }
.col-deadline { width: 175px; }
.col-cta      { width: 150px; text-align: right; }

.td-address-primary {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-1);
}
.td-address-primary a:hover { color: var(--text-2); }
.td-sub { font-size: 14px; color: var(--text-2); margin-top: 1px; }

.td-price { font-weight: 700; font-size: 15px; }

.cta-offer {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.cta-offer:hover { text-decoration: none; color: #770000; }

/* Pagination */
.listings-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad-h);
  border-top: 1px solid var(--border);
}
.pagination-info { font-size: 14px; color: var(--text-2); }
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-btn {
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 14px;
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border-radius: var(--r);
  transition: background 0.15s;
}
.page-btn:hover, .page-btn.active { background: #2a2a2a; }
.page-btn:disabled { opacity: 0.4; cursor: default; }

/* === cards === */

.listing-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  width: 100%;
  min-height: 268px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-header { display: flex; align-items: flex-start; justify-content: space-between; }
.card-address { font-weight: 700; font-size: 18px; color: var(--text-1); margin-top: 6px; }
.card-city    { font-size: 15px; color: var(--text-2); }
.card-divider { border: none; border-top: 1px solid var(--border); }
.card-meta    { font-size: 14px; color: var(--text-2); }
.card-price   { font-size: 20px; font-weight: 700; color: var(--text-1); }
.card-deadline-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
}
.card-deadline-label { color: var(--text-2); }
.btn-offer-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  background: transparent;
  border: 1px solid #ffffff;
  border-radius: 0;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: auto;
  transition: background 0.15s;
}
.btn-offer-card:hover { background: rgba(255,255,255,0.1); }

.mobile-cards-wrap {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
  font-size: 14px;
}

/* === listing-detail === */

.prop-header {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  padding: 40px var(--pad-h) 32px;
}
.prop-header h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 10px 0 8px;
}
.prop-header .prop-sub {
  font-size: 18px;
  color: #8c8c8c;
}

.info-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
.info-bar-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 80px;
  border-right: 1px solid var(--border);
  padding: 0 16px;
}
.info-bar-stat:last-child { border-right: none; }
.info-bar-label {
  font-size: 12px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8c8c8c;
  margin-bottom: 4px;
}
.info-bar-value {
  font-size: 18px;
  font-family: var(--font-body);
  font-weight: 700;
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 40px;
  padding: 40px var(--pad-h);
  align-items: start;
}

.detail-card {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: 24px;
}
.detail-card h2 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}
.detail-card hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.instructions-text { font-size: 16px; color: #8c8c8c; line-height: 1.7; white-space: pre-line; }

.offer-instructions-content p {
  font-family: var(--font-body);
  font-size: 16px;
  color: #8c8c8c;
  line-height: 1.7;
  margin-bottom: 12px;
}
.offer-instructions-content p:last-child { margin-bottom: 0; }
.offer-instructions-content ul,
.offer-instructions-content ol {
  font-family: var(--font-body);
  font-size: 16px;
  color: #8c8c8c;
  padding-left: 20px;
  margin-bottom: 12px;
}
.offer-instructions-content li { margin-bottom: 8px; }
.offer-instructions-content strong {
  color: #ffffff;
  font-weight: 700;
}
.offer-instructions-content a { color: #770000; text-decoration: underline; }

.btn-start-offer {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 24px;
  border: none;
  background: #770000;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  transition: background 0.15s;
  margin-top: 16px;
  cursor: pointer;
}
.btn-start-offer:hover { background: #8a0000; }

/* Documents */
.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  padding: 10px 14px;
  overflow: hidden;
}
.doc-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.doc-badge {
  border: 1px solid #ffffff;
  border-radius: 4px;
  padding: 5px 8px;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.doc-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc-name { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: #ffffff; }
.doc-size  { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: #8c8c8c; }
.btn-download {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  padding: 8px 16px;
  white-space: pre;
  background: none;
  border: none;
  text-decoration: none;
  flex-shrink: 0;
}
.btn-download:hover { color: #8c8c8c; }

/* === sidebar === */

.detail-sidebar { position: sticky; top: 90px; }

.agent-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.agent-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.agent-photo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 18px;
  flex-shrink: 0;
}
.agent-name { font-weight: 700; font-size: 18px; color: #ffffff; }
.agent-meta  { font-size: 15px; font-weight: 400; color: #8c8c8c; }

.agent-email-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  margin-top: 12px;
  border: 1px solid #ffffff;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 0;
  transition: background 0.15s;
  text-decoration: none;
}
.agent-email-row:hover { background: rgba(255,255,255,0.1); }

.prop-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 16px;
}
.prop-details-row .detail-label { font-size: 16px; font-weight: 400; color: #8c8c8c; }
.prop-details-row .detail-value { font-size: 16px; font-weight: 700; color: #ffffff; }

/* === form === */

.offer-form { display: flex; flex-direction: column; gap: 28px; }

.form-section-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 14px;
}

.form-row {
  display: flex;
  gap: 14px;
}
.form-row .form-field { flex: 1; }
.form-row .form-field.w-33 { flex: 0 0 calc(33.333% - 10px); }
.form-row .form-field.w-50 { flex: 0 0 calc(50% - 7px); }
.form-row .form-field.w-100 { flex: 1 1 100%; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 11px; font-weight: 700; color: var(--text-2); letter-spacing: 0.05em; }

.form-input, .form-select, .form-textarea {
  height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 0 12px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #555; }
.form-input::placeholder { color: var(--text-3); }
.form-select { cursor: pointer; }
.form-select option { background: var(--surface-3); }
.form-textarea {
  height: 90px;
  padding: 10px 12px;
  resize: vertical;
}

/* Checklist */
.checklist-section { display: flex; flex-direction: column; gap: 0; }
.checklist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.checklist-row:last-child { border-bottom: none; }
.checklist-label { font-size: 13px; color: var(--text-1); }
.checklist-label .required { color: var(--urgent); margin-left: 2px; }
.radio-group { display: flex; gap: 20px; }
.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.radio-group input[type="radio"] { accent-color: var(--text-1); }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
}
.upload-zone:hover { border-color: #555; }
.upload-icon { color: var(--text-2); margin: 0 auto 12px; }
.upload-primary { font-size: 14px; color: var(--text-1); font-weight: 700; }
.upload-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
#offer-files { display: none; }
.upload-file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.upload-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  padding: 4px 8px;
  background: var(--surface-2);
  border-radius: var(--r);
}

/* Submit */
.btn-submit {
  width: 100%;
  height: 53px;
  background: #770000;
  border: none;
  border-radius: 0;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.15s;
}
.btn-submit:hover { background: #8a0000; }

.form-legal {
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  color: #595959;
  line-height: 1.5;
}

/* === gravity forms === */

/* Hide "* indicates required fields" legend */
.gform_required_legend,
.gfield_required_legend { display: none !important; }

/* Wrapper reset — target all GF wrapper variants */
.gform_wrapper,
.gform_wrapper * {
  box-sizing: border-box;
}
.gform_wrapper {
  font-family: var(--font-body);
  color: var(--text-1);
}
.gform_wrapper hr { display: none; }

/* Section headings */
.gform_wrapper .gsection_title,
.gform_wrapper .gfield--type-section .gfield_label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 4px;
  padding: 20px 0 14px;
  border-top: 1px solid var(--border);
}
.gform_wrapper .gfield--type-section:not(.gfield--type-section ~ .gfield--type-section) .gfield_label,
.gform_wrapper .gfield--type-section:not(.gfield--type-section ~ .gfield--type-section) .gsection_title {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.gform_wrapper .gfield--type-section:not(.gfield--type-section ~ .gfield--type-section) {
  margin-top: 0 !important;
}

/* GF 2.5+ CSS Grid layout — shell only, layout controlled by GF form editor */
.gform_wrapper .gform_fields {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 16px;
  row-gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Default: full width. GF form editor overrides via gfield--width-* classes. */
.gform_wrapper .gfield {
  grid-column: span 12;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.gform_wrapper .gfield--width-half    { grid-column: span 6; }
.gform_wrapper .gfield--width-third   { grid-column: span 4; }
.gform_wrapper .gfield--width-quarter { grid-column: span 3; }
.gform_wrapper .gfield--width-full    { grid-column: span 12; }
.gform_wrapper .gfield--type-section,
.gform_wrapper .gfield--type-html     { grid-column: span 12; }

/* Labels */
.gform_wrapper .gfield_label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: #8c8c8c;
  text-transform: none;
  margin-bottom: 6px;
  display: block;
}
.gform_wrapper .gfield_required_text {
  display: none !important;
}
.gform_wrapper .gfield_required_asterisk {
  display: inline !important;
  visibility: visible !important;
  color: #770000 !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
  margin-left: 2px !important;
}
/* Input containers fill full width */
.gform_wrapper .ginput_container {
  width: 100%;
}
.gform_wrapper .ginput_container input,
.gform_wrapper .ginput_container select,
.gform_wrapper .ginput_container textarea {
  width: 100%;
}

/* Inputs, selects, textareas */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="number"],
.gform_wrapper input[type="password"],
.gform_wrapper input[type="url"],
.gform_wrapper select,
.gform_wrapper textarea {
  width: 100%;
  height: 44px;
  background: #ffffff;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  color: #000000;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.gform_wrapper textarea {
  height: 100px;
  padding: 10px 12px;
  resize: vertical;
}
.gform_wrapper input:focus,
.gform_wrapper select:focus,
.gform_wrapper textarea:focus {
  border-color: #770000;
}
.gform_wrapper input::placeholder,
.gform_wrapper textarea::placeholder {
  font-family: var(--font-body);
  font-size: 16px;
  color: #8c8c8c;
}
.gform_wrapper select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333333' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.gform_wrapper select option {
  background: #ffffff;
  color: #000000;
}

/* Currency prefix */
.gform_wrapper .ginput_container_currency {
  position: relative;
}
.gform_wrapper .ginput_container_currency::before {
  content: '$';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #333333;
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}
.gform_wrapper .ginput_container_currency input {
  padding-left: 24px;
}

/* Strip any GF-added borders/backgrounds from containers */
.gform_wrapper .ginput_container,
.gform_wrapper .ginput_container_radio,
.gform_wrapper .ginput_container_checkbox,
.gform_wrapper .ginput_container_fileupload,
.gform_wrapper .ginput_container_currency,
.gform_wrapper .ginput_complex,
.gform_wrapper .ginput_left,
.gform_wrapper .ginput_right {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* Number / currency field container */
.gform_wrapper .ginput_container_number {
  position: relative;
  width: 100%;
}
.gform_wrapper .ginput_container_number input[type="text"],
.gform_wrapper .ginput_container_number input[type="number"] {
  width: 100%;
  padding-left: 24px;
}
.gform_wrapper .ginput_container_number::before {
  content: '$';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #333333;
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

/* Remove any default outline/box from gfield list items */
.gform_wrapper .gform_fields > .gfield,
.gform_wrapper .gform_fields > li {
  list-style: none;
  border: none;
  outline: none;
  background: transparent;
}

/* Radio buttons (checklist rows) */
.gform_wrapper .gfield--type-radio {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  margin: 0;
}
.gform_wrapper .gfield--type-radio:last-of-type {
  border-bottom: none;
}
.gform_wrapper .gfield--type-radio > .gfield_label {
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-1);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 0;
}
.gform_wrapper .gfield--type-radio .ginput_container_radio {
  flex-shrink: 0;
}
.gform_wrapper .gfield_radio {
  display: flex;
  flex-direction: row;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.gform_wrapper .gfield_radio .gchoice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.gform_wrapper .gfield_radio .gchoice label {
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
}
.gform_wrapper .gfield_radio input[type="radio"] {
  width: 14px;
  height: 14px;
  accent-color: var(--text-1);
  cursor: pointer;
  flex-shrink: 0;
}

/* File upload */
.gform_wrapper .gfield--type-fileupload .gfield_label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.gform_wrapper .gform_drop_area {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  background: transparent;
  padding: 36px 20px;
  text-align: center;
  transition: border-color 0.15s;
}
.gform_wrapper .gform_drop_area:hover {
  border-color: #555;
}
.gform_wrapper .gform_drop_instructions {
  color: var(--text-2);
  font-size: 13px;
}
.gform_wrapper .gform_drop_area .gform_button_select_files {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  margin-top: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.gform_wrapper .gform_drop_area .gform_button_select_files:hover {
  background: #222;
}
.gform_wrapper .gfield_description {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 6px;
}
.gform_wrapper .gfield--type-fileupload input[type="file"] {
  height: auto;
  padding: 8px 12px;
  cursor: pointer;
}

/* === Submission Checklist rows === */
.gfield.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 37px;
  border-bottom: 1px solid #2e2e2e;
  padding: 0;
  gap: 0;
}
.gfield.checklist-item:last-of-type {
  border-bottom: none;
}
.gfield.checklist-item .gfield_label {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0;
  flex: 1;
  padding-right: 16px;
}

.gfield.checklist-item .ginput_container_radio {
  flex-shrink: 0;
}
.gfield.checklist-item .gfield_radio {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin: 0;
  padding: 0;
}
.gfield.checklist-item .gchoice {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gfield.checklist-item input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1px solid #2e2e2e;
  border-radius: 0;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  margin: 0;
}
.gfield.checklist-item input[type="radio"]:checked {
  background: #770000;
  border-color: #770000;
}
.gfield.checklist-item input[type="radio"]:checked::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  line-height: 1;
  color: #ffffff;
}
.gfield.checklist-item .gchoice label {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  cursor: pointer;
  text-transform: none;
}

/* Submit button */
.gform_wrapper .gform_footer {
  padding: 12px 0 0;
  margin: 0;
}
.legal-disclaimer {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: #595959;
  text-align: center;
  margin-top: 12px;
  max-width: 100%;
  line-height: 1.5;
}
.gform_wrapper .gform_button[type="submit"],
.gform_wrapper .gform_next_button {
  width: 100%;
  height: 53px;
  background: #770000;
  border: none;
  border-radius: 0;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}
.gform_wrapper .gform_button[type="submit"]:hover,
.gform_wrapper .gform_next_button:hover {
  background: #8a0000;
}
.gform_wrapper .gform_previous_button {
  width: 100%;
  height: 53px;
  background: transparent;
  border: 1px solid #ffffff;
  border-radius: 0;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}
.gform_wrapper .gform_previous_button:hover { background: rgba(255,255,255,0.1); }

/* Validation errors */
.gform_wrapper .validation_error {
  background: rgba(242,102,102,0.08);
  border: 1px solid rgba(242,102,102,0.3);
  border-radius: 0;
  color: #f26666;
  font-family: var(--font-body);
  font-size: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.gform_wrapper .gfield_error input,
.gform_wrapper .gfield_error select,
.gform_wrapper .gfield_error textarea {
  border-color: #f26666 !important;
}
.gform_wrapper .validation_message {
  color: #f26666;
  font-family: var(--font-body);
  font-size: 12px;
  margin-top: 4px;
}

/* AJAX spinner */
.gform_wrapper .gform_ajax_spinner {
  display: inline-block;
  margin-left: 10px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--text-1);
  border-radius: 50%;
  animation: gf-spin 0.6s linear infinite;
}
@keyframes gf-spin { to { transform: rotate(360deg); } }

/* === success === */

.success-banner {
  background: #1a3a1a;
  padding: 18px var(--pad-h);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
}
.success-banner svg { flex-shrink: 0; color: var(--active-fg); }

.success-wrap {
  min-height: calc(100vh - 230px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px var(--pad-h);
}
.success-card {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  width: 520px;
  max-width: 100%;
  padding: 48px 40px;
  text-align: center;
}
.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--active-bg);
  border: 2px solid var(--active-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--active-fg);
}
.success-card h1 {
  font-size: 32px;
  margin-bottom: 10px;
}
.success-card .success-msg { font-size: 14px; color: var(--text-2); margin-bottom: 28px; }

.success-meta {
  display: flex;
  justify-content: space-between;
  text-align: left;
  padding: 20px 0;
}
.success-meta-block .meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 4px;
}
.success-meta-block .meta-value { font-size: 14px; color: var(--text-1); }

.btn-back-listings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border: 1px solid #ffffff;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  margin-top: 8px;
  transition: background 0.15s;
}
.btn-back-listings:hover { background: rgba(255,255,255,0.1); }

/* === footer === */

.site-footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border);
  padding: 24px var(--pad-h);
  text-align: center;
  /* strip block group defaults */
  max-width: none !important;
  margin-top: auto !important;
}
.footer-line--desktop {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
}
.footer-line--mobile,
.site-footer .wp-block-group.footer-line--mobile {
  display: none !important;
}

/* === responsive === */

@media (max-width: 1024px) {
  :root { --pad-h: 40px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}

@media (max-width: 768px) {
  :root { --pad-h: var(--pad-h-mob); }

  .site-header {
    height: 63px;
    padding: 0 16px;
  }
  .site-header .header-logo { height: 35px; width: 90px; object-fit: contain; }

  .page-header { padding: 24px 16px 20px; }
  .page-header h1 { font-size: 22px; }

  .listings-toolbar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }
  .search-wrap { width: 100%; order: 1; }
  .toolbar-right { width: 100%; order: 2; margin-left: 0; }
  #listing-sort { width: auto; flex: 1; }

  .listings-table-wrap { display: none; }
  .mobile-cards-wrap   { display: flex; }

  .listings-pagination {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .prop-header { padding: 24px 16px 20px; }
  .prop-header h1 { font-size: 28px; }

  .info-bar-label { font-size: 12px; }
  .info-bar-value { font-size: 18px; }

  .info-bar { flex-wrap: wrap; }
  .info-bar-stat {
    flex: 0 0 50%;
    height: 72px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .info-bar-stat:nth-child(odd)  { border-right: 1px solid var(--border); }
  .info-bar-stat:last-child:nth-child(odd) { flex: 0 0 100%; border-right: none; }

  .detail-layout {
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  .detail-sidebar { position: static; order: 2; width: 100%; }
  .detail-sidebar .detail-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }
  .detail-main  { order: 1; display: contents; }
  .detail-main > .detail-card:not(#offer-form) { order: 1; }
  #offer-form { order: 3; }
  .detail-card { padding: 16px; }

  .form-row { flex-wrap: wrap; }
  .form-row .form-field.w-33 { flex: 0 0 calc(50% - 7px); }

  .success-wrap { padding: 24px 16px; }
  .success-card { padding: 32px 20px; }

  .site-footer {
    padding: 20px var(--pad-h-mob);
    text-align: left;
  }
  .footer-line--desktop,
  .site-footer .wp-block-group.footer-line--desktop { display: none !important; }
  .footer-line--mobile,
  .site-footer .wp-block-group.footer-line--mobile { display: flex !important; flex-direction: column; gap: 2px; }
  .footer-line--mobile p,
  .site-footer .wp-block-group.footer-line--mobile p {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: #8c8c8c;
    margin: 0;
    line-height: 1.6;
  }

  /* === Gravity Forms mobile === */

  /* All half/third/quarter fields collapse to full width */
  .gform_wrapper .gfield--width-half,
  .gform_wrapper .gfield--width-third,
  .gform_wrapper .gfield--width-quarter {
    grid-column: span 12;
  }
  /* Exception: phone + email stay side by side at 50% */
  .gform_wrapper .gfield--type-phone,
  .gform_wrapper .gfield--type-email {
    grid-column: span 6 !important;
  }

  /* Section titles */
  .gform_wrapper .gsection_title,
  .gform_wrapper .gfield--type-section .gfield_label {
    font-size: 12px;
    padding-top: 16px;
  }
  .gform_wrapper .gfield--type-section:not(.gfield--type-section ~ .gfield--type-section) .gfield_label,
  .gform_wrapper .gfield--type-section:not(.gfield--type-section ~ .gfield--type-section) .gsection_title {
    padding-top: 0;
  }

  /* Field labels */
  .gform_wrapper .gfield_label {
    font-size: 12px;
  }

  /* Inputs + selects: 12px padding, ensure 16px font */
  .gform_wrapper input[type="text"],
  .gform_wrapper input[type="email"],
  .gform_wrapper input[type="tel"],
  .gform_wrapper input[type="number"],
  .gform_wrapper input[type="password"],
  .gform_wrapper input[type="url"],
  .gform_wrapper select {
    padding: 12px;
    font-size: 16px;
  }

  /* Textarea */
  .gform_wrapper textarea {
    padding: 12px;
    min-height: 80px;
    font-size: 16px;
  }

  /* Checklist rows: label left max 60%, Yes/No right */
  .gfield.checklist-item .gfield_label {
    max-width: 60%;
    font-size: 14px;
    flex: 1 1 auto;
  }
  .gfield.checklist-item .ginput_container_radio {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
  }
  .gfield.checklist-item .gchoice label {
    font-size: 14px;
  }

  /* File upload zone */
  .gform_wrapper .gform_drop_area {
    width: 100%;
    text-align: center;
  }
  .gform_wrapper .gform_drop_instructions {
    font-size: 14px;
    text-align: center;
  }

  /* Submit button */
  .gform_wrapper .gform_button[type="submit"],
  .gform_wrapper .gform_next_button {
    width: 100%;
    height: auto;
    font-size: 16px;
    padding: 14px;
  }

  /* Legal disclaimer */
  .legal-disclaimer {
    font-size: 12px;
    text-align: center;
    padding: 0 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
