/* Conversación con MAX · 321Despega. Todo va con el prefijo dsp- 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"); }
body .dsp-chat {
  --dsp-navy: #243266; --dsp-blue: #4C8CCA; --dsp-coral: #ED6883; --dsp-yellow: #F8AD28;
  --dsp-sand: #FBF5EE; --dsp-line: #E9E3DA; --dsp-soft: #555F7E; --dsp-coral-text: #A33F5A;
  --dsp-ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Config Rounded", system-ui, sans-serif;
  color: var(--dsp-navy); font-size: calc(1.125 * var(--d321-rem, 16px)); line-height: 1.6; scroll-margin-top: 96px;
}
body .dsp-chat *, body .dsp-chat *::before, body .dsp-chat *::after { box-sizing: border-box; }
body .dsp-chat p { margin: 0; }
body .dsp-chat [hidden] { display: none !important; }
body .dsp-chat .dsp-sr, body .dsp-chat .dsp-hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body .dsp-chat :focus-visible { outline: 3px solid var(--dsp-blue); outline-offset: 3px; border-radius: 10px; }

body .dsp-chat .dsp-stage { position: relative; overflow: hidden; display: grid; place-items: center; min-height: min(calc(100svh - 96px), 800px); padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 48px); border-radius: 32px; background: var(--dsp-sand); }
body .dsp-chat .dsp-decor { position: absolute; inset: 0; pointer-events: none; }
body .dsp-chat .dsp-cloud { position: absolute; fill: #fff; }
body .dsp-chat .dsp-c1 { left: -28px; top: 14%; width: 200px; }
body .dsp-chat .dsp-c2 { right: -36px; bottom: 10%; width: 250px; }
body .dsp-chat .dsp-sp { position: absolute; width: 18px; height: 18px; }
body .dsp-chat .dsp-s1 { right: 12%; top: 13%; width: 40px; height: 40px; fill: var(--dsp-yellow); }
body .dsp-chat .dsp-s2 { left: 14%; bottom: 18%; fill: var(--dsp-coral); }
body .dsp-chat .dsp-s3 { left: 20%; top: 12%; fill: var(--dsp-blue); }
body .dsp-chat .dsp-stage.is-talking .dsp-s2, body .dsp-chat .dsp-stage.is-talking .dsp-c2 { opacity: 0; transition: opacity .4s; }
body .dsp-chat .dsp-col { position: relative; width: min(720px, 100%); }
body .dsp-chat .dsp-ask { display: grid; justify-items: center; text-align: center; }

/* MAX: el recorte oculta el texto que trae la ilustración sin modificar el archivo */
body .dsp-chat .dsp-max:not(.dsp-row) { width: 112px; margin-bottom: 8px; transition: width .5s var(--dsp-ease); }
body .dsp-chat .dsp-max:not(.dsp-row) img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; clip-path: polygon(0 0, 78% 0, 78% 21%, 100% 21%, 100% 100%, 0 100%); transform-origin: 50% 96%; }
body .dsp-chat .dsp-ask h1 { margin: 0; color: var(--dsp-navy); font-family: inherit; font-weight: 500; font-size: clamp(calc(2.5 * var(--d321-rem, 16px)), calc(1.4 * var(--d321-rem, 16px)) + 4.2vw, calc(4.75 * var(--d321-rem, 16px))); line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; transition: font-size .5s var(--dsp-ease); }

