/* ============================================================================
   MP Listing Pages — one shared look for every page under the Properties tab:
   Properties · Rentals & Lease · Farm Land · AI Matches · Saved.

   Source of truth is page-properties.php (.pp-head, #F7F6F2 canvas, #E7E5DF
   hairlines, 12–18px radii, green primary action). These classes let the other
   pages use the same chrome without copying inline <style> blocks.
   ========================================================================== */

.mlp{
  --mlp-bg:#F7F6F2; --mlp-surface:#fff; --mlp-ink:#0F172A; --mlp-soft:#475569; --mlp-mute:#7B8494;
  --mlp-line:#E7E5DF; --mlp-chip:#F1EFE9; --mlp-green:#16A34A; --mlp-green-d:#15803D;
  --mlp-green-soft:#F0FDF4; --mlp-green-line:#BBF7D0; --mlp-danger:#DC2626; --mlp-ring:rgba(22,163,74,.18);
  --mlp-ease:cubic-bezier(.2,.7,.2,1);
  background:var(--mlp-bg);
}
html[data-theme="dark"] .mlp{
  --mlp-bg:#0E1217; --mlp-surface:#15191F; --mlp-ink:#ECEEF1; --mlp-soft:#B6BDC9; --mlp-mute:#8A93A1;
  --mlp-line:#262B33; --mlp-chip:#1D222A; --mlp-green-soft:rgba(34,197,94,.12); --mlp-green-line:rgba(34,197,94,.3);
  --mlp-ring:rgba(34,197,94,.25);
}

/* ── Page header (same as .pp-head on the Properties page) ─────────────── */
.mlp-head{background:var(--mlp-bg);padding:1.5rem 0 .5rem;}
.mlp-crumb{display:flex;align-items:center;gap:.4rem;margin:0 0 .6rem;font-size:.78rem;color:var(--mlp-mute);}
.mlp-crumb a{color:var(--mlp-mute);text-decoration:none;}
.mlp-crumb a:hover{color:var(--mlp-ink);}
.mlp-head h1{margin:0 0 .35rem;font-size:clamp(1.5rem,4.5vw,2.1rem);font-weight:700;letter-spacing:-.01em;color:var(--mlp-ink);line-height:1.2;}
.mlp-head p{margin:0;font-size:.98rem;color:var(--mlp-soft);line-height:1.5;max-width:60ch;}
.mlp-head p strong{color:var(--mlp-ink);}

.mlp-body{background:var(--mlp-bg);padding:.75rem 0 3rem;scroll-margin-top:120px;}

