.intent-popup{
position:fixed;
inset:0;
display:none;
align-items:center;
justify-content:center;

/* Lower layer so page visible */
z-index:999;

padding:20px;

/* Light transparent overlay */
background:rgba(0,0,0,0.15);

/* REMOVE BLUR */
backdrop-filter: unset;
-webkit-backdrop-filter: unset;
}

/* Modal */
.intent-modal{
width:100%;
max-width:480px;   /* reduced from 640px */
background:#ffffff;
border-radius:16px;
padding:28px;      /* reduced padding */
text-align:center;
position:relative;

box-shadow:0 20px 40px rgba(0,0,0,.15);
border:1px solid #e5e7eb;

animation:popupFade .25s ease;
}

@keyframes popupFade{
from{opacity:0; transform:translateY(20px)}
to{opacity:1; transform:translateY(0)}
}

/* Close */

.intent-close{
position:absolute;
top:12px;
right:14px;
border:none;
background:none;
font-size:18px;
cursor:pointer;
color:#9ca3af;
}

/* Header */

.intent-header h2{
font-size:22px;
font-weight:700;
margin-bottom:6px;
color:#2563eb;
}

.intent-header p{
font-size:13px;
color:#6b7280;
}

/* Cards container */

.intent-options{
display:flex;
gap:14px;
margin-top:20px;
}

/* Cards */

.intent-card{
flex:1;
background:#ffffff;
border-radius:12px;
padding:20px;
cursor:pointer;
border:1px solid #e5e7eb;
transition:.2s;
text-align:center;
}

.intent-card:hover{
transform:translateY(-4px);
box-shadow:0 12px 25px rgba(0,0,0,.12);
}

/* Icon circle */

.intent-icon-wrap{
width:46px;
height:46px;
border-radius:12px;
display:flex;
align-items:center;
justify-content:center;
font-size:20px;
margin:0 auto 12px;

background:#2563eb;
color:#fff;
}

/* Buyer icon */

.intent-card.buyer .intent-icon-wrap{
background:#10b981;
}

/* Title */

.intent-card h4{
font-size:16px;
font-weight:600;
margin-bottom:4px;
color:#111827;
}

/* Description */

.intent-card p{
font-size:12.5px;
color:#6b7280;
}

/* Footer */

.intent-footer{
margin-top:18px;
padding-top:14px;
border-top:1px solid #eee;
}

.browse-btn{
border:none;
background:#f3f4f6;
padding:8px 14px;
border-radius:6px;
font-size:13px;
color:#374151;
cursor:pointer;
}

.browse-btn:hover{
background:#e5e7eb;
}

/* Mobile */

@media (max-width:640px){

.intent-options{
flex-direction:column;
}

.intent-modal{
padding:22px 18px;
max-width:340px;
}

}

    /* Chat Container */
.gp-chatbox {
    display: flex;
    flex-direction: column;
    height: 100%;   /* 🔥 MUST */
    min-height: 0;  /* 🔥 VERY IMPORTANT */
    position: relative;
}

/* Header */
.gp-chat-header {
    background: linear-gradient(135deg, #2563EB, #1E40AF);
    color: white;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.gp-close-btn {
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.2s;
}

.gp-close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.gp-bot-avatar {
    background: white;
    color: #2563EB;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 18px;
}

.gp-title {
    font-weight: 600;
}

.gp-status {
    font-size: 12px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Messages */
.gp-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #F3F6FB;

    min-height: 0;  /* 🔥 CRITICAL FIX */
}

/* Message bubbles */
.gp-msg {
    max-width: 75%;
    padding: 8px 12px;
    margin: 6px 0;
    border-radius: 12px;
    font-size: 14px;
}

.gp-msg.user {
    margin-left: auto;
    background: linear-gradient(135deg, #2563EB, #1E40AF);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.gp-msg.bot {
    margin-right: auto;
    background: #ffffff;
    color: #111;
    border: 1px solid #E5E7EB;
    border-bottom-left-radius: 4px;
}

/* Input */
.gp-chat-input {
    display: flex;
    padding: 8px;
    gap: 8px;
     background: #fff;
    border-top: 1px solid #E5E7EB;
    flex-shrink: 0; /* 🔥 keeps it at bottom */
}


.gp-chat-input input {
    flex: 1;
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    padding: 10px;
    font-size: 14px;
}

.gp-chat-input input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.gp-chat-input button {
    background: linear-gradient(135deg, #2563EB, #1E40AF);
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    color: white;
    transition: 0.2s;
    width: 40px;
}

.gp-chat-input button:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #1E40AF, #1E3A8A);
}

.gp-bot-avatar {
    background: white;
    color: #2563EB;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gp-suggestion {
    background: #eef2ff;
    color: #2563EB;
    padding: 8px 10px;
    border-radius: 8px;
    margin: 5px 0;
    cursor: pointer;
    font-size: 13px;
}

.gp-suggestion:hover {
    background: #2563EB;
    color: white;
}

/* typing animation */
.typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 2px;
    background: #999;
    border-radius: 50%;
    animation: blink 1.4s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

.gp-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    margin: 6px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all .2s ease;
}

.gp-product-card:hover {
    transform: translateY(-2px);
}

/* .gp-suggestion {
    background: #eef2ff;
    padding: 6px 10px;
    border-radius: 8px;
    margin: 4px 0;
    cursor: pointer;
    font-size: 13px;
} */

.gp-suggestion:hover {
    background: #2563EB;
    color: white;
}

.gp-auto-suggest {
    position: absolute;
    bottom: 60px;
    left: 10px;
    right: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
}

.suggest-section {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.suggest-section small {
    color: #888;
    font-size: 11px;
}

.suggest-item {
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
}

.suggest-item:hover {
    background: #2563EB;
    color: #fff;
}
/* Prevent layout shifts */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent overflow */
* {
    box-sizing: border-box;
}

/* Better rendering */
html {
    scroll-behavior: smooth;
}

/* Fix hidden overflow issues */
body {
    overflow-x: hidden;
}