/* ==========================================================
   VCTF CORE1.1 · functional islands
   Presentation only. Marga DOM, values, events, Vue bindings, calculations,
   validation and submit behaviour remain untouched.
   ========================================================== */

/* Raw Vue/Marga template placeholders are never customer-facing. The guard
   adds this class only to existing leaf elements; it does not alter the DOM. */
body.cth-brand--vctf .cth-marga-template-token{display:none!important}

/* ---------- Shared Marga search: Home + hubs + /buscador/ ---------- */
body.cth-brand--vctf .vmon-marga--search select.select2-hidden-accessible{
  position:absolute!important;width:1px!important;min-width:1px!important;max-width:1px!important;
  height:1px!important;min-height:1px!important;max-height:1px!important;margin:-1px!important;padding:0!important;
  overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;
  border:0!important;opacity:0!important
}
body.cth-brand--vctf .vmon-marga--search .select2-container:not(.select2-container--open) .select2-search--inline{
  display:none!important;width:0!important;height:0!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:0!important;overflow:hidden!important
}
body.cth-brand--vctf .vmon-marga--search .select2-selection--multiple{
  height:50px!important;min-height:50px!important;max-height:50px!important;overflow:hidden!important
}
body.cth-brand--vctf .vmon-marga--search .select2-selection__rendered{
  min-height:44px!important;max-height:44px!important;overflow:hidden!important
}
body.cth-brand--vctf .vmon-marga--search .md-search-field{font-size:16px!important}

/* The old Marga template uses a legacy flex column rather than
   .md-search-form__filters. Make the real observed 3 filters + CTA a single
   intentional row instead of six phantom columns. */
@media(min-width:901px){
  body.cth-brand--vctf .vmon-marga--search form.h-px-2>.h-row>.h-column.h-col-lg-3>.d-flex.flex-column{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(170px,.78fr)!important;
    gap:14px!important;align-items:end!important;width:100%!important
  }
  body.cth-brand--vctf .vmon-marga--search form.md-template>.d-flex.gutters-col-1{
    grid-template-columns:repeat(3,minmax(0,1fr)) minmax(170px,.78fr)!important
  }
}
@media(max-width:900px) and (min-width:621px){
  body.cth-brand--vctf .vmon-marga--search 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
  }
}
@media(max-width:620px){
  body.cth-brand--vctf .vmon-marga--search form.h-px-2>.h-row>.h-column.h-col-lg-3>.d-flex.flex-column{
    display:grid!important;grid-template-columns:1fr!important;gap:11px!important
  }
}

/* ---------- General contact ---------- */
body.cth-brand--vctf.vmon-contact-route .vmon380-contact-form__surface{
  min-height:0!important;padding:clamp(18px,2.6vw,30px)!important;background:#fff!important;
  border:1px solid rgba(7,27,51,.09)!important;border-radius:24px!important;
  box-shadow:0 18px 48px rgba(7,27,51,.08)!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form{
  width:100%!important;max-width:1080px!important;margin:0 auto!important;color:#071b33!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form :where(.h-row,.row){
  display:flex!important;flex-wrap:wrap!important;gap:16px 18px!important;width:100%!important;margin:0 0 14px!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form :where(.h-row,.row)>[class*="h-col-"]{
  flex:1 1 280px!important;width:auto!important;max-width:none!important;min-width:0!important;padding:0!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form :where(.h-row,.row)>:only-child{
  flex:0 0 100%!important;width:100%!important;max-width:100%!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),select,textarea,.select2-container){
  width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),select){
  min-height:50px!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form textarea{min-height:150px!important;resize:vertical!important}
body.cth-brand--vctf.vmon-contact-route #contacto-form h4{
  margin:28px 0 16px!important;font-size:clamp(1.25rem,2vw,1.65rem)!important;letter-spacing:-.025em!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form h4:first-of-type{margin-top:0!important}
body.cth-brand--vctf.vmon-contact-route #contacto-form .form-actions{text-align:left!important;padding-left:0!important;margin:22px 0!important}
body.cth-brand--vctf.vmon-contact-route #contacto-form #btn_enviar{
  min-width:190px!important;min-height:52px!important;padding:0 24px!important;border:0!important;border-radius:14px!important;
  background:var(--brand-grad)!important;color:#fff!important;box-shadow:0 10px 24px rgba(var(--brand-rgb),.2)!important;
  font-weight:900!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form .politica,
body.cth-brand--vctf.vmon-contact-route #contacto-form [style*="border: 1px solid #DDD"]{
  border:1px solid rgba(7,27,51,.1)!important;border-radius:16px!important;background:#f6f9fd!important;padding:16px!important;
  color:#526174!important;font-size:.86rem!important;line-height:1.55!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form.cth-marga-hydration-fallback{
  position:relative!important
}
body.cth-brand--vctf.vmon-contact-route #contacto-form.cth-marga-hydration-fallback:before{
  content:"El formulario ha tardado más de lo normal en cargar. Puedes completar los campos visibles o contactar con nosotros por WhatsApp, teléfono o email justo debajo.";
  display:block;margin:0 0 18px;padding:14px 16px;border-radius:14px;background:#fff7d8;color:#493b00;font-weight:750;line-height:1.45
}

