/* VCTH 11.1.10 · MOBILE SEARCH + TRIP TABS
   Surgical responsive patch. It does not alter Marga data, form names,
   destinations, prices, reservation or payment logic. */

/* -----------------------------------------------------------
   1 · /buscador/ MOBILE
   The canonical filter row must never disappear on a phone. Historical
   Bootstrap/Colibri classes may hide it below lg; this final VCTH layer wins.
   ----------------------------------------------------------- */
@media (max-width:900px){
  body.vcth-star-safe.vmon-search-route #buscador,
  body.vcth-star-safe.vmon-search-route #buscador.md-template{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    overflow:visible!important;
  }

  body.vcth-star-safe.vmon-search-route #buscador form,
  body.vcth-star-safe.vmon-search-route #buscador form.h-px-2{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  /* Canonical filters detected by the existing VCTF repair layer. */
  body.vcth-star-safe.vmon-search-route #buscador .cth-vctf45-filter-row,
  body.vcth-star-safe.vmon-search-route #buscador .cth-vctf44-search-form>.h-row,
  body.vcth-star-safe.vmon-search-route #buscador form.h-px-2>.h-row>.h-column.h-col-lg-3,
  body.vcth-star-safe.vmon-search-route #buscador form.h-px-2>.h-row>.h-column.h-col-lg-3>.d-flex.flex-column{
    visibility:visible!important;
    opacity:1!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  body.vcth-star-safe.vmon-search-route #buscador .cth-vctf45-filter-row,
  body.vcth-star-safe.vmon-search-route #buscador form.h-px-2>.h-row>.h-column.h-col-lg-3>.d-flex.flex-column{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
    width:100%!important;
    min-width:0!important;
    margin:0 0 20px!important;
    padding:16px!important;
    border:1px solid rgba(8,45,89,.10)!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 12px 32px rgba(6,24,46,.07)!important;
    box-sizing:border-box!important;
  }

  body.vcth-star-safe.vmon-search-route #buscador .cth-vctf45-filter-row .md-control,
  body.vcth-star-safe.vmon-search-route #buscador form.h-px-2>.h-row>.h-column.h-col-lg-3 .md-control{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    visibility:visible!important;
    opacity:1!important;
  }

  body.vcth-star-safe.vmon-search-route #buscador .cth-vctf45-filter-row :where(.select2-container,.cth-vctf45-multi,.cth-vctf44-multi,select),
  body.vcth-star-safe.vmon-search-route #buscador form.h-px-2>.h-row>.h-column.h-col-lg-3 :where(.select2-container,.cth-vctf45-multi,.cth-vctf44-multi,select){
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  /* The magnifier becomes a useful shortcut, never a # jump to page top. */
  body.vcth-star-safe.vmon-search-route #buscador .open-menu{
    display:inline-grid!important;
    place-items:center!important;
    width:54px!important;
    height:54px!important;
    margin:0 0 14px!important;
    pointer-events:auto!important;
    cursor:pointer!important;
  }
}

@media (max-width:620px){
  body.vcth-star-safe.vmon-search-route #buscador .cth-vctf45-filter-row,
  body.vcth-star-safe.vmon-search-route #buscador form.h-px-2>.h-row>.h-column.h-col-lg-3>.d-flex.flex-column{
    grid-template-columns:1fr!important;
    gap:11px!important;
    padding:14px!important;
  }
}

/* -----------------------------------------------------------
   2 · TRIP TABS ON PHONES
   Three compact information tabs + one full-width commercial priority CTA.
   No horizontal scroller and no clipped "Precios y Fechas" label.
   ----------------------------------------------------------- */
@media (max-width:760px){
  body.vcth-star-safe.vmon-marga-page .h-tabs{
    overflow:visible!important;
    border-radius:14px!important;
  }

  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:1px!important;
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
    padding:0!important;
    background:#e9eff7!important;
    border-bottom:0!important;
    box-sizing:border-box!important;
  }

  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    width:100%!important;
    min-height:48px!important;
    padding:9px 5px!important;
    border:0!important;
    border-radius:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    text-align:center!important;
    font-size:clamp(.68rem,2.8vw,.82rem)!important;
    font-weight:900!important;
    line-height:1.05!important;
    color:#082d59!important;
    background:#f2f6fb!important;
    box-sizing:border-box!important;
  }

  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item[href="#precioIncluye"],
  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item[rel="#precioIncluye"],
  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item[data-target="#precioIncluye"]{
    grid-column:1 / -1!important;
    min-height:56px!important;
    margin-top:7px!important;
    padding:12px 16px!important;
    border-radius:12px!important;
    background:linear-gradient(135deg,#075aa8,#159fe3)!important;
    color:#fff!important;
    font-size:.98rem!important;
    font-weight:950!important;
    letter-spacing:.005em!important;
    box-shadow:0 9px 24px rgba(7,90,168,.22)!important;
  }

  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item[href="#precioIncluye"]::before,
  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item[rel="#precioIncluye"]::before,
  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item[data-target="#precioIncluye"]::before{
    content:"€";
    display:inline-grid;
    place-items:center;
    width:25px;
    height:25px;
    margin-right:8px;
    border-radius:999px;
    background:rgba(255,255,255,.18);
    font-size:.82rem;
    font-weight:950;
    line-height:1;
  }

  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item.h-tabs-navigation-active-item:not([href="#precioIncluye"]):not([rel="#precioIncluye"]):not([data-target="#precioIncluye"]){
    background:#075aa8!important;
    color:#fff!important;
  }

  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item[href="#precioIncluye"].h-tabs-navigation-active-item,
  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item[rel="#precioIncluye"].h-tabs-navigation-active-item,
  body.vcth-star-safe.vmon-marga-page .h-tabs-navigation-item[data-target="#precioIncluye"].h-tabs-navigation-active-item{
    background:linear-gradient(135deg,#064b8c,#0b84cc)!important;
    box-shadow:0 10px 26px rgba(7,90,168,.30),inset 0 0 0 2px rgba(255,255,255,.20)!important;
  }
}

/* -----------------------------------------------------------
   3 · TRUSTINDEX BELOW RESERVATION
   Fill the CTA card width on mobile instead of looking like a floating badge.
   ----------------------------------------------------------- */
@media (max-width:760px){
  body.vcth-star-safe .vcth-trip-trustindex,
  body.vcth-star-safe .vcth-trip-trustindex.is-placed{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:14px 0 0!important;
    padding:0!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }

  body.vcth-star-safe .vcth-trip-trustindex :where(.ti-widget,.ti-widget-container,iframe),
  body.vcth-star-safe .vcth-trip-trustindex>div{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }
}
