/**
 * Greenlend Wellness Assistant - AI Chatbot Stylesheet
 * Brand Colors:
 * - Primary Deep Teal: #0f5c52 / #147467
 * - Light Mint: #e8f5f1 / #f0fdf9
 * - Dark Navy: #0d1b2a / #111827
 * - White: #ffffff
 * - Warm Gold Accent: #d4af37 / #d97706
 */

/* ========================================================
   ROOT CONTAINER & BACKDROP
   ======================================================== */
.gl-chatbot-root {
    position: relative;
    font-family: var(--font-family-base, 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.gl-chatbot-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 27, 42, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99994;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.gl-chatbot-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ========================================================
   FLOATING TRIGGER BUTTON (ABOVE LANGUAGE TRANSLATOR)
   Desktop: bottom: 86px; right: 28px; (Language Dock is at bottom: 28px)
   ======================================================== */
.gl-chatbot-trigger {
    position: fixed;
    bottom: 86px;
    right: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f5c52 0%, #147467 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.7);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99992;
    padding: 0;
    margin: 0;
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 
        0 8px 24px rgba(15, 92, 82, 0.35),
        0 3px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.35);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.25s ease,
                border-color 0.25s ease;
}

.gl-chatbot-trigger:hover {
    transform: translateY(-3px) scale(1.06);
    background: linear-gradient(135deg, #126e62 0%, #178a7b 100%);
    border-color: rgba(212, 175, 55, 1);
    box-shadow: 
        0 12px 28px rgba(15, 92, 82, 0.45),
        0 4px 12px rgba(212, 175, 55, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.45);
}

.gl-chatbot-trigger:active {
    transform: translateY(2px) scale(0.96);
    box-shadow: 
        0 3px 10px rgba(15, 92, 82, 0.3),
        0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Icon Switching Inside Trigger */
.gl-chatbot-trigger-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    position: relative;
}

.gl-chatbot-trigger .gl-icon-bot {
    display: block;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.gl-chatbot-trigger .gl-icon-close {
    display: none;
    color: #FFFFFF;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.gl-chatbot-trigger.is-open {
    background: linear-gradient(135deg, #0d1b2a 0%, #1e293b 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

.gl-chatbot-trigger.is-open .gl-icon-bot {
    display: none;
}

.gl-chatbot-trigger.is-open .gl-icon-close {
    display: block;
    transform: rotate(90deg);
    animation: gl-close-in 0.25s forwards cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gl-close-in {
    from {
        transform: rotate(0deg) scale(0.7);
        opacity: 0;
    }
    to {
        transform: rotate(90deg) scale(1);
        opacity: 1;
    }
}

/* Subtle Radiating Pulse Ring */
.gl-chatbot-pulse-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 1.5px solid rgba(212, 175, 55, 0.6);
    opacity: 0.8;
    animation: gl-bot-pulse 2.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    pointer-events: none;
}

.gl-chatbot-trigger.is-open .gl-chatbot-pulse-ring {
    display: none;
}

@keyframes gl-bot-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Online Green Indicator Dot */
.gl-chatbot-online-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    background: #10B981;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

/* Hover Tooltip */
.gl-chatbot-tooltip {
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: #0D1B2A;
    color: #FFFFFF;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 13px;
    border-radius: 9999px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    letter-spacing: 0.01em;
}

.gl-chatbot-tooltip strong {
    color: #FBBF24;
    font-weight: 600;
}

.gl-tooltip-spark {
    margin-right: 2px;
}

.gl-chatbot-trigger:hover .gl-chatbot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.gl-chatbot-trigger.is-open .gl-chatbot-tooltip {
    display: none;
}

/* ========================================================
   PROACTIVE WELCOME NUDGE (Auto-shows after 6s once per session)
   ======================================================== */
.gl-chatbot-nudge {
    position: fixed;
    bottom: 144px;
    right: 28px;
    background: #FFFFFF;
    color: #0F172A;
    border: 1px solid rgba(15, 92, 82, 0.18);
    border-radius: 14px;
    box-shadow: 
        0 10px 25px -3px rgba(15, 92, 82, 0.18),
        0 4px 10px -2px rgba(0, 0, 0, 0.08);
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 290px;
    z-index: 99991;
    cursor: default;
    user-select: none;
    animation: gl-nudge-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.gl-chatbot-nudge::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #FFFFFF;
    border-right: 1px solid rgba(15, 92, 82, 0.18);
    border-bottom: 1px solid rgba(15, 92, 82, 0.18);
    transform: rotate(45deg);
}

@keyframes gl-nudge-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gl-nudge-body {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.gl-nudge-wave {
    font-size: 1.15rem;
    line-height: 1;
    display: inline-block;
    animation: gl-wave 2.2s infinite ease-in-out;
}

@keyframes gl-wave {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(14deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(10deg); }
    80% { transform: rotate(-4deg); }
}

.gl-nudge-text {
    font-size: 0.78rem;
    line-height: 1.35;
    color: #1E293B;
}

.gl-nudge-text strong {
    color: #0F5C52;
    font-weight: 700;
}

.gl-nudge-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.15rem;
    color: #94A3B8;
    padding: 0 4px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.gl-nudge-close:hover {
    color: #0F172A;
    background: #F1F5F9;
}

/* ========================================================
   CHAT DRAWER WINDOW
   Desktop: 380px wide, bottom: 86px, right: 28px
   ======================================================== */
.gl-chatbot-window {
    position: fixed;
    bottom: 86px;
    right: 28px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 600px;
    max-height: calc(100vh - 110px);
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 
        0 24px 60px -10px rgba(13, 27, 42, 0.35),
        0 8px 24px -4px rgba(15, 92, 82, 0.2),
        0 0 0 1px rgba(15, 92, 82, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99996;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    pointer-events: none;
    transition: 
        opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1),
        visibility 0.28s;
}

.gl-chatbot-window.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ========================================================
   HEADER STYLING
   ======================================================== */
.gl-chat-header {
    background: linear-gradient(135deg, #0D1B2A 0%, #0F5C52 100%);
    color: #FFFFFF;
    padding: 16px 18px 12px 18px;
    position: relative;
    border-bottom: 2px solid rgba(212, 175, 55, 0.35);
    flex-shrink: 0;
}

.gl-chat-header-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gl-chat-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.gl-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #147467 0%, #0F5C52 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.gl-chat-avatar-status {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    background: #10B981;
    border: 1.5px solid #0D1B2A;
    border-radius: 50%;
}

.gl-chat-header-info {
    flex: 1;
    min-width: 0;
}

.gl-chat-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gl-chat-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: #FFFFFF !important;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.gl-chat-badge-ai {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(212, 175, 55, 0.22);
    color: #FCD34D;
    border: 1px solid rgba(212, 175, 55, 0.45);
    padding: 1px 6px;
    border-radius: 6px;
}

.gl-chat-status {
    font-size: 0.74rem;
    color: #A7F3D0;
    margin: 3px 0 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gl-status-pulse {
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #10B981;
    flex-shrink: 0;
}

.gl-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gl-chat-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #E2E8F0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.18s, color 0.18s, transform 0.15s;
    outline: none;
}

.gl-chat-icon-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
    transform: scale(1.05);
}

.gl-chat-icon-btn:active {
    transform: scale(0.95);
}

/* Language Mode Selector Strip inside Header */
.gl-chat-lang-bar {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gl-lang-label {
    font-size: 0.72rem;
    color: #94A3B8;
    font-weight: 500;
}

.gl-chat-lang-pills {
    display: flex;
    align-items: center;
    background: rgba(13, 27, 42, 0.55);
    padding: 2px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.gl-lang-pill {
    background: transparent;
    border: none;
    color: #CBD5E1;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    outline: none;
    line-height: 1.3;
}

.gl-lang-pill:hover {
    color: #FFFFFF;
}

.gl-lang-pill.is-active {
    background: #147467;
    color: #FFFFFF;
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ========================================================
   CHAT BODY & MESSAGES
   ======================================================== */
.gl-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    background: #F8FAFC;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom Sleek Scrollbar */
.gl-chat-body::-webkit-scrollbar {
    width: 5px;
}

.gl-chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.gl-chat-body::-webkit-scrollbar-thumb {
    background: rgba(15, 92, 82, 0.2);
    border-radius: 10px;
}

.gl-chat-body::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 92, 82, 0.4);
}

/* Messages */
.gl-message {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    max-width: 90%;
    animation: gl-msg-fade 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes gl-msg-fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gl-message-bot {
    align-self: flex-start;
}

.gl-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.gl-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #E8F5F1;
    border: 1px solid #147467;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.gl-msg-bubble {
    background: #FFFFFF;
    color: #1E293B;
    padding: 11px 14px;
    border-radius: 4px 16px 16px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
    font-size: 0.88rem;
    line-height: 1.5;
    word-break: break-word;
}

.gl-message-user .gl-msg-bubble {
    background: linear-gradient(135deg, #0F5C52 0%, #147467 100%);
    color: #FFFFFF;
    border: 1px solid #0F5C52;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 4px 14px rgba(15, 92, 82, 0.25);
}

.gl-msg-p {
    margin: 0 0 6px 0;
}

.gl-msg-p:last-child {
    margin-bottom: 0;
}

.gl-msg-time {
    display: block;
    font-size: 0.68rem;
    color: #94A3B8;
    margin-top: 5px;
    text-align: right;
}

.gl-message-user .gl-msg-time {
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================================
   QUICK ACTION CHIPS
   ======================================================== */
.gl-quick-chips-wrapper {
    margin: 4px 0 6px 36px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gl-chips-hint {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gl-quick-chips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.gl-quick-chip {
    background: #FFFFFF;
    border: 1.5px solid #D1FAE5;
    border-radius: 12px;
    padding: 9px 12px;
    color: #0F5C52;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    text-align: left;
    outline: none;
    transition: 
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.gl-quick-chip:hover {
    background: #E8F5F1;
    border-color: #147467;
    color: #0B423B;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(15, 92, 82, 0.15);
}

.gl-quick-chip:active {
    transform: translateY(1px);
}

.gl-chip-emoji {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.gl-chip-text {
    flex: 1;
    line-height: 1.3;
}

.gl-quick-chip-context {
    background: #F0FDF9 !important;
    border-color: #147467 !important;
    color: #0F5C52 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(15, 92, 82, 0.12);
}

.gl-quick-chip-context:hover {
    background: #0F5C52 !important;
    color: #FFFFFF !important;
    border-color: #0F5C52 !important;
}

.gl-quick-chip-context:hover .gl-chip-text {
    color: #FFFFFF !important;
}

/* ========================================================
   TYPING INDICATOR
   ======================================================== */
.gl-typing-bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    width: fit-content;
}

.gl-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0F5C52;
    opacity: 0.4;
    animation: gl-typing-bounce 1.4s infinite ease-in-out both;
}

.gl-typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.gl-typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes gl-typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.65);
        opacity: 0.35;
    }
    40% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ========================================================
   FOOTER & INPUT BAR
   ======================================================== */
.gl-chat-footer {
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    padding: 10px 14px 10px 14px;
    flex-shrink: 0;
}

.gl-chat-input-wrapper {
    display: flex;
    align-items: center;
    background: #F1F5F9;
    border: 1.5px solid #CBD5E1;
    border-radius: 9999px;
    padding: 4px 5px 4px 14px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.gl-chat-input-wrapper:focus-within {
    background: #FFFFFF;
    border-color: #147467;
    box-shadow: 0 0 0 3px rgba(20, 116, 103, 0.15);
}

.gl-chat-input {
    flex: 1;
    background: transparent;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 0.88rem;
    color: #0F172A;
    padding: 8px 4px;
    font-family: inherit;
}

.gl-chat-input::placeholder {
    color: #94A3B8;
    font-size: 0.84rem;
}

.gl-chat-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #CBD5E1;
    color: #64748B;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
    outline: none;
}

.gl-chat-send-btn.is-active,
.gl-chat-send-btn:not(:disabled) {
    background: linear-gradient(135deg, #0F5C52 0%, #147467 100%);
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(15, 92, 82, 0.35);
}

.gl-chat-send-btn.is-active:hover,
.gl-chat-send-btn:not(:disabled):hover {
    transform: scale(1.06);
    background: linear-gradient(135deg, #126e62 0%, #178a7b 100%);
    box-shadow: 0 4px 12px rgba(15, 92, 82, 0.45);
}

.gl-chat-send-btn:active {
    transform: scale(0.94);
}

/* Tiny Trust Footer Note */
.gl-chat-sub-footer {
    text-align: center;
    margin-top: 7px;
}

.gl-sub-footer-text {
    font-size: 0.68rem;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.gl-sub-icon {
    color: #147467;
}

/* ========================================================
   STRUCTURED PRODUCT RECOMMENDATION CARDS (STEP 2 & 4 POLISH)
   ======================================================== */
.gl-chat-products-strip {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.gl-chat-product-card {
    display: flex;
    gap: 10px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 9px 11px;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s, border-color 0.2s;
}

.gl-chat-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 92, 82, 0.14);
    border-color: #0F5C52;
}

.gl-chat-prod-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 9px;
    background: #F8FAFC;
    flex-shrink: 0;
    border: 1px solid #E2E8F0;
}

.gl-chat-prod-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gl-chat-prod-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
}

.gl-chat-prod-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0F172A;
    text-decoration: none;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gl-chat-prod-title:hover {
    color: #0F5C52;
}

.gl-chat-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #166534;
    background: #DCFCE7;
    padding: 1px 6px;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.gl-stock-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 4px #22C55E;
}

.gl-chat-stock-badge.is-outofstock {
    color: #991B1B !important;
    background: #FEF2F2 !important;
}

.gl-stock-dot.is-outofstock {
    background: #EF4444 !important;
    box-shadow: 0 0 4px #EF4444 !important;
}

.gl-chat-prod-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    margin-top: 1px;
}

.gl-chat-prod-price {
    font-weight: 800;
    color: #0F5C52;
}

.gl-chat-prod-mrp {
    color: #94A3B8;
    font-size: 0.7rem;
    text-decoration: line-through;
}

.gl-chat-prod-off {
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.64rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.gl-chat-prod-sizes-strip {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.gl-chat-size-pill {
    font-size: 0.62rem;
    color: #475569;
    background: #F1F5F9;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
}

.gl-chat-prod-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #FFFFFF !important;
    background: linear-gradient(135deg, #0F5C52 0%, #147467 100%);
    text-decoration: none !important;
    padding: 4px 11px;
    border-radius: 6px;
    margin-top: 4px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 5px rgba(15, 92, 82, 0.22);
}

.gl-chat-prod-btn:hover {
    background: linear-gradient(135deg, #147467 0%, #0F5C52 100%);
    box-shadow: 0 4px 10px rgba(15, 92, 82, 0.32);
    transform: translateY(-1px);
}

/* WhatsApp CTA inside Message */
.gl-chat-wa-box {
    margin-top: 10px;
}

.gl-chat-wa-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #25D366;
    color: #FFFFFF !important;
    text-decoration: none !important;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 9999px;
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gl-chat-wa-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(37, 211, 102, 0.45);
}

/* Mobile Grab Handle Indicator */
.gl-chat-mobile-handle {
    display: none;
}

/* ========================================================
   RESPONSIVE / MOBILE STYLES (Bottom Sheet on <= 768px)
   ======================================================== */
@media (max-width: 768px) {
    /* Trigger Button on Mobile (sitting above language dock) */
    .gl-chatbot-trigger {
        bottom: 74px;
        right: 16px;
        width: 44px;
        height: 44px;
    }

    .gl-chatbot-tooltip {
        display: none !important; /* Hide tooltip on touch */
    }

    /* Proactive Nudge positioning on Mobile */
    .gl-chatbot-nudge {
        bottom: 126px;
        right: 16px;
        max-width: calc(100vw - 32px);
    }

    .gl-chatbot-nudge::after {
        right: 16px;
    }

    /* Grab Handle at Top of Mobile Sheet */
    .gl-chat-mobile-handle {
        display: block;
        width: 38px;
        height: 4px;
        border-radius: 9999px;
        background: rgba(255, 255, 255, 0.45);
        margin: 8px auto 0 auto;
    }

    /* Chatbot Window transforms to a sleek Bottom Sheet */
    .gl-chatbot-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 84vh;
        height: 84dvh;
        max-height: 84vh;
        max-height: 84dvh;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
        transform: translateY(100%);
        transform-origin: bottom center;
        z-index: 999999;
    }

    .gl-chatbot-window.is-open {
        transform: translateY(0);
    }

    .gl-chat-header {
        padding: 10px 16px 10px 16px;
    }

    .gl-chat-title {
        font-size: 0.98rem;
    }

    .gl-chat-body {
        padding: 14px 12px;
    }

    .gl-quick-chips-wrapper {
        margin-left: 0;
    }

    .gl-chat-footer {
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 12px;
    }
}

