/* Asistente Torres Bus — botón plateado y ventana de chat */
.tbc, .tbc * { box-sizing: border-box; }
.tbc { --tbc-silver: linear-gradient(145deg, #fbfbfc 0%, #e3e5e8 30%, #b9bdc3 62%, #e9ebee 100%); --tbc-ink: #23272e; --tbc-line: #c9ccd1; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.45; color: var(--tbc-ink); }

/* Botón flotante */
/* Encima de la columna de Chaty (siempre abierta: 3 iconos de 54 px a la derecha, hasta 203 px del borde inferior):
   centrado sobre ella con 12 px de separación. Si cambia el número de iconos de Chaty, ajustar "bottom". */
.tbc-launcher { position: fixed; right: 21px; bottom: 215px; z-index: 99998; width: 62px; height: 62px; border-radius: 50%; border: 1px solid #9aa0a7; background: var(--tbc-silver); box-shadow: 0 6px 18px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.9), inset 0 -2px 4px rgba(0,0,0,.12); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: transform .18s ease, box-shadow .18s ease; }
.tbc-launcher:hover { transform: scale(1.06); box-shadow: 0 8px 22px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.9), inset 0 -2px 4px rgba(0,0,0,.12); }
.tbc-launcher:focus-visible { outline: 3px solid #5b8def; outline-offset: 3px; }
.tbc-launcher svg { width: 32px; height: 32px; fill: var(--tbc-ink); }
.tbc-launcher .tbc-ic-close { display: none; width: 24px; height: 24px; }
.tbc.is-open .tbc-launcher .tbc-ic-chat { display: none; }
.tbc.is-open .tbc-launcher .tbc-ic-close { display: block; }
.tbc-launcher { transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.tbc-launcher::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(160,166,174,.55); animation: tbc-pulse 2.6s ease-out 1.5s 3; pointer-events: none; }
@keyframes tbc-pulse { 0% { box-shadow: 0 0 0 0 rgba(160,166,174,.55); } 100% { box-shadow: 0 0 0 16px rgba(160,166,174,0); } }

/* Ventana */
/* La ventana se abre a la izquierda de la columna de Chaty, sin taparla. */
.tbc-panel { position: fixed; right: 95px; bottom: 25px; z-index: 99999; width: 370px; max-width: calc(100vw - 24px); height: 540px; max-height: calc(100vh - 50px); background: #f4f5f7; border: 1px solid var(--tbc-line); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.tbc.is-open .tbc-panel { opacity: 1; transform: none; pointer-events: auto; }
.tbc-head { background: var(--tbc-silver); border-bottom: 1px solid var(--tbc-line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.tbc-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--tbc-ink); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tbc-avatar svg { width: 22px; height: 22px; fill: #e9ebee; }
.tbc-head-txt { flex: 1; min-width: 0; }
.tbc-title { font-weight: 700; font-size: 15px; margin: 0; color: var(--tbc-ink); }
.tbc-sub { font-size: 12px; color: #4a5059; display: flex; align-items: center; gap: 5px; }
.tbc-sub::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2fb344; }
.tbc-x { background: transparent; border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.tbc-x:hover { background: rgba(0,0,0,.07); }
.tbc-x svg { width: 18px; height: 18px; fill: var(--tbc-ink); }

.tbc-body { flex: 1; overflow-y: auto; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.tbc-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; word-wrap: break-word; overflow-wrap: anywhere; white-space: normal; }
.tbc-msg a { color: #1f5fbf; text-decoration: underline; }
.tbc-msg ul { margin: 4px 0; padding-left: 18px; }
.tbc-msg li { margin: 2px 0; }
.tbc-bot { align-self: flex-start; background: #fff; border: 1px solid #e2e4e8; border-top-left-radius: 4px; }
.tbc-user { align-self: flex-end; background: linear-gradient(145deg, #dfe2e6, #c4c8ce); border: 1px solid #b4b9bf; border-top-right-radius: 4px; }
.tbc-preview { align-self: stretch; max-width: none; background: #fff8e1; border: 1px solid #f0d58a; font-size: 13px; }
.tbc-typing { display: inline-flex; gap: 4px; align-items: center; }
.tbc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa0a7; animation: tbc-dot 1.2s infinite ease-in-out; }
.tbc-typing span:nth-child(2) { animation-delay: .15s; }
.tbc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes tbc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.tbc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 4px; }
.tbc-chip { background: #fff; border: 1px solid #b9bdc3; color: var(--tbc-ink); border-radius: 999px; padding: 6px 11px; font-size: 13px; cursor: pointer; font-family: inherit; }
.tbc-chip:hover { background: #eceef1; }

.tbc-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e0e2e6; background: #fff; }
.tbc-input { flex: 1; border: 1px solid #c9ccd1; border-radius: 22px; padding: 10px 14px; font: inherit; font-size: 15px; resize: none; height: 42px; max-height: 110px; line-height: 1.35; color: var(--tbc-ink); background: #fff; }
.tbc-input:focus { outline: none; border-color: #8d939a; box-shadow: 0 0 0 3px rgba(141,147,154,.2); }
.tbc-send { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #9aa0a7; background: var(--tbc-silver); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 0; }
.tbc-send:disabled { opacity: .5; cursor: default; }
.tbc-send svg { width: 20px; height: 20px; fill: var(--tbc-ink); }
.tbc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.tbc-foot { background: #fff; padding: 0 12px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: #5d636b; }
.tbc-foot a.tbc-link { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: var(--tbc-ink); border: 1px solid #d3d6da; border-radius: 999px; padding: 4px 10px; font-weight: 600; }
.tbc-foot a.tbc-link:hover { background: #f0f1f3; }
.tbc-foot a.tbc-wa svg { fill: #25a244; }
.tbc-foot svg { width: 14px; height: 14px; fill: var(--tbc-ink); }
.tbc-note { flex-basis: 100%; font-size: 11px; color: #7a8088; }

@media (max-width: 480px) {
	.tbc-launcher { right: 23px; bottom: 215px; width: 58px; height: 58px; }
	.tbc-panel { left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: 0; }
	.tbc.is-open .tbc-launcher { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.tbc-launcher, .tbc-panel { transition: none; }
	.tbc-launcher::after, .tbc-typing span { animation: none; }
}
@media print { .tbc { display: none !important; } }


/* Coacheshire placement and theme isolation; keep the existing WhatsApp button. */
.coach-premium .tbc{--tbc-silver:linear-gradient(145deg,#e8d6aa,#d0b579 65%,#e5cd96);letter-spacing:0;line-height:1.45;color:#23272e}
.coach-premium .tbc-launcher{bottom:90px;right:20px}
.coach-premium .tbc-panel{bottom:90px;right:95px;max-height:calc(100dvh - 112px)}
.coach-premium .tbc-input{color:#23272e;background:#fff;min-width:0;letter-spacing:0}
.coach-premium .tbc-title{color:#23272e;line-height:1.4;margin:0;letter-spacing:0}
.coach-premium .tbc-msg{color:#23272e;line-height:1.5;letter-spacing:0}
.coach-premium .tbc-note{color:#58616b;line-height:1.4}
.coach-premium .tbc button{font-family:Arial,Helvetica,sans-serif;letter-spacing:0;text-transform:none}
.coach-premium .tbc-chip{color:#23272e;background:#fff;line-height:1.4}
.coach-premium .tbc-chip:hover{background:#eee5d1}
.coach-premium .tbc-msg a{color:#245793}
@media(max-width:600px){.coach-premium .tbc-panel{right:12px;bottom:164px;width:calc(100vw - 24px);height:520px;max-height:calc(100dvh - 184px)}.coach-premium .tbc-launcher{right:18px;bottom:90px}}

.coach-premium .tbc{font-weight:400}.coach-premium .tbc-panel{left:auto}@media(max-width:600px){.coach-premium .tbc-panel{width:calc(100% - 24px);max-width:calc(100% - 24px);left:auto;right:12px}}
