/* Assistente de presentes de Natal - estilos do widget (prefixo cb-).
   O site repoe box-sizing: revert (custom-bootstrap.css) e fixa o viewport sem zoom:
   por isso box-sizing explicito e inputs com 16px (evita zoom no iOS). */
.cb-launcher, .cb-launcher *, .cb-panel, .cb-panel * { box-sizing: border-box; }

.cb-launcher {
    position: fixed; left: 20px; bottom: 30px; z-index: 9999;
    display: flex; align-items: center; gap: 8px;
    height: 48px; padding: 0 18px; border: 0; border-radius: 24px;
    background: #000; color: #fff; cursor: pointer;
    font-family: LatoWebBold, Lato, Arial, sans-serif; font-size: 14px; letter-spacing: .3px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.cb-launcher:hover, .cb-launcher:focus { background: #222; outline: 0; }
.cb-launcher:focus-visible, .cb-close:focus-visible, .cb-chip:focus-visible, .cb-send:focus-visible { outline: 2px solid #ff0021; outline-offset: 2px; }
.cb-launcher.cb-oculto { display: none; }
.cb-launcher-icone { font-size: 18px; line-height: 1; }

.cb-panel {
    position: fixed; left: 20px; bottom: 30px; z-index: 10000;
    display: flex; flex-direction: column;
    width: 380px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 60px);
    background: #fff; color: #000; border: 1px solid #ddd; border-radius: 12px; overflow: hidden;
    font-family: LatoWeb, Lato, Arial, sans-serif; font-size: 14px; line-height: 1.4;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}
.cb-panel[hidden] { display: none; }

.cb-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #000; color: #fff; }
.cb-header-tit { display: flex; flex-direction: column; }
.cb-header-tit strong { font-family: LatoWebBold, Lato, Arial, sans-serif; font-size: 15px; letter-spacing: .3px; }
.cb-header-tit span { font-size: 12px; opacity: .75; }
.cb-header-acoes { display: flex; align-items: center; gap: 2px; }
.cb-close, .cb-size { border: 0; background: transparent; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; padding: 6px; }
.cb-size { display: flex; align-items: center; opacity: .85; }
.cb-size:hover, .cb-close:hover { opacity: 1; }
.cb-size:focus-visible { outline: 2px solid #ff0021; outline-offset: 2px; }

.cb-msgs { flex: 1 1 auto; overflow-y: auto; padding: 14px; background: #f7f7f7; -webkit-overflow-scrolling: touch; }
.cb-msg { display: flex; flex-direction: column; margin-bottom: 10px; }
.cb-msg-user { align-items: flex-end; }
.cb-msg-bot { align-items: flex-start; }
.cb-bubble { max-width: 88%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.cb-msg-user .cb-bubble { background: #000; color: #fff; border-bottom-right-radius: 4px; }
.cb-msg-bot .cb-bubble { background: #fff; color: #000; border: 1px solid #e3e3e3; border-bottom-left-radius: 4px; }

.cb-typing { display: flex; gap: 4px; padding: 12px 14px; }
.cb-typing span { width: 6px; height: 6px; border-radius: 50%; background: #999; animation: cb-pulse 1.2s infinite ease-in-out; }
.cb-typing span:nth-child(2) { animation-delay: .15s; }
.cb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cb-pulse { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.cb-cards { display: flex; gap: 10px; width: 100%; margin-top: 8px; padding-bottom: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.cb-card { flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; overflow: hidden; color: #000; text-decoration: none; }
.cb-card:hover, .cb-card:focus { text-decoration: none; color: #000; border-color: #000; }
.cb-card-img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #f0f0f0; }
.cb-card-info { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.cb-card-tag { align-self: flex-start; padding: 1px 6px; border-radius: 3px; background: #ff0021; color: #fff; font-size: 10px; letter-spacing: .3px; text-transform: uppercase; }
.cb-card-nome { font-family: LatoWebBold, Lato, Arial, sans-serif; font-size: 12px; line-height: 1.25; }
.cb-card-marca { font-size: 10px; color: #666; text-transform: uppercase; }
.cb-card-preco { display: flex; gap: 6px; align-items: baseline; margin-top: 2px; }
.cb-preco-normal { font-family: LatoWebBold, Lato, Arial, sans-serif; font-size: 14px; }
.cb-preco-promo { font-family: LatoWebBold, Lato, Arial, sans-serif; font-size: 14px; color: #ff0021; }
.cb-preco-antigo { font-size: 11px; color: #a7a7a7; text-decoration: line-through; }
.cb-card-tam { font-size: 10px; color: #666; }

.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; background: #f7f7f7; }
.cb-chip { border: 1px solid #000; border-radius: 16px; background: #fff; color: #000; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.cb-chip:hover { background: #000; color: #fff; }

.cb-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #e3e3e3; background: #fff; }
.cb-input { flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #ccc; border-radius: 20px; font-size: 16px; font-family: inherit; color: #000; background: #fff; }
.cb-input:focus { outline: 0; border-color: #000; }
.cb-input:disabled { background: #f0f0f0; }
.cb-send { flex: 0 0 auto; height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: #000; color: #fff; font-family: LatoWebBold, Lato, Arial, sans-serif; font-size: 13px; cursor: pointer; }
.cb-send:disabled { opacity: .5; cursor: default; }

.cb-nota { margin: 0; padding: 0 14px 10px; background: #fff; color: #888; font-size: 10px; line-height: 1.3; }

/* janela grande (botao no cabecalho): mais largura e altura, cartoes em grelha em vez de carrossel */
.cb-panel.cb-grande { width: min(660px, calc(100vw - 40px)); height: min(820px, calc(100vh - 60px)); }
.cb-grande .cb-bubble { max-width: 82%; }
.cb-grande .cb-cards { flex-wrap: wrap; overflow-x: visible; }
.cb-grande .cb-card { flex: 0 0 calc(33.333% - 7px); }

@media (max-width: 480px) {
    .cb-size { display: none; }
    .cb-panel.cb-grande { width: 100vw; height: 85vh; }
    .cb-grande .cb-cards { flex-wrap: nowrap; overflow-x: auto; }
    .cb-grande .cb-card { flex: 0 0 150px; }
    .cb-launcher { left: 12px; bottom: 20px; width: 48px; padding: 0; justify-content: center; }
    .cb-launcher-texto { display: none; }
    .cb-panel { left: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 85vh; max-height: 85vh; border-radius: 12px 12px 0 0; }
}

@media print { .cb-launcher, .cb-panel { display: none !important; } }
