/* CEMI Core v1.2.177 — Mobile: Buscar + Agendar como sheets reales
   Ajuste puntual: quita WhatsApp móvil y convierte búsqueda/agenda en drawers compactos. */

@media (max-width:768px){
  body.cemi-has-mobile-sticky-contact{
    padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))!important;
  }

  /* Barra móvil limpia: solo Buscar + Agendar */
  .cemi-mobile-sticky-contact.cemi-mobile-actions-177{
    position:fixed!important;
    left:12px!important;
    right:12px!important;
    bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;
    z-index:10020!important;
    display:grid!important;
    grid-template-columns:1fr 1.25fr!important;
    gap:8px!important;
    padding:8px!important;
    border-radius:22px!important;
    background:rgba(18,24,36,.94)!important;
    border:1px solid rgba(255,255,255,.10)!important;
    box-shadow:0 18px 48px rgba(0,0,0,.42),0 -1px 0 rgba(215,38,107,.25),0 -10px 30px rgba(215,38,107,.06)!important;
    backdrop-filter:blur(16px)!important;
    -webkit-backdrop-filter:blur(16px)!important;
  }
  .cemi-mobile-sticky-contact.cemi-mobile-actions-177 a,
  .cemi-mobile-sticky-contact.cemi-mobile-actions-177 button{
    min-height:48px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    border-radius:16px!important;
    text-decoration:none!important;
    font:900 13px/1 Montserrat,system-ui,sans-serif!important;
    letter-spacing:-.01em!important;
    cursor:pointer!important;
    appearance:none!important;
    -webkit-appearance:none!important;
  }
  .cemi-mobile-sticky-contact.cemi-mobile-actions-177 .cemi-mobile-sticky-wa{display:none!important;}
  .cemi-mobile-sticky-contact.cemi-mobile-actions-177 .cemi-mobile-sticky-search{
    border:1px solid rgba(255,255,255,.12)!important;
    background:rgba(255,255,255,.065)!important;
    color:#fff!important;
    box-shadow:none!important;
  }
  .cemi-mobile-sticky-contact.cemi-mobile-actions-177 .cemi-mobile-sticky-schedule{
    border:1px solid rgba(215,38,107,.46)!important;
    background:linear-gradient(135deg,rgba(215,38,107,.96),rgba(239,75,134,.92))!important;
    color:#fff!important;
    box-shadow:0 10px 24px rgba(215,38,107,.22)!important;
  }

  /* Overlay común para ambos sheets */
  body.cemi-mobile-contact-open:before,
  body.cemi-mobile-search-open:before{
    content:""!important;
    position:fixed!important;
    inset:0!important;
    z-index:10010!important;
    background:rgba(6,10,18,.58)!important;
    backdrop-filter:blur(7px)!important;
    -webkit-backdrop-filter:blur(7px)!important;
  }

  /* Agenda/contacto como sheet, no como bloque largo dentro del scroll */
  .cemi-single-property .cemi-single-contact-side-wrap{
    position:fixed!important;
    inset:0!important;
    z-index:10011!important;
    display:flex!important;
    align-items:flex-end!important;
    justify-content:center!important;
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    margin:0!important;
    padding:18px 12px calc(18px + env(safe-area-inset-bottom,0px))!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    overflow:hidden!important;
  }
  body.cemi-mobile-contact-open .cemi-single-property .cemi-single-contact-side-wrap{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
  body:not(.cemi-mobile-contact-open) .cemi-single-property .cemi-single-contact-side-wrap{
    height:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  .cemi-single-property .cemi-single-contact-side-wrap #cemi-contacto{
    width:min(100%,440px)!important;
    max-height:min(84vh,760px)!important;
    overflow:auto!important;
    -webkit-overflow-scrolling:touch!important;
    margin:0!important;
    transform:translateY(22px)!important;
    opacity:.98!important;
    transition:transform .24s ease, opacity .24s ease!important;
    border-radius:24px 24px 20px 20px!important;
  }
  body.cemi-mobile-contact-open .cemi-single-property .cemi-single-contact-side-wrap #cemi-contacto{
    transform:translateY(0)!important;
  }

  /* Buscador como sheet: no como barra sticky bajo header */
  body.cemi-mobile-search-open #cemi-sticky-search,
  body.cemi-mobile-search-open .cemi-sticky-search{
    position:fixed!important;
    inset:0!important;
    top:0!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:10012!important;
    display:flex!important;
    align-items:flex-end!important;
    justify-content:center!important;
    width:100%!important;
    height:auto!important;
    padding:18px 12px calc(18px + env(safe-area-inset-bottom,0px))!important;
    margin:0!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:none!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body:not(.cemi-mobile-search-open) #cemi-sticky-search,
  body:not(.cemi-mobile-search-open) .cemi-sticky-search{
    /* No lo matamos en desktop ni en su lógica normal; solo evitamos que el sheet quede abierto. */
  }
  body.cemi-mobile-search-open #cemi-sticky-search .cemi-sticky-search-inner,
  body.cemi-mobile-search-open .cemi-sticky-search .cemi-sticky-search-inner{
    position:relative!important;
    width:min(100%,440px)!important;
    max-height:min(80vh,680px)!important;
    overflow:auto!important;
    padding:46px 14px 14px!important;
    border-radius:24px 24px 20px 20px!important;
    background:linear-gradient(180deg,rgba(26,34,49,.98),rgba(13,20,32,.985))!important;
    border:1px solid rgba(255,255,255,.08)!important;
    box-shadow:0 -1px 0 rgba(215,38,107,.38),0 -12px 34px rgba(215,38,107,.07),0 28px 70px rgba(0,0,0,.56)!important;
    transform:translateY(0)!important;
  }
  body.cemi-mobile-search-open #cemi-sticky-search .cemi-sticky-search-form,
  body.cemi-mobile-search-open .cemi-sticky-search .cemi-sticky-search-form{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  body.cemi-mobile-search-open #cemi-sticky-search .cemi-sticky-search-field,
  body.cemi-mobile-search-open .cemi-sticky-search .cemi-sticky-search-field{
    width:100%!important;
    min-width:0!important;
    display:block!important;
    padding:12px!important;
    border-radius:16px!important;
    background:rgba(255,255,255,.055)!important;
    border:1px solid rgba(255,255,255,.10)!important;
  }
  body.cemi-mobile-search-open #cemi-sticky-search input,
  body.cemi-mobile-search-open #cemi-sticky-search select,
  body.cemi-mobile-search-open .cemi-sticky-search input,
  body.cemi-mobile-search-open .cemi-sticky-search select{
    width:100%!important;
    color:#fff!important;
    background:transparent!important;
  }
  body.cemi-mobile-search-open #cemi-sticky-search select option{color:#111!important;}
  body.cemi-mobile-search-open #cemi-sticky-search .cemi-sticky-search-actions,
  body.cemi-mobile-search-open .cemi-sticky-search .cemi-sticky-search-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    width:100%!important;
  }

  .cemi-mobile-sheet-close,
  .cemi-mobile-contact-close,
  .cemi-mobile-search-close{
    position:absolute!important;
    right:12px!important;
    top:10px!important;
    z-index:3!important;
    width:34px!important;
    height:34px!important;
    border-radius:999px!important;
    border:1px solid rgba(255,255,255,.12)!important;
    background:rgba(255,255,255,.07)!important;
    color:#fff!important;
    font-size:22px!important;
    line-height:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    cursor:pointer!important;
  }
}

@media (min-width:769px){
  .cemi-mobile-sheet-close,
  .cemi-mobile-contact-close,
  .cemi-mobile-search-close{display:none!important;}
}