/* ---------- Trip contact: the base fix was Corebase-only; VCTF needs the
   same protected geometry plus its own finish. ---------- */
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form,
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) :where(.h-column,.h-column-container,.h-column__inner,.h-column__content,.h-y-container):has(#contacto-form){
  width:100%!important;max-width:none!important;min-width:0!important;float:none!important;box-sizing:border-box!important
}
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form{
  max-width:1060px!important;margin:32px auto 64px!important;padding:clamp(24px,3.2vw,42px)!important;
  background:#fff!important;border:1px solid rgba(7,27,51,.1)!important;border-radius:24px!important;
  box-shadow:0 18px 48px rgba(7,27,51,.09)!important
}
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form :where(.h-row,.row){
  display:flex!important;flex-flow:row wrap!important;align-items:flex-start!important;gap:16px 18px!important;
  width:100%!important;max-width:none!important;min-width:0!important;margin:0 0 14px!important
}
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form :where(.h-row,.row)>:where(.h-col,.h-column,[class*="h-col-"],[class*="col-"]){
  display:block!important;float:none!important;width:auto!important;max-width:none!important;min-width:0!important;
  flex:1 1 300px!important;padding-left:0!important;padding-right:0!important;margin:0!important
}
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form :where(.h-row,.row)>:only-child{
  flex:0 0 100%!important;width:100%!important;max-width:100%!important
}
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select,textarea,.select2-container){
  display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important
}
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select){min-height:50px!important}
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form textarea{min-height:150px!important;resize:vertical!important}
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form .form-actions{text-align:left!important;padding-left:0!important}
body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form input[type="submit"]{
  min-height:52px!important;min-width:190px!important;padding:0 24px!important;border:0!important;border-radius:14px!important;
  background:var(--brand-grad)!important;color:#fff!important;font-weight:900!important
}

/* ---------- Reservation ---------- */
body.cth-brand--vctf.cth-marga-reservation .md-template{
  width:min(calc(100% - 36px),1180px)!important;max-width:1180px!important;margin:34px auto 84px!important;padding:clamp(22px,3.4vw,44px)!important;
  background:#fff!important;border:1px solid rgba(7,27,51,.09)!important;border-radius:26px!important;
  box-shadow:0 20px 55px rgba(7,27,51,.08)!important
}
body.cth-brand--vctf.cth-marga-reservation .md-template h4{
  margin:30px 0 16px!important;padding-top:22px!important;border-top:1px solid rgba(7,27,51,.1)!important;
  color:#071b33!important;font-size:clamp(1.25rem,2vw,1.65rem)!important;line-height:1.08!important;letter-spacing:-.025em!important
}
body.cth-brand--vctf.cth-marga-reservation .md-template h4:first-of-type{margin-top:0!important;padding-top:0!important;border-top:0!important}
body.cth-brand--vctf.cth-marga-reservation .md-template :where(.h-row,.row){
  display:flex!important;flex-flow:row wrap!important;gap:14px 18px!important;width:100%!important;margin:0 0 12px!important
}
body.cth-brand--vctf.cth-marga-reservation .md-template form :where([class*="h-col-"],[class*="col-"]){
  float:none!important;min-width:0!important;box-sizing:border-box!important
}
body.cth-brand--vctf.cth-marga-reservation .md-template :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]),select,textarea){
  width:100%!important;min-width:0!important;max-width:100%!important;border:1px solid #d8e0eb!important;border-radius:12px!important;
  background:#fff!important;color:#071b33!important;box-shadow:none!important
}
body.cth-brand--vctf.cth-marga-reservation .md-template :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="button"]):not([type="submit"]),select){min-height:48px!important;padding:0 12px!important}
body.cth-brand--vctf.cth-marga-reservation .md-template textarea{min-height:130px!important;padding:12px!important;resize:vertical!important}
body.cth-brand--vctf.cth-marga-reservation .md-template :where(.md-btn,input[type="button"],input[type="submit"],button){
  border-radius:12px!important;font-weight:850!important
}
body.cth-brand--vctf.cth-marga-reservation .md-template input[type="submit"]{
  min-height:54px!important;padding:0 26px!important;border:0!important;background:var(--brand-grad)!important;color:#fff!important;
  box-shadow:0 10px 24px rgba(var(--brand-rgb),.2)!important
}
body.cth-brand--vctf.cth-marga-reservation .md-template :where(.politica,[class*="privacidad"],[class*="rgpd"]){
  border-radius:16px!important;background:#f6f9fd!important;color:#526174!important;line-height:1.55!important
}
body.cth-brand--vctf.cth-marga-reservation .md-template :where(input[type="checkbox"],input[type="radio"]){accent-color:var(--brand)!important}

