/* MAX flotante · 321Despega Core. Prefijo mx- para no chocar con el tema ni con Elementor. */
@font-face { font-family: "Config Rounded"; font-weight: 400; font-display: swap; src: url("../fonts/ConfigRoundedRegular.woff2") format("woff2"); }
@font-face { font-family: "Config Rounded"; font-weight: 500; font-display: swap; src: url("../fonts/ConfigRoundedMedium.woff2") format("woff2"); }
@font-face { font-family: "Config Rounded"; font-weight: 800; font-display: swap; src: url("../fonts/ConfigRoundedExtrabold.woff2") format("woff2"); }
:root {
  --mx-navy: #243266; --mx-blue: #4C8CCA; --mx-coral: #ED6883; --mx-sand: #FBF5EE; --mx-line: #E9E3DA; --mx-soft: #555F7E; --mx-coral-text: #A33F5A;
  --mx-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mx-font: "Config Rounded", system-ui, sans-serif;
}
body .mx-launcher, body .mx-hint, body .mx-panel { font-family: var(--mx-font); color: var(--mx-navy); box-sizing: border-box; }
body .mx-panel *, body .mx-panel *::before, body .mx-panel *::after { box-sizing: border-box; }
body .mx-panel p { margin: 0; }
body .mx-panel [hidden], body .mx-hint[hidden], body .mx-panel[hidden] { display: none !important; }
body .mx-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes mx-in { from { opacity: 0; transform: translateY(10px); } }
body .mx-typing { display: inline-flex; gap: 5px; padding: 7px 2px; }
body .mx-typing i { width: 7px; height: 7px; border-radius: 50%; background: #AEB5C9; animation: mx-dot 1s ease-in-out infinite; }
body .mx-typing i:nth-child(2) { animation-delay: .15s; } .mx-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes mx-dot { 0%, 80%, 100% { opacity: .35; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
body .mx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px; background: var(--mx-navy); color: #fff; font: 500 calc(.9375 * var(--d321-rem, 16px)) var(--mx-font); cursor: pointer; }
body .mx-lead .mx-consent { display: flex; align-items: flex-start; gap: 8px; font-size: calc(.8125 * var(--d321-rem, 16px)); color: var(--mx-soft); }
body .mx-lead .mx-consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--mx-navy); }
body .mx-lead .mx-consent a { color: var(--mx-navy); }
@media (prefers-reduced-motion: reduce) { .mx-launcher, .mx-hint, .mx-panel, .mx-row, .mx-typing i { animation: none !important; transition: none !important; } }
/* ===== MAX flotante ===== */
body .mx-launcher { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 55; display: inline-flex; align-items: center; gap: 10px; min-height: 60px; padding: 6px 20px 6px 6px; border: 0; border-radius: 999px; background: var(--mx-navy); color: #fff; font: 500 calc(1 * var(--d321-rem, 16px)) var(--mx-font); cursor: pointer; box-shadow: 0 18px 40px -16px rgba(36, 50, 102, .6); transition: transform .35s var(--mx-ease), opacity .3s, visibility .3s; }
body .mx-launcher:hover { transform: translateY(-3px); }
body .mx-face { position: relative; flex: 0 0 48px; width: 48px; height: 48px; overflow: hidden; border-radius: 50%; background: #fff; }
body .mx-face img { position: absolute; max-width: none; width: 110px; left: -33px; top: -7px; }
body.mx-wait .mx-launcher, .has-cookie-bar .mx-launcher, body.mx-wait .mx-hint, .has-cookie-bar .mx-hint { opacity: 0; visibility: hidden; transform: translateY(12px); }
body.mx-open .mx-launcher-text { display: none; }
body.mx-open .mx-launcher { padding-right: 6px; }
body .mx-hint { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(max(20px, env(safe-area-inset-bottom, 0px)) + 74px); z-index: 55; display: flex; align-items: flex-start; gap: 6px; max-width: 260px; padding: 12px 10px 12px 16px; border-radius: 18px 18px 6px 18px; background: #fff; box-shadow: 0 0 0 1.5px var(--mx-line), 0 18px 40px -20px rgba(36, 50, 102, .5); animation: mx-in .45s var(--mx-ease) both; }
body .mx-hint-text { border: 0; background: none; padding: 0; text-align: left; font: 500 calc(.9375 * var(--d321-rem, 16px))/1.4 var(--mx-font); color: var(--mx-navy); cursor: pointer; }
body .mx-hint-close, body .mx-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--mx-soft); font-size: calc(1.375 * var(--d321-rem, 16px)); line-height: 1; cursor: pointer; }
body .mx-hint-close:hover, body .mx-close:hover { background: var(--mx-sand); color: var(--mx-navy); }

body .mx-panel { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(max(20px, env(safe-area-inset-bottom, 0px)) + 76px); z-index: 56; display: flex; flex-direction: column; width: min(400px, calc(100vw - 40px)); height: min(620px, calc(100vh - 140px)); overflow: hidden; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1.5px var(--mx-line), 0 40px 80px -30px rgba(36, 50, 102, .55); animation: mx-in .4s var(--mx-ease) both; }
body .mx-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--mx-sand); }
body .mx-head .mx-face { flex-basis: 44px; width: 44px; height: 44px; }
body .mx-head .mx-face img { width: 100px; left: -30px; top: -6px; }
body .mx-head-info { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
body .mx-head-info strong { font-weight: 800; }
body .mx-head-info span { color: var(--mx-soft); font-size: calc(.875 * var(--d321-rem, 16px)); }
body .mx-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; overscroll-behavior: contain; }
body .mx-row { display: flex; align-items: flex-end; gap: 8px; animation: mx-in .35s var(--mx-ease) both; }
body .mx-row .mx-face { flex-basis: 30px; width: 30px; height: 30px; }
body .mx-row .mx-face img { width: 70px; left: -21px; top: -4px; }
body .mx-user { justify-content: flex-end; }
body .mx-bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--mx-sand); font-size: calc(.9375 * var(--d321-rem, 16px)); line-height: 1.5; overflow-wrap: anywhere; }
body .mx-bubble p + p { margin-top: 6px; }
body .mx-user .mx-bubble { border-radius: 18px 18px 6px 18px; background: var(--mx-navy); color: #fff; }
body .mx-links { display: grid; gap: 6px; }
body .mx-links-t { font-weight: 500; }
body .mx-link { display: inline-flex; justify-self: start; padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--mx-navy); font-size: calc(.875 * var(--d321-rem, 16px)); font-weight: 500; text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--mx-line); }
body .mx-link:hover { box-shadow: inset 0 0 0 1.5px var(--mx-coral); }
body .mx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 38px; }
body .mx-chip { min-height: 38px; padding: 6px 14px; border: 0; border-radius: 999px; background: #fff; color: var(--mx-navy); box-shadow: inset 0 0 0 1.5px var(--mx-line); font: 500 calc(.875 * var(--d321-rem, 16px)) var(--mx-font); cursor: pointer; }
body .mx-chip:hover, body .mx-chip:focus-visible { box-shadow: inset 0 0 0 1.5px var(--mx-coral); background: #FFF7F9; }
body .mx-lead { display: grid; gap: 6px; margin-left: 38px; padding: 14px; border-radius: 16px; background: var(--mx-sand); font-size: calc(.875 * var(--d321-rem, 16px)); }
body .mx-lead label:not(.mx-consent) { font-weight: 500; color: var(--mx-soft); }
body .mx-lead input:not([type="checkbox"]) { min-height: 42px; padding: 8px 14px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--mx-line); font: inherit; color: var(--mx-navy); }
body .mx-lead input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--mx-blue); }
body .mx-lead .mx-consent { font-size: calc(.8125 * var(--d321-rem, 16px)); }
body .mx-lead .mx-btn { justify-self: start; min-height: 40px; padding: 8px 18px; }
body .mx-err { color: var(--mx-coral-text); font-weight: 500; }
body .mx-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--mx-line); }
body .mx-input input { flex: 1; min-width: 0; min-height: 46px; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--mx-sand); color: var(--mx-navy); font: inherit; font-size: calc(1 * var(--d321-rem, 16px)); }
body .mx-input input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--mx-blue); background: #fff; }
body .mx-send { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--mx-navy); color: #fff; cursor: pointer; display: grid; place-items: center; }
body .mx-send svg { width: 20px; height: 20px; }
body .mx-foot { padding: 0 14px 10px; color: var(--mx-soft); font-size: calc(.75 * var(--d321-rem, 16px)); text-align: center; }

@media (max-width: 640px) {
  body .mx-launcher { right: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); min-height: 56px; }
  body .mx-launcher-text { display: none; }
  body .mx-launcher { padding-right: 6px; }
  body .mx-hint { right: 16px; bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 68px); }
  body .mx-panel { inset: 0; width: auto; height: auto; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); }
  body.mx-open .mx-launcher { display: none; }
  body.mx-open { overflow: hidden; }
}

/* Hablar por WhatsApp */
body .mx-wa { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; background: #E7F6EC; color: #145C32; font-size: calc(.875 * var(--d321-rem, 16px)); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--mx-line); }
body .mx-wa:hover, body .mx-wa:focus-visible { background: #D6F0DF; color: #0F4A28; }
body .mx-wa svg { width: 18px; height: 18px; flex: none; color: #1F9D55; }
/* El tema puede impedir que el texto de los botones pase de línea: aquí sí debe hacerlo. */
body .mx-hint-text, body .mx-chip { white-space: normal; text-align: left; }
