        /* =====================================================
           PAGE SHELL
           The chat itself now fills the browser width (header, banner,
           quick-actions and input bars all go edge-to-edge) instead of
           sitting in a narrow centered column. Only each message row
           (.lc-row) is capped to a readable width and centered, so
           bubbles don't stretch absurdly wide on large screens while the
           thread's background still fills the full page.
        ===================================================== */

        html, body {
            height: 100%;
        }

        body {
            background: #fff;
        }

        .livechat-page {
            display: flex;
            flex-direction: column;
            height: 100vh;
            width: 100%;
        }


        /* =====================================================
           HEADER
        ===================================================== */

        .livechat-header {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 16px 20px;
            border-bottom: 1px solid #f0f0f0;
            flex-shrink: 0;
        }

        .livechat-back {
            font-size: 18px;
            color: #d0001b;
            flex-shrink: 0;
        }

        .livechat-avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: #fdeaea;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            overflow: hidden;
        }

        .livechat-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: top center;
        }

        .livechat-title {
            font-size: 16px;
            font-weight: 800;
            color: #111;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .livechat-online-dot {
            font-size: 10px;
            color: #22c55e;
            font-weight: 600;
        }

        .livechat-subtitle {
            font-size: 12px;
            color: #888;
            margin-top: 1px;
        }

        /* =====================================================
           BANNER
        ===================================================== */

        .livechat-banner {
            background: #fdf1de;
            color: #7a5218;
            padding: 12px 20px;
            font-size: 13px;
            font-weight: 700;
            flex-shrink: 0;
        }

        /* =====================================================
           MESSAGE THREAD
        ===================================================== */

        .livechat-thread {
            flex: 1;
            overflow-y: auto;
            padding: 18px 20px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            background: #fafafa;
        }

        .lc-row {
            display: flex;
            width: 100%;
            max-width: 780px;
            margin: 0 auto;
        }

        .lc-row.lc-bot {
            justify-content: flex-start;
            align-items: flex-start;
            gap: 10px;
        }

        .lc-row.lc-user {
            justify-content: flex-end;
        }

        /* GoMate's avatar — only rendered on the first message of a
           consecutive run of bot messages (see createBotRow() in the
           script); the empty div still reserves the same width so later
           messages in the run line up under the first one's bubble.
           Aligned to the top of the bubble (not centered/bottom) and
           given a border + shadow so it actually reads as an avatar
           instead of blending into the grey thread background. */
        .lc-bot-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            overflow: hidden;
            flex-shrink: 0;
            background: #fdeaea;
            border: 2px solid #fff;
            box-shadow: 0 2px 6px rgba(0,0,0,.12);
            margin-top: 2px;
        }

        /* Continuation messages still reserve the same width (so their
           bubble lines up under the first one's), but show nothing —
           no circle, no color — instead of repeating the avatar. */
        .lc-bot-avatar-spacer {
            background: transparent;
            border-color: transparent;
            box-shadow: none;
        }

        .lc-bot-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: top center;
        }

        .lc-bot-content {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .lc-bubble {
            max-width: 84%;
            padding: 12px 16px;
            border-radius: 14px;
            font-size: 13.5px;
            line-height: 1.55;
        }

        .lc-bot .lc-bubble {
            background: #fff;
            border: 1px solid #eee;
            color: #222;
            border-top-left-radius: 4px;
        }

        .lc-user .lc-bubble {
            background: #d0001b;
            color: #fff;
            border-top-right-radius: 4px;
        }

        /* FAQ suggestion card */
        .lc-card {
            max-width: 92%;
            background: #fff;
            border: 1px solid #eee;
            border-radius: 14px;
            border-top-left-radius: 4px;
            overflow: hidden;
        }

        .lc-card-head {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 16px;
            font-size: 13px;
            font-weight: 800;
            color: #111;
            border-bottom: 1px solid #f2f2f2;
        }

        .lc-card-head i {
            color: #fff;
            background: #d0001b;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
        }

        .lc-faq-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 13px 16px;
            border-bottom: 1px solid #f5f5f5;
            font-size: 13px;
            color: #222;
            cursor: pointer;
            background: none;
            border-left: none;
            border-right: none;
            border-top: none;
            width: 100%;
            text-align: left;
            font-family: inherit;
            transition: .15s;
        }

        .lc-faq-item:last-of-type {
            border-bottom: none;
        }

        .lc-faq-item:hover {
            background: #fef7f7;
            color: #d0001b;
        }

        .lc-faq-item i {
            color: #bbb;
            font-size: 12px;
            flex-shrink: 0;
        }

        .lc-change-questions {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            padding: 12px 16px;
            font-size: 12.5px;
            color: #777;
            cursor: pointer;
            background: none;
            border: none;
            width: 100%;
            font-family: inherit;
        }

        .lc-change-questions:hover {
            color: #d0001b;
        }

        /* Inline order picker bubbles */
        .lc-order-pick {
            display: block;
            width: 100%;
            text-align: left;
            background: #fff;
            border: 1px solid #eee;
            border-radius: 10px;
            padding: 10px 14px;
            margin-bottom: 8px;
            cursor: pointer;
            font-family: inherit;
            font-size: 12.5px;
            transition: .15s;
        }

        .lc-order-pick:last-child {
            margin-bottom: 0;
        }

        .lc-order-pick:hover {
            border-color: #d0001b;
            background: #fef7f7;
        }

        .lc-order-pick strong {
            color: #111;
        }

        .lc-order-pick .lc-order-status {
            float: right;
            color: #d9a441;
            font-weight: 700;
        }

        /* In-bubble action buttons (Track/Cancel/Refund/Agent shortcuts) */
        .lc-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
        }

        .lc-action-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 13px;
            border-radius: 20px;
            border: 1px solid #ddd;
            background: #fff;
            color: #444;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            transition: .15s;
            text-decoration: none;
        }

        .lc-action-btn:hover {
            border-color: #d0001b;
            color: #d0001b;
        }

        .lc-typing {
            display: flex;
            gap: 4px;
            padding: 14px 16px;
        }

        .lc-typing span {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #ccc;
            animation: lcTyping 1s infinite ease-in-out;
        }

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

        @keyframes lcTyping {
            0%, 60%, 100% { transform: translateY(0); opacity: .4; }
            30% { transform: translateY(-4px); opacity: 1; }
        }

        /* =====================================================
           QUICK ACTIONS
        ===================================================== */

        .livechat-quick-actions {
            display: flex;
            gap: 8px;
            padding: 12px 20px;
            overflow-x: auto;
            border-top: 1px solid #f0f0f0;
            flex-shrink: 0;
        }

        .lc-quick-btn {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 9px 15px;
            border-radius: 20px;
            border: 1px solid #ddd;
            background: #fff;
            color: #444;
            font-size: 12.5px;
            font-weight: 700;
            cursor: pointer;
            font-family: inherit;
            white-space: nowrap;
            transition: .15s;
        }

        .lc-quick-btn:hover {
            background: #f7f7f7;
        }

        .lc-quick-btn.lc-quick-primary {
            border-color: #d0001b;
            color: #d0001b;
        }

        .lc-quick-btn.lc-quick-primary:hover {
            background: #fef7f7;
        }

        /* =====================================================
           INPUT ROW
        ===================================================== */

        .livechat-input-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 20px;
            border-top: 1px solid #f0f0f0;
            flex-shrink: 0;
        }

        .livechat-input-row input {
            flex: 1;
            border: none;
            outline: none;
            font-size: 13.5px;
            font-family: inherit;
            color: #222;
        }

        .livechat-input-row input::placeholder {
            color: #aaa;
        }

        .livechat-send-btn {
            background: none;
            border: none;
            color: #d0001b;
            font-size: 19px;
            cursor: pointer;
            flex-shrink: 0;
        }

        .livechat-send-btn:disabled {
            color: #ddd;
            cursor: default;
        }

        /* =====================================================
           RESPONSIVE
        ===================================================== */

        @media (max-width: 680px) {
            .lc-bubble,
            .lc-card {
                max-width: 92%;
            }
        }