/* Saludo de MAX: bocadillo bajo la mascota */
body .dsp-chat .dsp-hello { position: relative; max-width: 34em; margin: 4px 0 clamp(16px, 2.4vh, 24px) !important; padding: 12px 22px; border-radius: 22px; background: #fff; box-shadow: 0 14px 30px -22px rgba(36, 50, 102, .45); color: var(--dsp-navy); font-size: clamp(calc(1.0625 * var(--d321-rem, 16px)), calc(.9 * var(--d321-rem, 16px)) + .45vw, calc(1.3125 * var(--d321-rem, 16px))); line-height: 1.4; text-wrap: balance; animation: dsp-in .5s var(--dsp-ease) .2s both; }
body .dsp-chat .dsp-hello::before { content: ""; position: absolute; left: 50%; top: -7px; width: 16px; height: 16px; margin-left: -8px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
body .dsp-chat .dsp-ask.is-answered .dsp-hello { display: none; }

body .dsp-chat .dsp-answer { width: 100%; margin-top: clamp(24px, 4vh, 40px); text-align: left; }
body .dsp-chat .dsp-box { display: flex; align-items: flex-end; gap: 12px; padding: 14px 14px 14px 26px; border-radius: 28px; background: #fff; box-shadow: 0 0 0 1.5px var(--dsp-line), 0 24px 50px -32px rgba(36, 50, 102, .45); transition: box-shadow .3s var(--dsp-ease); }
body .dsp-chat .dsp-box:focus-within { box-shadow: 0 0 0 2px var(--dsp-blue), 0 24px 50px -28px rgba(36, 50, 102, .5); }
body .dsp-chat .dsp-field { position: relative; flex: 1; min-width: 0; align-self: center; }
body .dsp-chat .dsp-field textarea { scrollbar-width: none; display: block; width: 100%; min-height: 1.45em; max-height: 6em; margin: 0; padding: 4px 0; border: 0; outline: 0; background: transparent; resize: none; overflow-y: auto; box-shadow: none; color: var(--dsp-navy); font: inherit; font-size: clamp(calc(1.25 * var(--d321-rem, 16px)), calc(1 * var(--d321-rem, 16px)) + .9vw, calc(1.625 * var(--d321-rem, 16px))); line-height: 1.4; caret-color: var(--dsp-coral); }
body .dsp-chat .dsp-field textarea::placeholder { color: #69718C; opacity: 1; }
body .dsp-chat .dsp-caret { display: none; position: absolute; left: 0; top: .32em; width: 2px; height: 1.15em; border-radius: 2px; background: var(--dsp-coral); font-size: clamp(calc(1.25 * var(--d321-rem, 16px)), calc(1 * var(--d321-rem, 16px)) + .9vw, calc(1.625 * var(--d321-rem, 16px))); pointer-events: none; animation: dsp-blink 1.05s steps(1) infinite; }
body .dsp-chat .dsp-field textarea:placeholder-shown:not(:focus) + .dsp-caret { display: block; }
body .dsp-chat .dsp-field textarea:placeholder-shown:not(:focus) { text-indent: 10px; }
@keyframes dsp-blink { 50% { opacity: 0; } }

body .dsp-chat .dsp-btn, body .dsp-chat .dsp-choice.is-main { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 24px; border: 0; border-radius: 999px; background: var(--dsp-navy); color: #fff; font-family: inherit; font-size: calc(1 * var(--d321-rem, 16px)); font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform .3s var(--dsp-ease), box-shadow .3s var(--dsp-ease); }
body .dsp-chat .dsp-btn { flex: none; }
body .dsp-chat .dsp-btn svg { width: 18px; height: 18px; transition: transform .3s var(--dsp-ease); }
body .dsp-chat .dsp-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(36, 50, 102, .5); background: var(--dsp-navy); color: #fff; }
body .dsp-chat .dsp-btn:hover svg { transform: translateX(3px); }
body .dsp-chat .dsp-help { margin-top: 16px !important; padding-left: 26px; color: var(--dsp-soft); font-size: calc(.9375 * var(--d321-rem, 16px)); }
body .dsp-chat .dsp-help kbd { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px var(--dsp-line), inset 0 -2px 0 var(--dsp-line); font-family: inherit; font-size: calc(.8125 * var(--d321-rem, 16px)); font-weight: 500; color: inherit; }
body .dsp-chat .dsp-error { margin-top: 10px !important; padding-left: 26px; color: var(--dsp-coral-text); font-size: calc(.9375 * var(--d321-rem, 16px)); font-weight: 500; }
body .dsp-chat .dsp-ask.is-answered .dsp-answer { display: none; }
body .dsp-chat .dsp-ask.is-answered .dsp-max:not(.dsp-row) { width: 76px; }
body .dsp-chat .dsp-ask.is-answered h1 { font-size: clamp(calc(1.75 * var(--d321-rem, 16px)), calc(1.3 * var(--d321-rem, 16px)) + 1.6vw, calc(2.5 * var(--d321-rem, 16px))); }

/* Hilo */
body .dsp-chat .dsp-log { display: grid; gap: 14px; }
body .dsp-chat .dsp-log:not(:empty) { margin-top: 28px; }
body .dsp-chat .dsp-row { display: flex; align-items: flex-end; gap: 10px; animation: dsp-in .45s var(--dsp-ease) both; }
body .dsp-chat .dsp-user { justify-content: flex-end; }
@keyframes dsp-in { from { opacity: 0; transform: translateY(10px); } }
body .dsp-chat .dsp-face { position: relative; flex: 0 0 42px; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff, 0 6px 14px -6px rgba(36, 50, 102, .35); }
body .dsp-chat .dsp-face img { position: absolute; max-width: none !important; width: 96px; height: auto; left: -29px; top: -6px; }
body .dsp-chat .dsp-bubble { min-width: 0; max-width: min(560px, 86%); padding: 14px 18px; border-radius: 22px 22px 22px 6px; background: #fff; box-shadow: 0 14px 30px -24px rgba(36, 50, 102, .5); font-size: calc(1.0625 * var(--d321-rem, 16px)); line-height: 1.5; }
body .dsp-chat .dsp-user .dsp-bubble { border-radius: 22px 22px 6px 22px; background: var(--dsp-navy); color: #fff; box-shadow: none; overflow-wrap: anywhere; }
body .dsp-chat .dsp-bubble p + p, body .dsp-chat .dsp-bubble p + dl, body .dsp-chat .dsp-bubble p + .dsp-wa { margin-top: 8px; }
body .dsp-chat .dsp-small { color: var(--dsp-soft); font-size: calc(.875 * var(--d321-rem, 16px)); }
body .dsp-chat .dsp-small a { color: inherit; }
body .dsp-chat .dsp-typing { display: inline-flex; gap: 5px; padding: 7px 2px; }
body .dsp-chat .dsp-typing i { width: 7px; height: 7px; border-radius: 50%; background: #AEB5C9; animation: dsp-dot 1s ease-in-out infinite; }
body .dsp-chat .dsp-typing i:nth-child(2) { animation-delay: .15s; } .dsp-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dsp-dot { 0%, 80%, 100% { opacity: .35; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
body .dsp-chat .dsp-choices { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 52px; }
body .dsp-chat .dsp-choice { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 18px; border-radius: 999px; border: 0; background: #fff; color: var(--dsp-navy); box-shadow: inset 0 0 0 1.5px var(--dsp-line); font-family: inherit; font-size: calc(1 * var(--d321-rem, 16px)); font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform .3s var(--dsp-ease), box-shadow .2s, background-color .2s; }
body .dsp-chat .dsp-choice:hover, body .dsp-chat .dsp-choice:focus-visible { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--dsp-coral); background: #FFF7F9; color: var(--dsp-navy); }
body .dsp-chat .dsp-choice.is-main { min-height: 46px; box-shadow: none; }
body .dsp-chat .dsp-choice.is-main:hover, body .dsp-chat .dsp-choice.is-main:focus-visible { background: #1B2654; color: #fff; }
body .dsp-chat .dsp-form { display: grid; gap: 8px; padding-left: 52px; }
body .dsp-chat .dsp-form label { font-size: calc(.875 * var(--d321-rem, 16px)); font-weight: 500; color: var(--dsp-soft); }
body .dsp-chat .dsp-inline { display: flex; gap: 8px; }
body .dsp-chat .dsp-form input[type="text"], body .dsp-chat .dsp-form input[type="email"], body .dsp-chat .dsp-form input[type="tel"] { flex: 1; min-width: 0; min-height: 52px; margin: 0; padding: 10px 20px; border: 0; border-radius: 999px; background: #fff; color: var(--dsp-navy); box-shadow: inset 0 0 0 1.5px var(--dsp-line); font: inherit; font-size: calc(1.0625 * var(--d321-rem, 16px)); caret-color: var(--dsp-coral); }
body .dsp-chat .dsp-form input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--dsp-blue); }
body .dsp-chat .dsp-consent { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; line-height: 1.45; cursor: pointer; }
body .dsp-chat .dsp-consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--dsp-navy); }
body .dsp-chat .dsp-field-error { color: var(--dsp-coral-text); font-size: calc(.875 * var(--d321-rem, 16px)); font-weight: 500; }
body .dsp-chat .dsp-summary { display: grid; gap: 8px; margin: 0; }
body .dsp-chat .dsp-summary div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
body .dsp-chat .dsp-summary dt { color: var(--dsp-soft); font-size: calc(.9375 * var(--d321-rem, 16px)); }
body .dsp-chat .dsp-summary dd { margin: 0; overflow-wrap: anywhere; }
body .dsp-chat .dsp-wa { padding: 12px 14px; border-radius: 14px; background: #EAF5EC; color: #1E3A27; font-size: calc(.9375 * var(--d321-rem, 16px)); white-space: pre-wrap; }

@media (prefers-reduced-motion: no-preference) {
  body .dsp-chat .dsp-max:not(.dsp-row) img { animation: dsp-wave 1.5s var(--dsp-ease) .4s 1 both; }
  body .dsp-chat .dsp-c1 { animation: dsp-drift 14s ease-in-out infinite; }
  body .dsp-chat .dsp-c2 { animation: dsp-drift 20s ease-in-out infinite reverse; }
  body .dsp-chat .dsp-s1, body .dsp-chat .dsp-s3 { animation: dsp-float 6s ease-in-out infinite; }
  body .dsp-chat .dsp-s2 { animation: dsp-float 7.5s ease-in-out infinite; }
}
@keyframes dsp-wave { 0%, 100% { transform: none; } 20% { transform: translateY(-6px) rotate(-7deg); } 40% { transform: rotate(6deg); } 58% { transform: rotate(-5deg); } 76% { transform: rotate(3deg); } }
@keyframes dsp-drift { 0%, 100% { translate: 0 0; } 50% { translate: 18px 0; } }
@keyframes dsp-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) { .dsp-chat *, .dsp-chat *::before, .dsp-chat *::after { animation: none !important; transition: none !important; } }

@media (max-width: 640px) {
  body .dsp-chat { font-size: calc(1.0625 * var(--d321-rem, 16px)); }
  body .dsp-chat .dsp-stage { place-items: start center; min-height: min(calc(100svh - 84px), 720px); padding-top: 32px; border-radius: 26px; }
  body .dsp-chat .dsp-c1 { width: 130px; top: 6%; left: -40px; } .dsp-c2 { width: 160px; bottom: 4%; }
  body .dsp-chat .dsp-s1 { right: 8%; top: 6%; width: 30px; height: 30px; } .dsp-s3 { left: 10%; top: 8%; }
  body .dsp-chat .dsp-max:not(.dsp-row) { width: 88px; }
  body .dsp-chat .dsp-box { flex-direction: column; align-items: stretch; padding: 16px; border-radius: 24px; }
  body .dsp-chat .dsp-field textarea { min-height: calc(2.8em + 8px); }
  body .dsp-chat .dsp-btn { width: 100%; }
  body .dsp-chat .dsp-help, body .dsp-chat .dsp-error { padding-left: 4px; }
  body .dsp-chat .dsp-desk { display: none; }
  body .dsp-chat .dsp-choices, body .dsp-chat .dsp-form { padding-left: 0; }
  body .dsp-chat .dsp-face { flex-basis: 34px; width: 34px; height: 34px; }
  body .dsp-chat .dsp-face img { width: 80px; left: -24px; top: -5px; }
  body .dsp-chat .dsp-bubble { max-width: calc(100% - 44px); }
  body .dsp-chat .dsp-user .dsp-bubble { max-width: 88%; }
  body .dsp-chat .dsp-summary div { grid-template-columns: 1fr; gap: 0; }
}
body .dsp-chat .dsp-choice { white-space: normal; text-align: left; }