/* ── Listing grid for pages that embed [mp_properties] ─────────────────── */
.mlp-body #mp-properties-app .property-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-items:stretch;}
@media(min-width:620px){.mlp-body #mp-properties-app .property-grid{gap:16px!important;}}
@media(min-width:900px){.mlp-body #mp-properties-app .property-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important;}}
@media(min-width:1180px){.mlp-body #mp-properties-app .property-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:18px!important;}}
.mlp-body #mp-properties-app .mp-load-more-btn{background:var(--mlp-surface)!important;color:var(--mlp-ink)!important;border:1.5px solid var(--mlp-line)!important;border-radius:12px!important;min-height:48px;padding:.7rem 1.6rem!important;font-weight:700!important;}
.mlp-body #mp-properties-app .mp-load-more-count{font-size:.88rem;color:var(--mlp-mute);}

/* ── Bottom call-to-action card ────────────────────────────────────────── */
.mlp-cta{background:var(--mlp-bg);padding:0 0 3rem;}
.mlp-cta-card{background:var(--mlp-surface);border:1px solid var(--mlp-line);border-radius:18px;padding:1.75rem 1.25rem;text-align:center;}
.mlp-cta-card h2{margin:0 0 .4rem;font-size:1.25rem;color:var(--mlp-ink);}
.mlp-cta-card p{margin:0 0 1.1rem;color:var(--mlp-soft);}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.mlp-btn{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:46px;padding:.6rem 1.4rem;border-radius:12px;border:1.5px solid transparent;font:inherit;font-weight:700;font-size:.92rem;text-decoration:none;cursor:pointer;transition:background .15s,border-color .15s,transform .15s var(--mlp-ease);-webkit-tap-highlight-color:transparent;}
.mlp-btn:active{transform:scale(.98);}
.mlp-btn-primary{background:var(--mlp-green);color:#fff;}
.mlp-btn-primary:hover{background:var(--mlp-green-d);color:#fff;}
.mlp-btn-line{background:var(--mlp-surface);color:var(--mlp-ink);border-color:var(--mlp-line);}
.mlp-btn-line:hover{border-color:var(--mlp-ink);color:var(--mlp-ink);}
.mlp-btn-sm{min-height:38px;padding:.4rem .95rem;font-size:.82rem;border-radius:10px;}
.mlp-btn:focus-visible,.mlp-input:focus-visible{outline:2px solid var(--mlp-green);outline-offset:2px;}

/* ── Phone / search field used on AI Matches ───────────────────────────── */
.mlp-find{display:flex;gap:.5rem;max-width:480px;margin-top:1rem;}
.mlp-field{position:relative;flex:1 1 auto;min-width:0;display:flex;align-items:center;background:var(--mlp-surface);border:1.5px solid var(--mlp-line);border-radius:12px;transition:border-color .15s,box-shadow .15s;}
.mlp-field:focus-within{border-color:var(--mlp-green);box-shadow:0 0 0 4px var(--mlp-ring);}
.mlp-field span{padding:0 .1rem 0 .9rem;color:var(--mlp-mute);font-weight:600;font-size:.95rem;}
.mlp-input{flex:1;min-width:0;border:0;background:transparent;color:var(--mlp-ink);font:inherit;font-size:16px;padding:0 .8rem .0 .4rem;min-height:48px;outline:none;}
@media(max-width:520px){.mlp-find{flex-direction:column;}.mlp-find .mlp-btn{width:100%;}}

/* ── Empty state ───────────────────────────────────────────────────────── */
.mlp-empty{display:flex;flex-direction:column;align-items:center;gap:.4rem;text-align:center;padding:2.6rem 1rem;background:var(--mlp-surface);border:1.5px dashed var(--mlp-line);border-radius:18px;color:var(--mlp-soft);}
.mlp-empty-ic{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;background:var(--mlp-chip);color:var(--mlp-ink);margin-bottom:.4rem;}
.mlp-empty-ic svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.mlp-empty h3{margin:0;font-size:1.1rem;color:var(--mlp-ink);}
.mlp-empty p{margin:0 0 .9rem;max-width:44ch;font-size:.92rem;line-height:1.5;}

/* ── Saved properties ──────────────────────────────────────────────────── */
.mlp-saved-bar{display:flex;align-items:center;justify-content:space-between;gap:.6rem;flex-wrap:wrap;margin:.35rem 0 .9rem;font-size:.88rem;font-weight:600;color:var(--mlp-soft);}
.mlp-link-danger{background:none;border:0;padding:.35rem .6rem;border-radius:8px;color:var(--mlp-danger);font:inherit;font-weight:700;font-size:.84rem;cursor:pointer;}
.mlp-link-danger:hover{background:rgba(220,38,38,.08);}
.mlp-saved-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;}
@media(max-width:560px){.mlp-saved-grid{grid-template-columns:1fr;gap:10px;}}
.mlp-saved-card{display:flex;flex-direction:column;background:var(--mlp-surface);border:1px solid var(--mlp-line);border-radius:16px;overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.04);}
.mlp-saved-main{display:flex;gap:.8rem;padding:1rem 1rem .85rem;flex:1;}
.mlp-saved-ic{flex:0 0 40px;width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:var(--mlp-chip);color:var(--mlp-ink);}
.mlp-saved-ic svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.mlp-saved-title{margin:0 0 .25rem;font-size:.98rem;font-weight:700;line-height:1.3;color:var(--mlp-ink);overflow-wrap:anywhere;}
.mlp-saved-meta{font-size:.76rem;color:var(--mlp-mute);}
.mlp-saved-actions{display:flex;gap:.5rem;padding:.7rem 1rem .9rem;border-top:1px solid var(--mlp-line);}
.mlp-saved-actions .mlp-btn{flex:1;}
.mlp-saved-actions .mlp-btn-remove{flex:0 0 auto;color:var(--mlp-danger);}
.mlp-saved-actions .mlp-btn-remove:hover{border-color:var(--mlp-danger);color:var(--mlp-danger);}
.mlp-note{margin:1.6rem 0 0;text-align:center;font-size:.8rem;color:var(--mlp-mute);}

@media(prefers-reduced-motion:reduce){.mlp *{transition:none!important;}}
