/* GG AI Suite - Chat Widget & Summary Styles */
/* Per-element color control via CSS custom properties */

:root {
    /* Button */
    --gg-btn-bg: #003366;
    --gg-btn-icon: #ff9966;

    /* Header */
    --gg-header-bg: #003366;
    --gg-header-text: #ffffff;

    /* Window */
    --gg-window-bg: #ffffff;
    --gg-chat-bg: #f0f4f8;

    /* Messages */
    --gg-user-bubble: #ff9966;
    --gg-user-text: #ffffff;
    --gg-ai-bubble: #ffffff;
    --gg-ai-text: #333333;
    --gg-admin-bubble: #003366;
    --gg-admin-text: #ffffff;

    /* Input */
    --gg-input-bg: #f8fafe;
    --gg-input-text: #333333;
    --gg-send-bg: #ff9966;
    --gg-send-icon: #ffffff;

    /* Derived (computed in JS from above) */
    --gg-header-bg-light: #004080;
    --gg-btn-shadow: rgba(0, 51, 102, 0.25);
    --gg-send-bg-hover: #ff8044;
    --gg-text-light: #888888;

    /* Layout */
    --gg-radius: 20px;
    --gg-radius-bubble: 18px;
    --gg-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Open Sans', Roboto, sans-serif;
}

/* ── Chat Bubble ─────────────────────────────────────────── */
.gg-ai-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--gg-btn-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gg-btn-icon);
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--gg-btn-shadow);
    z-index: 99998;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border: none;
}
.gg-ai-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px var(--gg-btn-shadow);
}
.gg-ai-chat-bubble .fa {
    margin: 0;
    line-height: 1;
}

/* Online indicator dot */
.gg-ai-online-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #4caf50;
    border-radius: 50%;
    border: 2.5px solid var(--gg-window-bg);
    animation: gg-ai-dot-pulse 2s ease-in-out infinite;
}
@keyframes gg-ai-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Pulse animation for bubble */
@keyframes gg-ai-pulse {
    0% { box-shadow: 0 0 0 0 var(--gg-btn-shadow); }
    70% { box-shadow: 0 0 0 16px rgba(0, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}
.gg-ai-chat-bubble.pulse {
    animation: gg-ai-pulse 2.5s infinite;
}

/* ── Chat Window ─────────────────────────────────────────── */
.gg-ai-chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 390px;
    height: 540px;
    background: var(--gg-window-bg);
    border-radius: var(--gg-radius);
    box-shadow: 0 8px 40px var(--gg-btn-shadow), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 99999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--gg-font);
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
.gg-ai-chat-window.gg-ai-chat-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ── Chat Header ─────────────────────────────────────────── */
.gg-ai-chat-header {
    background: linear-gradient(135deg, var(--gg-header-bg) 0%, var(--gg-header-bg-light) 100%);
    color: var(--gg-header-text);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
}
.gg-ai-chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}
.gg-ai-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
#gg-ai-header-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
#gg-ai-header-avatar img,
img.gg-ai-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}
.gg-ai-chat-title {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}
.gg-ai-chat-subtitle {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 1px;
}
.gg-ai-chat-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--gg-header-text);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}
.gg-ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Messages Container ──────────────────────────────────── */
.gg-ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--gg-chat-bg);
    scroll-behavior: smooth;
}
.gg-ai-chat-messages::-webkit-scrollbar {
    width: 5px;
}
.gg-ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.gg-ai-chat-messages::-webkit-scrollbar-thumb {
    background: var(--gg-text-light);
    border-radius: 10px;
    opacity: 0.3;
}

/* ── Message Bubbles ─────────────────────────────────────── */
.gg-ai-msg {
    margin-bottom: 14px;
    max-width: 82%;
    clear: both;
    animation: gg-ai-msg-in 0.25s ease-out;
}
@keyframes gg-ai-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Customer messages (right) */
.gg-ai-msg-customer {
    float: right;
    text-align: right;
}
.gg-ai-msg-customer .gg-ai-msg-text {
    background: var(--gg-user-bubble);
    color: var(--gg-user-text);
    border-radius: var(--gg-radius-bubble) var(--gg-radius-bubble) 6px var(--gg-radius-bubble);
}