@media(max-width:767px){
  body.cth-brand--vctf.vmon-contact-route #contacto-form :where(.h-row,.row),
  body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form :where(.h-row,.row),
  body.cth-brand--vctf.cth-marga-reservation .md-template :where(.h-row,.row){display:block!important}
  body.cth-brand--vctf.vmon-contact-route #contacto-form :where(.h-row,.row)>[class*="h-col-"],
  body.cth-brand--vctf.vmon-marga-page:not(.vmon-contact-route):not(.cth-marga-reservation) #contacto-form :where(.h-row,.row)>:where(.h-col,.h-column,[class*="h-col-"],[class*="col-"]),
  body.cth-brand--vctf.cth-marga-reservation .md-template form :where([class*="h-col-"],[class*="col-"]){
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0 0 12px!important;padding-left:0!important;padding-right:0!important
  }
  body.cth-brand--vctf.cth-marga-reservation .md-template{width:min(calc(100% - 20px),1180px)!important;margin:18px auto 54px!important;padding:20px 14px 26px!important}
}

/* =========================================================
   VCTF CORE1.1 RC2 - MARGA SEARCH, VISUAL PARITY WITH VMON
   Presentation only: values, options, names and submit stay in Marga.
   ========================================================= */
body.cth-brand--vctf .vmon-marga--search form.md-template{
  width:100%!important;
  max-width:none!important;
}

