/* Botón flotante de contacto multicanal (inc/contact-widget.php) */
.tqcw {
    --cw-navy: #0b1f33; --cw-blue: #2e47ab; --cw-accent: #f7931e; --cw-wa: #25d366; --cw-wa-d: #128c7e;
    --cw-ink: #1e293b; --cw-muted: #64748b; --cw-line: #e6eaf2; --cw-bottom: 24px;
    position: fixed; right: 24px; bottom: var(--cw-bottom); z-index: 9990;
    display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
    font-family: 'Montserrat', sans-serif; text-align: left;
}
.tqcw *, .tqcw *::before, .tqcw *::after { box-sizing: border-box; }
.tqcw :where(ul) { margin: 0; padding: 0; list-style: none; }
.tqcw :where(li) { margin: 0; padding: 0; list-style: none; }
.tqcw li::before, .tqcw li::marker { content: none; }
.tqcw :where(p) { margin: 0; }

/* Botón */
.tqcw__fab { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; cursor: pointer; }
.tqcw__label {
    padding: 11px 16px; border-radius: 14px; background: #fff; color: var(--cw-ink); font-size: 13.5px; line-height: 1.3; white-space: nowrap;
    box-shadow: 0 10px 30px rgba(11, 31, 51, .16); transition: opacity .25s ease, transform .25s ease;
}
.tqcw__label strong { color: var(--cw-navy); }
.tqcw.is-open .tqcw__label, .tqcw.is-seen .tqcw__label { opacity: 0; transform: translateX(8px); pointer-events: none; }
.tqcw__btn {
    position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(145deg, #2fe07a 0%, var(--cw-wa) 45%, var(--cw-wa-d) 100%); color: #fff; font-size: 28px;
    box-shadow: 0 12px 28px rgba(18, 140, 126, .45); transition: transform .25s ease, background .25s ease;
}
.tqcw__btn::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--cw-wa); animation: tqcw-ring 2.6s ease-out infinite; }
@keyframes tqcw-ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.55); opacity: 0; } }
.tqcw__fab:hover .tqcw__btn { transform: scale(1.06); }
.tqcw__fab:focus-visible .tqcw__btn { outline: 3px solid var(--cw-blue); outline-offset: 3px; }
/* Iconos: alterna WhatsApp ⇄ chat; al abrir muestra la X */
.tqcw__btn i { position: absolute; transition: opacity .3s ease, transform .3s ease; }
.tqcw__i-chat { font-size: 24px; opacity: 0; transform: scale(.6); }
.tqcw__i-x { font-size: 24px; opacity: 0; transform: rotate(-90deg); }
.tqcw:not(.is-open) .tqcw__i-wa { animation: tqcw-swap-a 6s ease-in-out infinite; }
.tqcw:not(.is-open) .tqcw__i-chat { animation: tqcw-swap-b 6s ease-in-out infinite; }
@keyframes tqcw-swap-a { 0%, 42% { opacity: 1; transform: scale(1); } 50%, 92% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: scale(1); } }
@keyframes tqcw-swap-b { 0%, 42% { opacity: 0; transform: scale(.6); } 50%, 92% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.6); } }
.tqcw.is-open .tqcw__btn { background: var(--cw-navy); box-shadow: 0 12px 28px rgba(11, 31, 51, .35); }
.tqcw.is-open .tqcw__btn::before { animation: none; opacity: 0; }
.tqcw.is-open .tqcw__i-wa, .tqcw.is-open .tqcw__i-chat { opacity: 0; transform: scale(.6); }
.tqcw.is-open .tqcw__i-x { opacity: 1; transform: none; }

/* Panel */
.tqcw__panel {
    width: 340px; max-width: calc(100vw - 32px); overflow: hidden; border-radius: 22px; background: #fff;
    box-shadow: 0 24px 60px rgba(11, 31, 51, .25); transform-origin: bottom right; animation: tqcw-pop .28s cubic-bezier(.16, 1, .3, 1);
}
.tqcw__panel[hidden] { display: none; }
@keyframes tqcw-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.tqcw__head { position: relative; padding: 22px 22px 20px; background: radial-gradient(260px 140px at 100% 0, rgba(247, 147, 30, .28), rgba(247, 147, 30, 0) 70%), linear-gradient(135deg, var(--cw-navy) 0%, var(--cw-blue) 100%); color: #fff; }
.tqcw__x { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 14px; cursor: pointer; }
.tqcw__x:hover { background: rgba(255, 255, 255, .26); }
.tqcw__x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tqcw__status { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(37, 211, 102, .18); color: #bbf7d0; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.tqcw__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cw-wa); box-shadow: 0 0 0 3px rgba(37, 211, 102, .3); }
.tqcw__title { padding-right: 36px; font-family: 'Poppins', sans-serif; font-size: 19px; font-weight: 700; line-height: 1.25; color: #fff; }
.tqcw__sub { margin-top: 4px !important; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .8); }

.tqcw__list { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.tqcw a.tqcw__item {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--cw-line); border-radius: 14px;
    background: #fff; color: var(--cw-ink); text-decoration: none; transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.tqcw a.tqcw__item:hover { transform: translateX(2px); border-color: rgba(46, 71, 171, .3); background: #f8faff; }
.tqcw a.tqcw__item:focus-visible { outline: 3px solid rgba(46, 71, 171, .35); outline-offset: 1px; }
.tqcw__ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 19px; color: #fff; }
.is-wa .tqcw__ic { background: var(--cw-wa); }
.is-mail .tqcw__ic { background: #eef2ff; color: var(--cw-blue); }
.is-fb .tqcw__ic { background: linear-gradient(135deg, #00b2ff 0%, #006aff 100%); }
.is-ig .tqcw__ic { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.tqcw__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tqcw__txt strong { font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--cw-navy); }
.tqcw__txt small { overflow: hidden; font-size: 12px; color: var(--cw-muted); white-space: nowrap; text-overflow: ellipsis; }
.tqcw__lang { flex: none; padding: 3px 8px; border-radius: 6px; background: #ecfdf3; color: var(--cw-wa-d); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.tqcw__go { flex: none; color: #b6c0cc; font-size: 12px; }
.tqcw__duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tqcw__duo .tqcw__ic { width: 36px; height: 36px; font-size: 17px; }
.tqcw a.tqcw__avail {
    display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 14px 14px; padding: 12px; border-radius: 12px;
    background: #fff7ed; color: #b45309; font-size: 13px; font-weight: 700; text-decoration: none; transition: background .2s ease;
}
.tqcw a.tqcw__avail:hover { background: #ffedd5; }
.tqcw a.tqcw__avail i:last-child { font-size: 11px; }

/* Tours del Camino Inca: sube sobre la barra fija de reserva y se oculta con la hoja abierta (tour-booking) */
html.tqb-lock .tqcw { display: none !important; }

@media (max-width: 767.98px) {
    .tqcw { right: 16px; --cw-bottom: 16px; }
    .tqcw__label { display: none; }
    .tqcw__btn { width: 56px; height: 56px; font-size: 26px; }
    .tqcw__panel { width: calc(100vw - 32px); }
}
@media (max-width: 991.98px) {
    body.tqb-has-bar .tqcw { --cw-bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) {
    .tqcw__btn::before, .tqcw:not(.is-open) .tqcw__i-wa, .tqcw:not(.is-open) .tqcw__i-chat, .tqcw__panel { animation: none; }
    .tqcw:not(.is-open) .tqcw__i-wa { opacity: 1; transform: none; }
}
@media print { .tqcw { display: none; } }