/* AI messages (left with avatar) */
.gg-ai-msg-ai,
.gg-ai-msg-admin {
    float: left;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.gg-ai-msg-ai .gg-ai-msg-content,
.gg-ai-msg-admin .gg-ai-msg-content {
    flex: 1;
    min-width: 0;
}
.gg-ai-msg-ai .gg-ai-msg-text {
    background: var(--gg-ai-bubble);
    color: var(--gg-ai-text);
    border-radius: var(--gg-radius-bubble) var(--gg-radius-bubble) var(--gg-radius-bubble) 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.gg-ai-msg-admin .gg-ai-msg-text {
    background: var(--gg-admin-bubble);
    color: var(--gg-admin-text);
    border-radius: var(--gg-radius-bubble) var(--gg-radius-bubble) var(--gg-radius-bubble) 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* System messages */
.gg-ai-msg-system {
    clear: both;
    text-align: center;
    max-width: 100%;
    float: none;
}
.gg-ai-msg-system .gg-ai-msg-text {
    background: transparent;
    color: var(--gg-text-light);
    font-size: 12px;
    font-style: italic;
    padding: 4px 12px;
    box-shadow: none;
}

/* Message elements */
.gg-ai-msg-text {
    padding: 10px 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.gg-ai-msg-text strong {
    font-weight: 600;
}
.gg-ai-msg-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--gg-text-light);
    margin-bottom: 3px;
    padding: 0 4px;
}
.gg-ai-msg-customer .gg-ai-msg-name {
    display: none;
}
.gg-ai-msg-time {
    font-size: 10px;
    color: var(--gg-text-light);
    margin-top: 4px;
    padding: 0 4px;
}
.gg-ai-msg-customer .gg-ai-msg-time {
    text-align: right;
}

/* Avatar in messages */
.gg-ai-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Typing Indicator ────────────────────────────────────── */
.gg-ai-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    float: left;
    clear: both;
}
.gg-ai-typing > div {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--gg-ai-bubble);
    padding: 10px 16px;
    border-radius: var(--gg-radius-bubble);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.gg-ai-typing span {
    width: 8px;
    height: 8px;
    background: var(--gg-header-bg);
    border-radius: 50%;
    opacity: 0.4;
    animation: gg-ai-bounce 1.4s infinite ease-in-out both;
}
.gg-ai-typing span:nth-child(1) { animation-delay: -0.32s; }
.gg-ai-typing span:nth-child(2) { animation-delay: -0.16s; }
@keyframes gg-ai-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* ── Input Area ──────────────────────────────────────────── */
.gg-ai-chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gg-window-bg);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}
.gg-ai-chat-input {
    flex: 1;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--gg-radius);
    padding: 10px 16px;
    font-family: var(--gg-font);
    font-size: 14px;
    resize: none;
    outline: none;
    max-height: 100px;
    line-height: 1.4;
    transition: border-color 0.2s, background 0.2s;
    background: var(--gg-input-bg);
    color: var(--gg-input-text);
}
.gg-ai-chat-input:focus {
    border-color: var(--gg-header-bg);
    background: var(--gg-window-bg);
}
.gg-ai-chat-input:disabled {
    background: rgba(0, 0, 0, 0.05);
    cursor: not-allowed;
    color: var(--gg-text-light);
}
.gg-ai-chat-send-btn {
    width: 40px;
    height: 40px;
    background: var(--gg-send-bg);
    color: var(--gg-send-icon);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}
.gg-ai-chat-send-btn:hover {
    background: var(--gg-send-bg-hover);
    transform: scale(1.05);
}
.gg-ai-chat-send-btn:active {
    transform: scale(0.95);
}
.gg-ai-chat-send-btn:disabled {
    background: rgba(0, 0, 0, 0.15);
    cursor: not-allowed;
    transform: none;
}
.gg-ai-chat-send-btn .fa {
    font-size: 16px;
    margin: 0;
}

