/* ============================================================
   CLM FlexMLS — Search UI + Floating Sticky Launcher
   ============================================================ */

/* -------- Inline search block (shortcode use) -------- */
.clm-mls-search{max-width:1200px;margin:0 auto}
.clm-mls-filters{display:grid;grid-template-columns:repeat(6,1fr) auto;gap:.5rem;padding:1rem;background:#F9F8F5;border:1px solid #D4D1CA;border-radius:12px}
.clm-mls-filters input,.clm-mls-filters select{padding:.6rem;border:1px solid #D4D1CA;border-radius:8px;background:#fff;font:inherit}
.clm-mls-submit{background:#01696F;color:#fff;border:0;padding:.6rem 1.2rem;border-radius:8px;font-weight:600;cursor:pointer}
.clm-mls-submit:hover{background:#0C4E54}
.clm-mls-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem;margin-top:1rem}
.clm-mls-card{background:#fff;border:1px solid #D4D1CA;border-radius:12px;overflow:hidden;transition:transform .2s,box-shadow .2s;text-decoration:none;color:inherit;display:block}
.clm-mls-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.08)}
.clm-mls-card img{width:100%;height:200px;object-fit:cover;display:block}
.clm-mls-card .body{padding:1rem}
.clm-mls-card .price{font-size:1.4rem;font-weight:700;color:#01696F}
.clm-mls-card .addr{color:#28251D;margin:.25rem 0}
.clm-mls-card .stats{color:#7A7974;font-size:.9rem}
@media(max-width:900px){.clm-mls-filters{grid-template-columns:repeat(2,1fr)}}

/* ============================================================
   FLOATING STICKY SEARCH LAUNCHER
   Sits above the chat widget, expands into a full search panel.
   ============================================================ */

/* Fixed icon stack on the right edge — stacks above chat widget */
.clm-mls-fab-stack{
  position:fixed;
  right:20px;
  bottom:96px;               /* sits directly ABOVE the chat widget (chat is usually 20px + 56px tall) */
  z-index:9998;              /* below chat widget's own z (usually 9999) but above page */
  display:flex;flex-direction:column;gap:12px;
  pointer-events:none;
}
.clm-mls-fab-stack > *{pointer-events:auto}

/* The FAB button itself */
.clm-mls-fab{
  width:56px;height:56px;border-radius:50%;
  background:#01696F;color:#fff;border:0;cursor:pointer;
  box-shadow:0 8px 24px rgba(1,105,111,.4),0 2px 6px rgba(0,0,0,.15);
  display:flex;align-items:center;justify-content:center;
  transition:transform .2s,box-shadow .2s,background .2s;
  position:relative;
}
.clm-mls-fab:hover{background:#0C4E54;transform:scale(1.08);box-shadow:0 12px 32px rgba(1,105,111,.5)}
.clm-mls-fab svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.clm-mls-fab .clm-fab-label{
  position:absolute;right:66px;top:50%;transform:translateY(-50%);
  background:#28251D;color:#fff;padding:.4rem .75rem;border-radius:6px;
  font-size:.85rem;font-weight:500;white-space:nowrap;
  opacity:0;pointer-events:none;transition:opacity .2s;
}
.clm-mls-fab:hover .clm-fab-label{opacity:1}

/* Pulsing dot to draw attention on first load */
.clm-mls-fab.pulse::after{
  content:"";position:absolute;inset:-4px;border-radius:50%;
  border:2px solid #01696F;animation:clm-fab-pulse 2s infinite;
}
@keyframes clm-fab-pulse{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.35)}}

/* Expanded search panel — slides in from right */
.clm-mls-fab-panel{
  position:fixed;right:20px;bottom:96px;top:auto;
  width:min(420px,calc(100vw - 40px));max-height:calc(100vh - 140px);
  background:#fff;border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.25),0 4px 12px rgba(0,0,0,.1);
  z-index:9998;overflow:hidden;display:none;flex-direction:column;
  transform:translateY(20px) scale(.95);opacity:0;
  transition:transform .25s cubic-bezier(.2,.9,.3,1.2),opacity .2s;
}
.clm-mls-fab-panel.open{display:flex;transform:translateY(0) scale(1);opacity:1}

.clm-mls-fab-panel-header{
  padding:1rem 1.25rem;background:#01696F;color:#fff;
  display:flex;align-items:center;justify-content:space-between;
}
.clm-mls-fab-panel-header h3{margin:0;font-size:1.05rem;font-weight:600;color:#fff}
.clm-mls-fab-close{background:transparent;border:0;color:#fff;cursor:pointer;font-size:1.5rem;line-height:1;padding:.25rem;opacity:.8}
.clm-mls-fab-close:hover{opacity:1}

.clm-mls-fab-body{padding:1rem 1.25rem;overflow-y:auto;flex:1}
.clm-mls-fab-body .clm-mls-filters{
  grid-template-columns:1fr 1fr;padding:0;background:transparent;border:0;
}
.clm-mls-fab-body .clm-mls-submit{grid-column:1/-1}
.clm-mls-fab-body .clm-mls-filters input[name="q"]{grid-column:1/-1}
.clm-mls-fab-body .clm-mls-results{
  grid-template-columns:1fr;margin-top:1rem;max-height:400px;overflow-y:auto;
}
.clm-mls-fab-body .clm-mls-card img{height:140px}
.clm-mls-fab-body .clm-mls-card .price{font-size:1.15rem}

/* Mobile: full-screen sheet */
@media(max-width:640px){
  .clm-mls-fab-panel{
    right:0;left:0;bottom:0;top:auto;
    width:100%;max-height:85vh;
    border-radius:20px 20px 0 0;
  }
  .clm-mls-fab-stack{right:16px;bottom:86px}
  .clm-mls-fab{width:52px;height:52px}
}

/* Respect reduced motion */
@media (prefers-reduced-motion:reduce){
  .clm-mls-fab,.clm-mls-fab-panel{transition:none}
  .clm-mls-fab.pulse::after{animation:none}
}
