
        /* ============================================================
           ALL CSS SCOPED UNDER .truepouch-products
           ============================================================ */

        /* ---------- Reset / box-sizing (scoped) ---------- */
        .truepouch-products,
        .truepouch-products *,
        .truepouch-products *::before,
        .truepouch-products *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        /* ---------- Root variables ---------- */
        .truepouch-products {
            --tp-primary: #0a1e3c;
            --tp-primary-light: #132e52;
            --tp-accent: #e8b830;
            --tp-accent-hover: #d4a520;
            --tp-bg: #ffffff;
            --tp-bg-alt: #f5f7fa;
            --tp-border: #e2e8f0;
            --tp-text: #1a202c;
            --tp-text-light: #64748b;
            --tp-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
            --tp-radius: 16px;
            --tp-radius-sm: 10px;
            --tp-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            --tp-z: 999999;
            --tp-safe-bottom: env(safe-area-inset-bottom, 0px);
            --tp-safe-right: env(safe-area-inset-right, 0px);
        }

        /* ============================================================
           FLOATING BUTTON
           ============================================================ */
        .truepouch-products-toggle {
            position: fixed;
            right: 20px;
            bottom: calc(25px + var(--tp-safe-bottom));
            z-index: var(--tp-z);
            width: 62px;
            height: 62px;
            border-radius: 50%;
            border: none;
            background: var(--tp-primary);
            color: #fff;
            font-size: 26px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 6px 24px rgba(10, 30, 60, 0.35), 0 2px 6px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
            outline: none;
            -webkit-tap-highlight-color: transparent;
            font-family: var(--tp-font);
            line-height: 1;
        }
        .truepouch-products-toggle:hover {
            background: var(--tp-primary-light);
            transform: scale(1.06);
            box-shadow: 0 8px 30px rgba(10, 30, 60, 0.45), 0 3px 10px rgba(0, 0, 0, 0.12);
        }
        .truepouch-products-toggle:focus-visible {
            outline: 3px solid var(--tp-accent);
            outline-offset: 3px;
        }
        .truepouch-products-toggle .tp-icon-chat,
        .truepouch-products-toggle .tp-icon-close {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            transition: opacity 0.2s ease, transform 0.2s ease;
        }
        .truepouch-products-toggle .tp-icon-close {
            position: absolute;
            opacity: 0;
            transform: rotate(-90deg);
        }
        .truepouch-products-toggle[aria-expanded="true"] .tp-icon-chat {
            opacity: 0;
            transform: rotate(90deg);
        }
        .truepouch-products-toggle[aria-expanded="true"] .tp-icon-close {
            opacity: 1;
            transform: rotate(0deg);
        }

        /* Notification dot */
        .truepouch-products-toggle .tp-notification-dot {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 14px;
            height: 14px;
            background: #ef4444;
            border-radius: 50%;
            border: 2px solid #fff;
            display: block;
            animation: tp-pulse 2s infinite;
        }
        .truepouch-products-toggle .tp-notification-dot.hidden {
            display: none;
        }

        @keyframes tp-pulse {
            0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
            70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
            100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }

        /* Tooltip */
        .truepouch-products-toggle .tp-tooltip {
            position: absolute;
            right: calc(100% + 12px);
            top: 50%;
            transform: translateY(-50%);
            background: var(--tp-primary);
            color: #fff;
            padding: 6px 14px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            white-space: nowrap;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.2s ease;
            font-family: var(--tp-font);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        .truepouch-products-toggle .tp-tooltip::after {
            content: '';
            position: absolute;
            left: 100%;
            top: 50%;
            transform: translateY(-50%);
            border: 6px solid transparent;
            border-left-color: var(--tp-primary);
        }
        .truepouch-products-toggle:hover .tp-tooltip {
            opacity: 1;
        }

        /* ============================================================
           CHAT WINDOW
           ============================================================ */
        .truepouch-products-window {
            position: fixed;
            right: 20px;
            bottom: calc(100px + var(--tp-safe-bottom));
            z-index: var(--tp-z);
            width: 400px;
            max-width: calc(100vw - 24px);
            max-height: calc(100dvh - 100px);
            max-height: calc(100vh - 100px);
            background: var(--tp-bg);
            border-radius: var(--tp-radius);
            box-shadow: var(--tp-shadow);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            font-family: var(--tp-font);
            font-size: 15px;
            color: var(--tp-text);
            line-height: 1.5;
            opacity: 0;
            transform: translateY(16px) scale(0.96);
            pointer-events: none;
            transition: opacity 0.25s ease, transform 0.25s ease;
            border: 1px solid var(--tp-border);
            -webkit-overflow-scrolling: touch;
        }
        .truepouch-products-window.open {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: auto;
        }

        /* ---------- Header ---------- */
        .truepouch-products-header {
            background: var(--tp-primary);
            color: #fff;
            padding: 16px 18px;
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
            position: relative;
        }
        .truepouch-products-header .tp-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255,255,255,0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
            color: var(--tp-accent);
        }
        .truepouch-products-header .tp-header-text {
            flex: 1;
            min-width: 0;
        }
        .truepouch-products-header .tp-header-text h3 {
            font-size: 16px;
            font-weight: 700;
            margin: 0;
            line-height: 1.3;
            letter-spacing: 0.01em;
        }
        .truepouch-products-header .tp-header-text p {
            font-size: 12px;
            opacity: 0.8;
            margin: 0;
            line-height: 1.3;
        }
        .truepouch-products-header .tp-status {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 11px;
            opacity: 0.85;
            margin-top: 2px;
        }
        .truepouch-products-header .tp-status-dot {
            width: 7px;
            height: 7px;
            background: #22c55e;
            border-radius: 50%;
            display: inline-block;
            animation: tp-blink 2s infinite;
        }
        @keyframes tp-blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        .truepouch-products-header .tp-header-close {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: none;
            background: rgba(255,255,255,0.1);
            color: #fff;
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s ease;
            flex-shrink: 0;
            outline: none;
        }
        .truepouch-products-header .tp-header-close:hover {
            background: rgba(255,255,255,0.25);
        }
        .truepouch-products-header .tp-header-close:focus-visible {
            outline: 2px solid var(--tp-accent);
            outline-offset: 2px;
        }

        /* ---------- Body (messages) ---------- */
        .truepouch-products-body {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 16px 16px 8px;
            background: var(--tp-bg-alt);
            display: flex;
            flex-direction: column;
            gap: 10px;
            scroll-behavior: smooth;
            min-height: 0;
            -webkit-overflow-scrolling: touch;
        }
        .truepouch-products-body::-webkit-scrollbar {
            width: 5px;
        }
        .truepouch-products-body::-webkit-scrollbar-track {
            background: transparent;
        }
        .truepouch-products-body::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 10px;
        }

        /* ---------- Messages ---------- */
        .truepouch-products-message {
            max-width: 85%;
            padding: 10px 14px;
            border-radius: 14px;
            font-size: 14px;
            line-height: 1.5;
            word-wrap: break-word;
            overflow-wrap: break-word;
            animation: tp-fadeIn 0.25s ease;
        }
        @keyframes tp-fadeIn {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .truepouch-products-message.bot {
            background: #fff;
            color: var(--tp-text);
            align-self: flex-start;
            border-bottom-left-radius: 4px;
            border: 1px solid var(--tp-border);
            box-shadow: 0 1px 2px rgba(0,0,0,0.04);
        }
        .truepouch-products-message.user {
            background: var(--tp-primary);
            color: #fff;
            align-self: flex-end;
            border-bottom-right-radius: 4px;
        }
        .truepouch-products-message.typing {
            background: #fff;
            border: 1px solid var(--tp-border);
            align-self: flex-start;
            border-bottom-left-radius: 4px;
            padding: 12px 16px;
        }
        .truepouch-products-message.typing .tp-typing-dots {
            display: flex;
            gap: 5px;
            align-items: center;
        }
        .truepouch-products-message.typing .tp-typing-dots span {
            width: 7px;
            height: 7px;
            background: #94a3b8;
            border-radius: 50%;
            animation: tp-bounce 1.4s infinite ease-in-out both;
        }
        .truepouch-products-message.typing .tp-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
        .truepouch-products-message.typing .tp-typing-dots span:nth-child(2) { animation-delay: -0.16s; }
        .truepouch-products-message.typing .tp-typing-dots span:nth-child(3) { animation-delay: 0s; }
        @keyframes tp-bounce {
            0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
            40% { transform: scale(1); opacity: 1; }
        }

        /* ---------- Quick replies ---------- */
        .truepouch-products-quick {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 4px 0 8px;
            animation: tp-fadeIn 0.3s ease;
        }
        .truepouch-products-quick button {
            background: #fff;
            color: var(--tp-primary);
            border: 1.5px solid var(--tp-primary);
            border-radius: 20px;
            padding: 7px 14px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
            font-family: var(--tp-font);
            line-height: 1.3;
            white-space: nowrap;
            -webkit-tap-highlight-color: transparent;
        }
        .truepouch-products-quick button:hover {
            background: var(--tp-primary);
            color: #fff;
        }
        .truepouch-products-quick button:focus-visible {
            outline: 2px solid var(--tp-accent);
            outline-offset: 2px;
        }

        /* ---------- Inline action buttons (product links, contact) ---------- */
        .truepouch-products-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 2px 0 8px;
            animation: tp-fadeIn 0.3s ease;
        }
        .truepouch-products-actions button,
        .truepouch-products-actions a {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--tp-primary);
            color: #fff;
            border: none;
            border-radius: 8px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s ease, transform 0.1s ease;
            font-family: var(--tp-font);
            text-decoration: none;
            line-height: 1.3;
            -webkit-tap-highlight-color: transparent;
        }
        .truepouch-products-actions button:hover,
        .truepouch-products-actions a:hover {
            background: var(--tp-primary-light);
        }
        .truepouch-products-actions button:active,
        .truepouch-products-actions a:active {
            transform: scale(0.97);
        }
        .truepouch-products-actions button:focus-visible,
        .truepouch-products-actions a:focus-visible {
            outline: 2px solid var(--tp-accent);
            outline-offset: 2px;
        }
        .truepouch-products-actions .tp-btn-outline {
            background: transparent;
            color: var(--tp-primary);
            border: 1.5px solid var(--tp-primary);
        }
        .truepouch-products-actions .tp-btn-outline:hover {
            background: var(--tp-primary);
            color: #fff;
        }

        /* ---------- Input area ---------- */
        .truepouch-products-input-area {
            flex-shrink: 0;
            padding: 10px 14px 12px;
            background: #fff;
            border-top: 1px solid var(--tp-border);
            display: flex;
            gap: 10px;
            align-items: flex-end;
        }
        .truepouch-products-input-area textarea {
            flex: 1;
            resize: none;
            border: 1.5px solid var(--tp-border);
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 14px;
            font-family: var(--tp-font);
            line-height: 1.4;
            max-height: 90px;
            min-height: 42px;
            outline: none;
            transition: border-color 0.15s ease;
            color: var(--tp-text);
            background: var(--tp-bg-alt);
            overflow-y: auto;
        }
        .truepouch-products-input-area textarea::placeholder {
            color: #94a3b8;
        }
        .truepouch-products-input-area textarea:focus {
            border-color: var(--tp-primary);
            background: #fff;
        }
        .truepouch-products-send {
            width: 42px;
            height: 42px;
            border-radius: 10px;
            border: none;
            background: var(--tp-primary);
            color: #fff;
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: background 0.15s ease, opacity 0.15s ease;
            outline: none;
            -webkit-tap-highlight-color: transparent;
        }
        .truepouch-products-send:hover:not(:disabled) {
            background: var(--tp-primary-light);
        }
        .truepouch-products-send:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .truepouch-products-send:focus-visible {
            outline: 2px solid var(--tp-accent);
            outline-offset: 2px;
        }

        /* ============================================================
           ENQUIRY FORM (inline inside chat body)
           ============================================================ */
        .truepouch-products-form {
            background: #fff;
            border: 1px solid var(--tp-border);
            border-radius: 12px;
            padding: 16px;
            margin: 4px 0 8px;
            animation: tp-fadeIn 0.3s ease;
        }
        .truepouch-products-form h4 {
            font-size: 15px;
            font-weight: 700;
            color: var(--tp-primary);
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .truepouch-products-form .tp-field {
            margin-bottom: 12px;
        }
        .truepouch-products-form .tp-field label {
            display: block;
            font-size: 12.5px;
            font-weight: 600;
            color: var(--tp-text);
            margin-bottom: 4px;
        }
        .truepouch-products-form .tp-field label .tp-required {
            color: #ef4444;
        }
        .truepouch-products-form .tp-field input,
        .truepouch-products-form .tp-field select,
        .truepouch-products-form .tp-field textarea {
            width: 100%;
            padding: 9px 11px;
            border: 1.5px solid var(--tp-border);
            border-radius: 8px;
            font-size: 13.5px;
            font-family: var(--tp-font);
            outline: none;
            transition: border-color 0.15s ease;
            color: var(--tp-text);
            background: var(--tp-bg-alt);
            line-height: 1.4;
            box-sizing: border-box;
        }
        .truepouch-products-form .tp-field input:focus,
        .truepouch-products-form .tp-field select:focus,
        .truepouch-products-form .tp-field textarea:focus {
            border-color: var(--tp-primary);
            background: #fff;
        }
        .truepouch-products-form .tp-field textarea {
            resize: vertical;
            min-height: 60px;
        }
        .truepouch-products-form .tp-field select {
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            padding-right: 32px;
            cursor: pointer;
        }
        .truepouch-products-form .tp-field .tp-error {
            color: #ef4444;
            font-size: 11.5px;
            margin-top: 3px;
            display: none;
            line-height: 1.3;
        }
        .truepouch-products-form .tp-field.has-error input,
        .truepouch-products-form .tp-field.has-error select,
        .truepouch-products-form .tp-field.has-error textarea {
            border-color: #ef4444;
        }
        .truepouch-products-form .tp-field.has-error .tp-error {
            display: block;
        }
        .truepouch-products-form .tp-turnstile-wrap {
            margin: 10px 0 14px;
            display: flex;
            justify-content: center;
            min-height: 65px;
        }
        .truepouch-products-form .tp-form-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        .truepouch-products-form .tp-form-actions button {
            flex: 1;
            min-width: 120px;
            padding: 11px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            font-family: var(--tp-font);
            border: none;
            transition: background 0.15s ease, opacity 0.15s ease;
            line-height: 1.3;
        }
        .truepouch-products-form .tp-form-actions .tp-submit {
            background: var(--tp-primary);
            color: #fff;
        }
        .truepouch-products-form .tp-form-actions .tp-submit:hover:not(:disabled) {
            background: var(--tp-primary-light);
        }
        .truepouch-products-form .tp-form-actions .tp-submit:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }
        .truepouch-products-form .tp-form-actions .tp-cancel {
            background: transparent;
            color: var(--tp-primary);
            border: 1.5px solid var(--tp-primary);
        }
        .truepouch-products-form .tp-form-actions .tp-cancel:hover {
            background: var(--tp-bg-alt);
        }
        .truepouch-products-form .tp-form-actions button:focus-visible {
            outline: 2px solid var(--tp-accent);
            outline-offset: 2px;
        }
        .truepouch-products-form .tp-form-status {
            font-size: 13px;
            margin-top: 10px;
            padding: 8px 10px;
            border-radius: 6px;
            display: none;
            line-height: 1.4;
        }
        .truepouch-products-form .tp-form-status.success {
            display: block;
            background: #f0fdf4;
            color: #166534;
            border: 1px solid #bbf7d0;
        }
        .truepouch-products-form .tp-form-status.error {
            display: block;
            background: #fef2f2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }

        /* ============================================================
           SUCCESS / ERROR VIEWS
           ============================================================ */
        .truepouch-products-result {
            background: #fff;
            border: 1px solid var(--tp-border);
            border-radius: 12px;
            padding: 18px;
            margin: 4px 0 8px;
            text-align: center;
            animation: tp-fadeIn 0.3s ease;
        }
        .truepouch-products-result .tp-result-icon {
            font-size: 36px;
            margin-bottom: 10px;
            display: block;
        }
        .truepouch-products-result .tp-result-icon.success {
            color: #22c55e;
        }
        .truepouch-products-result .tp-result-icon.error {
            color: #ef4444;
        }
        .truepouch-products-result h4 {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 6px;
            color: var(--tp-text);
        }
        .truepouch-products-result p {
            font-size: 13.5px;
            color: var(--tp-text-light);
            margin-bottom: 6px;
            line-height: 1.5;
        }
        .truepouch-products-result .tp-result-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin-top: 14px;
        }
        .truepouch-products-result .tp-result-actions button,
        .truepouch-products-result .tp-result-actions a {
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            font-family: var(--tp-font);
            border: none;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: background 0.15s ease;
        }
        .truepouch-products-result .tp-result-actions .tp-btn-primary {
            background: var(--tp-primary);
            color: #fff;
        }
        .truepouch-products-result .tp-result-actions .tp-btn-primary:hover {
            background: var(--tp-primary-light);
        }
        .truepouch-products-result .tp-result-actions .tp-btn-outline {
            background: transparent;
            color: var(--tp-primary);
            border: 1.5px solid var(--tp-primary);
        }
        .truepouch-products-result .tp-result-actions .tp-btn-outline:hover {
            background: var(--tp-bg-alt);
        }

        /* ============================================================
           RESPONSIVE
           ============================================================ */
        @media (max-width: 480px) {
            .truepouch-products-toggle {
                right: 12px;
                bottom: calc(15px + var(--tp-safe-bottom));
                width: 56px;
                height: 56px;
                font-size: 22px;
            }
            .truepouch-products-window {
                right: 12px;
                bottom: calc(80px + var(--tp-safe-bottom));
                width: calc(100vw - 24px);
                max-width: calc(100vw - 24px);
                max-height: calc(100dvh - 100px);
                max-height: calc(100vh - 100px);
                border-radius: 14px;
            }
            .truepouch-products-header {
                padding: 13px 14px;
            }
            .truepouch-products-header .tp-avatar {
                width: 34px;
                height: 34px;
                font-size: 17px;
            }
            .truepouch-products-header .tp-header-text h3 {
                font-size: 15px;
            }
            .truepouch-products-header .tp-header-text p {
                font-size: 11px;
            }
            .truepouch-products-body {
                padding: 12px 12px 6px;
            }
            .truepouch-products-message {
                max-width: 90%;
                font-size: 13.5px;
                padding: 9px 12px;
            }
            .truepouch-products-quick button {
                font-size: 12px;
                padding: 6px 11px;
            }
            .truepouch-products-actions button,
            .truepouch-products-actions a {
                font-size: 12px;
                padding: 7px 13px;
            }
            .truepouch-products-form {
                padding: 13px;
            }
            .truepouch-products-form .tp-form-actions button {
                font-size: 13px;
                padding: 10px 12px;
                min-width: 100px;
            }
            .truepouch-products-input-area {
                padding: 8px 10px 10px;
            }
            .truepouch-products-input-area textarea {
                font-size: 13.5px;
                padding: 9px 10px;
                min-height: 38px;
            }
            .truepouch-products-send {
                width: 38px;
                height: 38px;
                font-size: 14px;
            }
            .truepouch-products-toggle .tp-tooltip {
                display: none;
            }
        }

        @media (max-width: 360px) {
            .truepouch-products-window {
                right: 8px;
                bottom: calc(75px + var(--tp-safe-bottom));
                width: calc(100vw - 16px);
                max-width: calc(100vw - 16px);
                border-radius: 12px;
            }
            .truepouch-products-message {
                max-width: 94%;
                font-size: 13px;
            }
        }

        /* ============================================================
           REDUCED MOTION
           ============================================================ */
        @media (prefers-reduced-motion: reduce) {
            .truepouch-products-window,
            .truepouch-products-message,
            .truepouch-products-quick,
            .truepouch-products-actions,
            .truepouch-products-form,
            .truepouch-products-result {
                animation: none !important;
                transition: none !important;
            }
            .truepouch-products-toggle {
                transition: none !important;
            }
            .truepouch-products-toggle .tp-notification-dot {
                animation: none !important;
            }
            .truepouch-products-header .tp-status-dot {
                animation: none !important;
            }
            .truepouch-products-message.typing .tp-typing-dots span {
                animation: none !important;
            }
        }

        /* ============================================================
           SR-ONLY
           ============================================================ */
        .truepouch-products .tp-sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            border: 0;
        }





























        /* ============================================================
   SILICON GRAND CHATBOT
   CLEAN RESPONSIVE STICKY RIGHT-SIDE DESIGN
   ============================================================ */

