/* --- CHATBOT WRAPPER --- */
#chatbot-wrapper {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;

    width: 680px !important;
    height: 90vh !important;
    max-height: 60vh !important;

    z-index: 9999 !important;
    background: #f7e6e9;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);

    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
	padding-left: 19px;
}

#chatbot-wrapper.is-visible {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

/* --- CHATBOT CONTAINER (AJUSTADO) --- */
#chatbot-container {
    position: relative !important;
    width: 640px !important;
    height: 100% !important;
    max-height: 100% !important;
    font-family: Arial, sans-serif;
    display: flex !important;
    flex-direction: column !important;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transform: none !important;
    transition: none !important;
    overflow: hidden;
}

/* --- CHATBOT AVATAR --- */
#chatbot-avatar {
    position: absolute !important;
    top: -50px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
	padding-top: 55px
}

#chatbot-avatar img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
	
}
/* --- CHATBOT MINIMIZADO (SÓ IMAGEM) --- */
#chatbot-minimized {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #fafafa;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0; /* Removemos o padding lateral */
}

#chatbot-minimized:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#chatbot-minimized-avatar {
    width: 100%;
    height: 200%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-minimized-avatar img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

/* Mobile */
@media (max-width: 767px) {
    #chatbot-minimized {
        width: 70px;
        height: 70px;
        bottom: 90px;
        right: 50px;
    }
    
    #chatbot-minimized-avatar img {
        width: 100px;
        height: 80px;
    }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#chatbot-minimized-avatar img {
    animation: pulse 3s infinite;
}

/* --- CHAT WINDOW --- */

#chatbot-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s;
}

#chatbot-close:hover {
    color: #000;
}


#chatbot-window {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    overflow: hidden;
    padding: 10px;
	padding-top: 90px
}

#chatbot-messages {
    flex-grow: 1 !important;
    overflow-y: auto;
    padding-right: 10px;
}

.chatbot-bubble {
    background: #f1f1f1;
    border-radius: 15px;
    padding: 10px 15px;
    margin-bottom: 10px;
    max-width: 85%;
    line-height: 1.4;
    word-wrap: break-word;
}

.chatbot-bubble.agent-bubble {
    text-align: left;
    margin-right: auto;
}

.chatbot-bubble.user-bubble {
    background-color: #ba697f;
    color: #fff;
    margin-left: auto;
    text-align: right;
}

/* --- INPUT AREA --- */
#chatbot-input-area {
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
}

#chatbot-initial-buttons {
    display: flex !important;
    justify-content: space-around;
    gap: 10px;
}

#chatbot-initial-buttons button {
    flex-grow: 1 !important;
    padding: 10px 15px;
    background: #ba697f;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

#chatbot-initial-buttons button:hover {
    background-color: #a35d72;
}

#chatbot-text-input {
    display: flex !important;
    gap: 5px;
}

#user-input {
    flex-grow: 1 !important;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #ccc;
    transition: border-color 0.2s;
}

#user-input:focus {
    border-color: #ba697f;
    outline: none;
}

#btn-send {
    padding: 8px 15px;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
}


/* --- REGRAS PARA OCULTAR ELEMENTOS DE COMPRA DO WOOCOMMERCE --- */
			/* --- REGRAS PARA OCULTAR OUTROS BOTÕES E ELEMENTOS --- */

			/* Ocultar o botão "Adicionar ao carrinho" */

           



			form.cart .single_add_to_cart_button,
			.single_add_to_cart_button.button {
				display: none !important;
			}

			/* Ocultar o seletor de quantidade */
			.quantity,
			.woocommerce-quantity {
				display: none !important;
			}

			/* Ocultar campos de variação se existirem e estiverem associados à compra */
			.variations_form .variations {
				display: none !important;
			}
			.variations_form .single_variation_wrap {
				display: none !important;
			}

			/* Ocultar meta informações (SKU, categorias, tags) se não quiser que apareçam */
			.product_meta {
				display: none !important;
			}

			#fpd-start-customizing-button { display: none !important; }

			/* REGRAS PARA OCULTAR GOOGLE PAY E PAGAMENTO LINK */
			#gpay-button-online-apid-id,
			#google-button-container,
			.p-ExpressCheckoutElement button#primary,
			.p-ExpressCheckoutElement {
				display: none !important;
			}

			/* --- REGRAS: OCULTAR PREÇOS --- */
			.price,
			.woocommerce-Price-amount,
			.amount,
			.product-price,
			.single-product-page .summary .price,
			.woocommerce-loop-product__title + .price,
			.woocommerce-loop-product__link + .price,
			.woocommerce-loop-product__title + .amount {
				display: none !important;
			}

/* --- MEDIA QUERY PARA MOBILE --- */
@media (max-width: 767px) {
    #chatbot-wrapper {
        width: 95vw !important;
        height: 40vh !important;
        max-height: 40vh !important;
        padding: 10px !important;
        top: 30% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
		transition: all 0.3s ease;
        will-change: height, top;
    }

    #chatbot-container {
        width: 100% !important;
        height: 100% !important;
        overflow-y: auto !important;
    }

    #chatbot-messages {
        max-height: 100% !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* Ajustes para teclado mobile */
@media (max-width: 767px) {
    #chatbot-wrapper.keyboard-visible {
        top: 140px !important;
        transform: none !important;
        height: 500px !important;
        max-height: 70vh !important;
    }

    #chatbot-container.keyboard-visible {
        height: 500px !important;
        max-height: 100% !important;
    }

    #chatbot-messages.keyboard-visible {
        max-height: 40vh !important;
        overflow-y: auto !important;
    }
}

    
    #chatbot-input-area {
        position: relative;
		padding-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */
        padding-bottom: env(safe-area-inset-bottom); /* iOS 11.2+ */
        background: #fff;
    }

