.comatrasa-bot-root{font-size:var(--cb-font-size,16px); color:var(--cb-text,#111827);}
.cb-bubble{position:fixed; right:16px; bottom:16px; width:56px; height:56px; border-radius:50%;
 background:var(--cb-bubble,#106ebe); color:#fff; border:none; box-shadow:0 6px 20px rgba(0,0,0,.2); cursor:pointer; z-index:9998; display:flex; align-items:center; justify-content:center; transition: transform .15s ease, box-shadow .15s ease;}
.cb-bubble .cb-bubble-icon{width:28px; height:28px; display:block;}
.cb-bubble .cb-bubble-x{width:20px; height:20px; display:none; color:#fff}
.cb-bubble.is-open .cb-bubble-icon{display:none}
.cb-bubble.is-open .cb-bubble-x{display:block}
/* Hover effect when in "X" mode */
.cb-bubble.is-open:hover { transform: scale(1.06); box-shadow: 0 10px 26px rgba(0,0,0,.25); }

.cb-panel{position:fixed; right:16px; bottom:84px; width:360px; max-width:calc(100vw - 32px); height:60vh; max-height:560px;
 background:var(--cb-bg,#fff); border:1px solid #ddd; border-radius:16px; box-shadow:0 20px 60px rgba(0,0,0,.25); display:none; flex-direction:column; z-index:9999;
 transform:translateY(8px); opacity:0; transition:opacity .18s ease, transform .18s ease;}
.cb-panel.is-open{display:flex; opacity:1; transform:translateY(0)}

.cb-topbar{display:flex; align-items:center; justify-content:space-between; padding:12px 12px; border-bottom:1px solid #eee}
.cb-title{font-weight:var(--cb-title-weight,600)}

.cb-icon-btn{width:var(--cb-top-btn,40px); height:var(--cb-top-btn,40px); border:none; background:transparent; color:#555; cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:8px}
.cb-icon-btn img,.cb-icon-btn svg{width:var(--cb-top-icon,24px); height:var(--cb-top-icon,24px); display:block}
.cb-icon-btn:hover{background:#f3f3f3; transform:scale(1.05); transition:background .15s ease, transform .1s ease}
.cb-icon-btn.is-hidden{visibility:hidden;}

.cb-content{flex:1; overflow:auto; padding:8px 12px 60px 12px; display:flex; flex-direction:column; gap:8px; transition:opacity .18s ease, transform .18s ease}
.cb-content.cb-leave{opacity:0; transform:translateX(-6px)}
.cb-content.cb-enter{opacity:1; transform:translateX(0)}

.cb-row{display:flex; gap:12px; padding:10px; border-radius:12px; border:1px solid #e5e7eb; background:#fff; text-align:left; cursor:pointer; transition: background .2s ease, transform .15s ease, border-color .2s ease}
.cb-row-title{font-weight:600; color:var(--cb-text,#111827)}
.cb-row-desc{font-weight:400; font-size:.92em; color:#4b5563}
.cb-row:hover{background:var(--cb-hover-bg,#f9fafb); transform:translateY(-2px); border-color:#d1d5db}

.cb-icon{display:inline-flex; align-items:center; justify-content:center; border-radius:8px; overflow:hidden; background:#ffffff; border:none}
.cb-icon img{display:block; width:100%; height:100%; object-fit:cover}
.cb-icon-placeholder{display:block; width:100%; height:100%; background:linear-gradient(135deg,#ececec,#fafafa)}

.cb-texts{display:flex; flex-direction:column; gap:2px; flex:1}
.cb-card{border:1px solid #e5e7eb; border-radius:12px; padding:10px; background:#fff}
.cb-card-head{display:flex; gap:12px; align-items:flex-start; margin-bottom:8px}
.cb-actions{display:flex; gap:12px; padding-top:6px; border-top:1px dashed #eee}
.cb-act{display:inline-flex; width:40px; height:40px; align-items:center; justify-content:center; border-radius:10px; border:none; background:#fff}

.cb-extra-sep{height:8px; border-bottom:1px dashed #e5e7eb; margin:6px 0 0 0}
.cb-extra{margin-top:8px; font-size:.9em; color:#374151; line-height:1.35}

@keyframes cb-bubble-pulse {
  0% { transform: scale(1); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
  50% { transform: scale(1.06); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
  100% { transform: scale(1); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
}
.cb-bubble.cb-pulse { animation: cb-bubble-pulse .6s ease; }

/* Footer fixed and always visible */
.cb-footer{
  flex:0 0 auto;
  position:sticky;
  bottom:0;
  left:0;
  right:0;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-top:1px solid #eee;
  background:#fafafa;
  border-bottom-left-radius:16px;
  border-bottom-right-radius:16px;
  z-index:10;
}
.cb-footer img{ width:70px; height:6px; object-fit:contain; opacity:.85; }
.cb-footer-text,.cb-footer-link{ color:#000 !important; text-decoration:underline; }
.cb-footer.align-center{ justify-content:center; }
.cb-footer.align-right{ justify-content:flex-end; }
/* Footer text right-align and smaller */
.cb-footer-link, .cb-footer-text { font-size:0.85em; margin-left:auto; text-align:right; display:block; }

@media (max-width:480px){ .cb-panel{height:70vh; bottom:84px;} }
@media (max-width:360px){ .cb-footer.cb-footer-hide-sm{ display:none; } }

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .cb-panel,
  .cb-content,
  .cb-bubble {
    transition: none !important;
    animation: none !important;
  }
}

/* === Comatrasa Bot — Mobile Bubble Visibility Fix (integrated v1.3.0) === */
.cb-bubble { background: #000000; }
.cb-bubble { bottom: 72px !important; } /* o el alto del elemento inferior + 16px */

@media (max-width: 767px) {
  .cb-bubble { bottom: 100px !important; }
}

:root {
  --cbot-right: 16px;
  --cbot-bottom: 16px;
  --cbot-size: 56px; /* 48–64px según tu diseño */
}

/* BURBUJA */
.comatrasa-bot-launcher {
  position: fixed !important;
  inset: auto var(--cbot-right) calc(var(--cbot-bottom) + env(safe-area-inset-bottom)) auto !important;
  width: var(--cbot-size);
  height: var(--cbot-size);
  border-radius: 50%;
  z-index: 2147483647 !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform, bottom;
  pointer-events: auto;
}

.comatrasa-bot-launcher button,
.comatrasa-bot-launcher a {
  min-width: var(--cbot-size);
  min-height: var(--cbot-size);
}

@media (max-width: 480px) {
  :root {
    --cbot-right: 14px;
    --cbot-bottom: 14px;
    --cbot-size: 56px;
  }
}

/* Evita que banners con z-index altísimo tapen la burbuja */
[id*="cookie"],
[class*="cookie"],
.cc-window,
#cookie-law-info-bar,
.cky-consent-bar,
#cn-notice,
#moove_gdpr_cookie_info_bar {
  z-index: 999999 !important; /* < 2147483647 */
}