#truepouchProductsRoot {
    position: static !important;
}


/* ============================================================
   RIGHT SIDE CHAT TAB
   ============================================================ */

#truepouchProductsToggle {
    position: fixed !important;

    /* RIGHT WALL */
    right: 0 !important;
    left: auto !important;

    /* VERTICAL CENTER */
    top: 50% !important;
    bottom: auto !important;

    transform: translateY(-50%) !important;

    width: 45px !important;
  height: 130px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-left: 3px solid #004784 !important;

    border-radius: 14px 0 0 14px !important;

    background: linear-gradient(
        180deg,
        #20242b 0%,
        #15171b 100%
    ) !important;

    color: #ffffff !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    overflow: hidden !important;

    box-shadow:
        -4px 0 18px rgba(0,0,0,.20) !important;

    z-index: 999999 !important;

    cursor: pointer !important;

    outline: none !important;

    -webkit-tap-highlight-color: transparent !important;

    transition:
        width .25s ease,
        box-shadow .25s ease,
        background .25s ease !important;
}


/* ============================================================
   HOVER
   ============================================================ */

#truepouchProductsToggle:hover {
    width: 60px !important;

    transform: translateY(-50%) !important;

    background: linear-gradient(
        180deg,
        #252a31 0%,
        #17191d 100%
    ) !important;

    box-shadow:
        -6px 0 24px rgba(0,0,0,.28) !important;
}