/* ── AI Summary Block (Modern Card Style) ───────────────── */
.gg-ai-summary-wrap {
    margin: 20px 0;
    padding: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafe 0%, #eef2f7 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.gg-ai-summary-content {
    padding: 18px 22px;
}
.gg-ai-summary-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gg-header-bg);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gg-ai-summary-title .fa {
    font-size: 15px;
    color: var(--gg-send-bg);
}
.gg-ai-summary-text {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    transition: max-height 0.3s ease;
}
.gg-ai-admin-controls {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.gg-ai-generate-btn {
    font-size: 12px;
    padding: 6px 16px;
    background: var(--gg-header-bg);
    border-color: var(--gg-header-bg);
    color: var(--gg-header-text);
    border-radius: 6px;
    transition: all 0.2s;
}
.gg-ai-generate-btn:hover {
    background: var(--gg-header-bg-light);
    border-color: var(--gg-header-bg-light);
    color: var(--gg-header-text);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Summary collapse/expand */
.gg-ai-summary-collapsed .gg-ai-summary-text {
    max-height: 70px;
    overflow: hidden;
    position: relative;
}
.gg-ai-summary-collapsed .gg-ai-summary-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, #eef2f7);
}
.gg-ai-summary-more {
    color: var(--gg-header-bg);
    cursor: pointer;
    font-size: 13px;
    margin-top: 8px;
    display: inline-block;
    font-weight: 500;
    transition: color 0.2s;
}
.gg-ai-summary-more:hover {
    text-decoration: underline;
    color: var(--gg-send-bg);
}

/* ── Mobile Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .gg-ai-chat-window {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        z-index: 999999;
    }
    .gg-ai-chat-window.gg-ai-chat-open {
        transform: none;
    }
    .gg-ai-chat-header {
        border-radius: 0;
        padding: 16px 18px;
    }
    .gg-ai-chat-bubble {
        bottom: 16px;
        right: 16px;
        width: 54px;
        height: 54px;
        font-size: 22px;
    }
    .gg-ai-online-dot {
        width: 12px;
        height: 12px;
    }
    .gg-ai-msg {
        max-width: 88%;
    }
    .gg-ai-chat-input-area {
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
    .gg-ai-summary-content {
        padding: 12px 14px;
    }
}

/* ── Contacts Button ─────────────────────────────────────── */
.gg-ai-contacts-btn {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    background: var(--gg-window-bg);
    color: var(--gg-header-bg);
    border: 1.5px solid var(--gg-header-bg);
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin: 8px 0;
    transition: all 0.2s;
    clear: both;
}
.gg-ai-contacts-btn:hover {
    background: var(--gg-header-bg);
    color: var(--gg-header-text);
}
.gg-ai-contacts-btn .fa {
    font-size: 14px;
}

/* ── Connect to Manager Button ──────────────────────────── */
.gg-ai-connect-btn {
    text-align: center;
    padding: 10px 16px;
    clear: both;
}
.gg-ai-connect-btn button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gg-header-bg);
    color: var(--gg-header-text);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    font-family: var(--gg-font);
}
.gg-ai-connect-btn button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}
.gg-ai-connect-btn button:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
    box-shadow: none;
}
.gg-ai-connect-btn button .fa {
    font-size: 14px;
}

/* ── Contacts Panel ──────────────────────────────────────── */
.gg-ai-contacts-panel {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px;
    background: var(--gg-ai-bubble);
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    margin: 8px 0;
    clear: both;
    animation: gg-ai-msg-in 0.25s ease-out;
}
.gg-ai-contact-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: transform 0.2s;
}
.gg-ai-contact-icon:hover {
    transform: scale(1.08);
}
.gg-ai-contact-icon .fa {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gg-header-bg);
    color: var(--gg-header-text);
    border-radius: 50%;
    font-size: 18px;
    transition: background 0.2s;
}
.gg-ai-contact-icon:hover .fa {
    background: var(--gg-send-bg);
}
.gg-ai-contact-label {
    font-size: 11px;
    color: var(--gg-text-light);
    font-weight: 500;
}

/* ── Contact Form ────────────────────────────────────────── */
.gg-ai-contact-form {
    background: var(--gg-ai-bubble);
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    padding: 16px;
    margin: 10px 0;
    clear: both;
    animation: gg-ai-msg-in 0.25s ease-out;
}
.gg-ai-contact-form-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gg-ai-text);
    margin-bottom: 10px;
}
.gg-ai-cf-input {
    width: 100%;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 8px;
    outline: none;
    font-family: var(--gg-font);
    transition: border-color 0.2s;
    box-sizing: border-box;
    color: var(--gg-input-text);
    background: var(--gg-input-bg);
}
.gg-ai-cf-input:focus {
    border-color: var(--gg-header-bg);
}
.gg-ai-cf-submit {
    width: 100%;
    background: var(--gg-send-bg);
    color: var(--gg-send-icon);
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--gg-font);
}
.gg-ai-cf-submit:hover {
    background: var(--gg-send-bg-hover);
}
.gg-ai-cf-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* ── Product Carousel ────────────────────────────────────── */
.gg-ai-products-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    clear: both;
    margin-bottom: 12px;
}
.gg-ai-products-carousel::-webkit-scrollbar {
    height: 4px;
}
.gg-ai-products-carousel::-webkit-scrollbar-thumb {
    background: var(--gg-text-light);
    border-radius: 4px;
    opacity: 0.3;
}
.gg-ai-product-card {
    flex: 0 0 140px;
    scroll-snap-align: start;
    background: var(--gg-window-bg);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}
.gg-ai-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}
.gg-ai-product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}
.gg-ai-product-name {
    padding: 6px 8px 2px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--gg-ai-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gg-ai-product-price {
    padding: 2px 8px 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gg-header-bg);
}
.gg-ai-product-stock {
    padding: 0 8px 8px;
    font-size: 11px;
    font-weight: 500;
}
.gg-ai-product-stock.in-stock {
    color: #4caf50;
}
.gg-ai-product-stock.out-of-stock {
    color: #e53935;
}