/* Real legacy Marga markup: first flex row = free search. */
body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:first-of-type{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 64px!important;
  align-items:stretch!important;
  gap:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0 0 10px!important;
  padding:0!important;
}
body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:first-of-type > .md-search-field{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:54px!important;
  min-height:54px!important;
  margin:0!important;
  padding:0 16px!important;
  border:0!important;
  border-radius:13px 0 0 13px!important;
  background:#fff!important;
  color:var(--cth-ink,#071b33)!important;
  box-shadow:none!important;
}
body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:first-of-type > .md-search-submit{
  width:64px!important;
  min-width:64px!important;
  height:54px!important;
  min-height:54px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0 13px 13px 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-shadow:none!important;
}
body.cth-brand--vctf .vmon-marga--search .md-search-submit svg{
  width:19px!important;
  height:19px!important;
  max-width:19px!important;
  max-height:19px!important;
  fill:#fff!important;
}

/* Every later flex row is the filter row. Auto-fit works with 3 or 4 filters + CTA. */
body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:not(:first-of-type),
body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex.gutters-col-1{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(175px,1fr))!important;
  align-items:end!important;
  gap:12px!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:not(:first-of-type) > .md-control,
body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex.gutters-col-1 > .md-control{
  float:none!important;
  display:block!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  flex:none!important;
  margin:0!important;
  padding:0!important;
}
body.cth-brand--vctf .vmon-marga--search .md-label{
  display:block!important;
  margin:0 0 6px!important;
  color:#fff!important;
  opacity:.92!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:850!important;
  letter-spacing:.055em!important;
  text-transform:uppercase!important;
}

/* Select2 is the intended VMON-like presentation. */
body.cth-brand--vctf .vmon-marga--search .select2-container{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
}
body.cth-brand--vctf .vmon-marga--search .select2-container .select2-selection--multiple,
body.cth-brand--vctf .vmon-marga--search .select2-container .select2-selection--single{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  min-height:48px!important;
  height:48px!important;
  padding:0 38px 0 13px!important;
  border:0!important;
  border-radius:12px!important;
  background:#fff!important;
  color:var(--cth-ink,#071b33)!important;
  box-shadow:none!important;
  overflow:hidden!important;
  cursor:pointer!important;
}
body.cth-brand--vctf .vmon-marga--search .select2-container .select2-selection--multiple::after,
body.cth-brand--vctf .vmon-marga--search .select2-container .select2-selection--single::after{
  content:""!important;
  position:absolute!important;
  right:14px!important;
  top:50%!important;
  width:8px!important;
  height:8px!important;
  margin-top:-6px!important;
  border-right:2px solid #758196!important;
  border-bottom:2px solid #758196!important;
  transform:rotate(45deg)!important;
  pointer-events:none!important;
}
body.cth-brand--vctf .vmon-marga--search .select2-container--open .select2-selection--multiple::after,
body.cth-brand--vctf .vmon-marga--search .select2-container--open .select2-selection--single::after{
  margin-top:-2px!important;
  transform:rotate(225deg)!important;
}
body.cth-brand--vctf .vmon-marga--search .select2-selection--multiple .select2-selection__rendered,
body.cth-brand--vctf .vmon-marga--search .select2-selection--single .select2-selection__rendered{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  color:var(--cth-ink,#071b33)!important;
  font-size:13px!important;
  font-weight:700!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
body.cth-brand--vctf .vmon-marga--search .select2-selection--multiple[data-cth-empty="true"] .select2-selection__rendered::before{
  content:attr(data-vmon-placeholder)!important;
  display:block!important;
  color:#647087!important;
  font-size:13px!important;
  font-weight:700!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.cth-brand--vctf .vmon-marga--search .select2-selection__choice{
  flex:0 1 auto!important;
  max-width:145px!important;
  margin:0 4px 0 0!important;
  padding:4px 8px!important;
  border:0!important;
  border-radius:999px!important;
  background:rgba(var(--cth-brand-rgb,11,116,209),.12)!important;
  color:var(--cth-ink,#071b33)!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1.15!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.cth-brand--vctf .vmon-marga--search .select2-selection__choice__remove{
  color:var(--cth-brand,#0b74d1)!important;
  margin-right:5px!important;
}
body.cth-brand--vctf .vmon-marga--search .select2-container--focus .select2-selection--multiple,
body.cth-brand--vctf .vmon-marga--search .select2-container--open .select2-selection--multiple,
body.cth-brand--vctf .vmon-marga--search .select2-container--focus .select2-selection--single,
body.cth-brand--vctf .vmon-marga--search .select2-container--open .select2-selection--single{
  box-shadow:0 0 0 3px rgba(var(--cth-brand-rgb,11,116,209),.24)!important;
}

/* Search button occupies the same visual cell as a filter. */
body.cth-brand--vctf .vmon-marga--search .md-control > .md-btn.w-100,
body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:not(:first-of-type) .md-btn.w-100{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:48px!important;
  min-height:48px!important;
  margin:0!important;
  padding:0 18px!important;
  border-radius:12px!important;
  font-size:15px!important;
  line-height:1!important;
  font-weight:850!important;
}
body.cth-brand--vctf .vmon-marga--search .md-btn.w-100 svg{
  width:15px!important;
  height:15px!important;
  max-width:15px!important;
  max-height:15px!important;
  fill:#fff!important;
}

/* Last-resort native control: never return to the giant scrolling listbox. */
body.cth-brand--vctf .vmon-marga--search .cth-vctf-native-search-control select[multiple]{
  display:block!important;
  position:static!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:48px!important;
  min-height:48px!important;
  max-height:48px!important;
  overflow:hidden!important;
  padding:8px 12px!important;
  border:0!important;
  border-radius:12px!important;
  background:#fff!important;
  color:var(--cth-ink,#071b33)!important;
  font-size:13px!important;
  font-weight:700!important;
  box-shadow:none!important;
}

@media (max-width:900px){
  body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:not(:first-of-type),
  body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex.gutters-col-1{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media (max-width:620px){
  body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:first-of-type{
    grid-template-columns:minmax(0,1fr) 56px!important;
  }
  body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:not(:first-of-type),
  body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex.gutters-col-1{
    grid-template-columns:1fr!important;
  }
  body.cth-brand--vctf .vmon-marga--search form.md-template > .d-flex:first-of-type > .md-search-submit{
    width:56px!important;
    min-width:56px!important;
  }
}