/* ============================================================
   CHAT ICON
   ============================================================ */

#truepouchProductsToggle .tp-icon-chat {
    position: absolute !important;
  top: 14px !important;
  left: 53% !important;
  width: 27px !important;
  height: 27px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #004784 !important;
  color: #fff !important;

    border-radius: 9px !important;

    font-size: 16px !important;

    z-index: 5 !important;

    transition: .2s ease !important;
}

#truepouchProductsToggle .tp-icon-chat i {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
}


/* ============================================================
   CLOSE ICON
   ============================================================ */

#truepouchProductsToggle .tp-icon-close {
    position: absolute !important;

    top: 14px !important;
    left: 50% !important;

    width: 32px !important;
    height: 32px !important;

    margin: 0 !important;
    padding: 0 !important;

    transform:
        translateX(-50%)
        scale(.7) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #e5b800 !important;

    color: #17191d !important;

    border-radius: 9px !important;

    opacity: 0 !important;

    z-index: 6 !important;

    transition: .2s ease !important;
}


/* OPEN STATE */

#truepouchProductsToggle[aria-expanded="true"] .tp-icon-chat {
    opacity: 0 !important;

    transform:
        translateX(-50%)
        scale(.7) !important;
}

#truepouchProductsToggle[aria-expanded="true"] .tp-icon-close {
    opacity: 1 !important;

    transform:
        translateX(-50%)
        scale(1) !important;
}