/* ── AI Disclaimer ──────────────────────────────────────── */
.gg-ai-disclaimer {
    font-size: 11px;
    color: #999;
    text-align: center;
    padding: 4px 12px 8px;
    font-style: italic;
}

/* ── Restart Chat Button ────────────────────────────────── */
.gg-ai-restart-btn {
    text-align: center;
    padding: 12px;
    clear: both;
}
.gg-ai-restart-btn button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gg-header-bg);
    color: var(--gg-header-text);
    border: none;
    border-radius: 20px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--gg-font);
}
.gg-ai-restart-btn button:hover {
    background: var(--gg-header-bg-light);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}
.gg-ai-restart-btn button .fa {
    font-size: 13px;
}

/* ── Contact Form Textarea ──────────────────────────────── */
.gg-ai-cf-textarea {
    width: 100%;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 8px;
    outline: none;
    font-family: var(--gg-font);
    transition: border-color 0.2s;
    box-sizing: border-box;
    color: var(--gg-input-text);
    background: var(--gg-input-bg);
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
}
.gg-ai-cf-textarea:focus {
    border-color: var(--gg-header-bg);
}

/* ── Keyboard Accessibility ──────────────────────────────── */
.gg-ai-chat-bubble:focus-visible {
    outline: 2px solid var(--gg-header-bg);
    outline-offset: 3px;
}
.gg-ai-chat-close:focus-visible {
    outline: 2px solid var(--gg-header-text);
    outline-offset: 2px;
}
.gg-ai-chat-send-btn:focus-visible {
    outline: 2px solid var(--gg-header-bg);
    outline-offset: 2px;
}
.gg-ai-contacts-btn:focus-visible {
    outline: 2px solid var(--gg-header-bg);
    outline-offset: 2px;
}
.gg-ai-contact-icon:focus-visible {
    outline: 2px solid var(--gg-header-bg);
    outline-offset: 2px;
    border-radius: 4px;
}
.gg-ai-cf-submit:focus-visible {
    outline: 2px solid var(--gg-header-bg);
    outline-offset: 2px;
}
.gg-ai-restart-btn button:focus-visible {
    outline: 2px solid var(--gg-header-bg);
    outline-offset: 2px;
}
.gg-ai-product-card:focus-visible {
    outline: 2px solid var(--gg-header-bg);
    outline-offset: 2px;
}
.gg-ai-connect-btn button:focus-visible {
    outline: 2px solid var(--gg-header-bg);
    outline-offset: 2px;
}

/* ── FAQ Accordion ───────────────────────────────────────── */
.gg-ai-faq-section {
    margin: 20px 0;
    padding: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafe 0%, #eef2f7 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 2;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.gg-ai-faq-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gg-header-bg, #003366);
    margin: 0;
    padding: 18px 22px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gg-ai-faq-title .fa {
    font-size: 16px;
    color: var(--gg-send-bg, #ff9966);
}
.gg-ai-faq-list {
    list-style: none;
    margin: 0;
    padding: 0 22px 18px;
}
.gg-ai-faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.gg-ai-faq-item:last-child {
    border-bottom: none;
}
.gg-ai-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    transition: color 0.2s;
    -webkit-user-select: none;
    user-select: none;
}
.gg-ai-faq-question:hover {
    color: var(--gg-header-bg, #003366);
}
.gg-ai-faq-question::after {
    content: '\f107';
    font-family: 'FontAwesome';
    font-size: 16px;
    color: var(--gg-text-light, #888);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.gg-ai-faq-item.active .gg-ai-faq-question::after {
    transform: rotate(180deg);
}
.gg-ai-faq-answer {
    overflow: hidden;
    height: 0;
    transition: height 0.3s ease, padding 0.3s ease;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    padding: 0;
}
.gg-ai-faq-item.active .gg-ai-faq-answer {
    padding: 0 0 12px;
}

@media (max-width: 768px) {
    .gg-ai-faq-section {
        margin: 12px 0;
        border-radius: 8px;
    }
    .gg-ai-faq-title {
        font-size: 15px;
        padding: 14px 16px 10px;
    }
    .gg-ai-faq-list {
        padding: 0 16px 14px;
    }
    .gg-ai-faq-question {
        font-size: 13px;
        padding: 10px 0;
    }
    .gg-ai-faq-answer {
        font-size: 13px;
    }
}

/* ── Clear floats in messages ────────────────────────────── */
.gg-ai-chat-messages::after {
    content: '';
    display: table;
    clear: both;
}