/* ============================================================
   CHAT TEXT
   ============================================================ */

#truepouchProductsToggle::before {
    content: "CHAT" !important;

    position: absolute !important;

    top: 61px !important;
    left: 50% !important;

    transform:
        translateX(-50%)
        rotate(90deg) !important;

    transform-origin: center !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #ffffff !important;

    font-family:
        Arial,
        Helvetica,
        sans-serif !important;

    font-size: 11px !important;

    font-weight: 700 !important;

    letter-spacing: 2px !important;

    line-height: 1 !important;

    white-space: nowrap !important;

    pointer-events: none !important;
}


/* ============================================================
   AI BADGE
   ============================================================ */

#truepouchProductsToggle::after {
    content: "AI" !important;

    position: absolute !important;

    left: 50% !important;
    bottom: 12px !important;

    transform: translateX(-50%) !important;

    width: 23px !important;
    height: 17px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #e5b800 !important;

    color: #17191d !important;

    border-radius: 5px !important;

    font-family: Arial, Helvetica, sans-serif !important;

    font-size: 8px !important;

    font-weight: 800 !important;

    line-height: 1 !important;

    letter-spacing: .4px !important;

    pointer-events: none !important;
}


/* REMOVE OLD ELEMENTS */

#truepouchProductsToggle .tp-notification-dot,
#truepouchProductsToggle .tp-tooltip {
    display: none !important;
}


/* ============================================================
   CHAT WINDOW
   DESKTOP = ALIGNED TO THE TAB
   ============================================================ */

#truepouchProductsWindow {
    position: fixed !important;

    right: 70px !important;
    left: auto !important;

    top: 50% !important;
    bottom: auto !important;

    width: 400px !important;

    max-width: calc(100vw - 90px) !important;

    max-height: calc(100dvh - 40px) !important;

    margin: 0 !important;

    z-index: 999999 !important;
}


/* IMPORTANT:
   Your JavaScript adds .open.
   Keep the window vertically centered when opened.
*/

#truepouchProductsWindow.open {
    transform:
        translateY(-50%)
        scale(1) !important;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 768px) {

    #truepouchProductsToggle {
        width: 50px !important;
        height: 132px !important;

        border-left-width: 3px !important;

        border-radius: 13px 0 0 13px !important;
    }

    #truepouchProductsToggle:hover {
        width: 50px !important;
    }

    #truepouchProductsToggle .tp-icon-chat,
    #truepouchProductsToggle .tp-icon-close {
        width: 29px !important;
        height: 29px !important;

        top: 13px !important;

        border-radius: 8px !important;
    }

    #truepouchProductsToggle::before {
        top: 56px !important;

        font-size: 10px !important;
        letter-spacing: 1.8px !important;
    }

    #truepouchProductsToggle::after {
        bottom: 11px !important;

        width: 22px !important;
        height: 16px !important;
    }

    #truepouchProductsWindow {
        right: 62px !important;

        width: min(
            390px,
            calc(100vw - 76px)
        ) !important;

        max-width: calc(100vw - 76px) !important;

        max-height: calc(100dvh - 30px) !important;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 480px) {

    #truepouchProductsToggle {
        width: 46px !important;
        height: 124px !important;

        border-left-width: 2px !important;

        border-radius: 11px 0 0 11px !important;
    }

    #truepouchProductsToggle:hover {
        width: 46px !important;
    }

    #truepouchProductsToggle .tp-icon-chat,
    #truepouchProductsToggle .tp-icon-close {
        width: 27px !important;
        height: 27px !important;

        top: 11px !important;

        border-radius: 7px !important;
    }

    #truepouchProductsToggle .tp-icon-chat i {
        font-size: 14px !important;
    }

    #truepouchProductsToggle::before {
        top: 52px !important;

        font-size: 9px !important;

        letter-spacing: 1.5px !important;
    }

    #truepouchProductsToggle::after {
        bottom: 10px !important;

        width: 21px !important;
        height: 15px !important;

        font-size: 7px !important;
    }


    /*
       MOBILE CHAT WINDOW

       Full width with small safe margins.
    */

    #truepouchProductsWindow {
        left: 8px !important;
        right: 8px !important;

        top: 8px !important;
        bottom: 8px !important;

        width: auto !important;
        max-width: none !important;

        max-height: none !important;

        border-radius: 14px !important;
    }

    #truepouchProductsWindow.open {
        transform: scale(1) !important;
    }
}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 360px) {

    #truepouchProductsToggle {
        width: 43px !important;
        height: 116px !important;
    }

    #truepouchProductsToggle .tp-icon-chat,
    #truepouchProductsToggle .tp-icon-close {
        width: 26px !important;
        height: 26px !important;
    }

    #truepouchProductsToggle::before {
        top: 49px !important;

        font-size: 8px !important;

        letter-spacing: 1.3px !important;
    }

    #truepouchProductsToggle::after {
        bottom: 9px !important;

        width: 20px !important;
        height: 14px !important;
    }

    #truepouchProductsWindow {
        left: 6px !important;
        right: 6px !important;

        top: 6px !important;
        bottom: 6px !important;

        border-radius: 12px !important;
    }
}


/* ============================================================
   SAFE AREA FOR MOBILE DEVICES
   ============================================================ */

@supports (padding: env(safe-area-inset-bottom)) {

    @media (max-width: 480px) {

        #truepouchProductsWindow {
            top: max(6px, env(safe-area-inset-top)) !important;

            bottom: max(
                6px,
                env(safe-area-inset-bottom)
            ) !important;
        }
    }
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

#truepouchProductsToggle:focus-visible {
    outline: 2px solid #e5b800 !important;
    outline-offset: 2px !important;
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    #truepouchProductsToggle,
    #truepouchProductsToggle *,
    #truepouchProductsWindow {
        transition: none !important;
    }
}
