:root {
            --os-primary: #ffa000;
            --os-primary-dark: #e69000;
            --os-primary-soft: #fff6df;
            --os-text: #202124;
            --os-muted: #6b7280;
            --os-line: #e8eaed;
            --os-surface: #ffffff;
            --os-soft: #f6f7f9;
            --os-success: #1f9d55;
            --os-shadow: 0 24px 70px rgba(18, 24, 40, .18), 0 8px 24px rgba(18, 24, 40, .10);
        }

        #os-chat-root,
        #os-chat-root * {
            box-sizing: border-box;
        }

        /* Kompatibel dengan tombol Elementor/plugin lama. */
        body .bubble-chat {
            cursor: pointer !important;
        }

        #os-chat-root {
            position: fixed;
            right: max(20px, env(safe-area-inset-right));
            bottom: max(20px, env(safe-area-inset-bottom));
            z-index: 999999;
            font-family: "Roboto", Arial, sans-serif;
            font-size: 14px;
            line-height: 1.45;
            color: var(--os-text);
        }

        .os-chat-launcher {
            position: relative;
            display: grid;
            place-items: center;
            width: 62px;
            height: 62px;
            margin-left: auto;
            padding: 0;
            border: 0;
            border-radius: 22px;
            color: #111111;
            background: linear-gradient(145deg, var(--os-primary), var(--os-primary-dark));
            box-shadow: 0 12px 30px rgba(255, 160, 0, .34);
            cursor: pointer;
            transition: transform .2s ease, box-shadow .2s ease, border-radius .2s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .os-chat-launcher:hover {
            transform: translateY(-2px);
            box-shadow: 0 16px 36px rgba(255, 160, 0, .4);
        }

        .os-chat-launcher:focus-visible,
        .os-chat-close:focus-visible,
        .os-chat-option:focus-visible,
        .os-chat-action:focus-visible,
        .os-chat-send:focus-visible,
        .os-chat-form-back:focus-visible,
        .os-chat-teaser__close:focus-visible {
            outline: 3px solid rgba(255, 160, 0, .28);
            outline-offset: 3px;
        }

        .os-chat-launcher svg {
            width: 31px;
            height: 31px;
        }

        .os-chat-launcher__open path:first-child {
            fill: currentColor;
            stroke: currentColor;
            stroke-width: 1.2;
            stroke-linejoin: round;
        }

        .os-chat-launcher__open circle {
            fill: #ffffff;
        }

        .os-chat-launcher__close {
            display: none;
        }

        .os-chat-launcher__close path,
        .os-chat-close path {
            fill: none;
            stroke: currentColor;
            stroke-width: 2.1;
            stroke-linecap: round;
        }

        .os-chat-launcher.is-open {
            border-radius: 50%;
        }

        .os-chat-launcher.is-open .os-chat-launcher__open {
            display: none;
        }

        .os-chat-launcher.is-open .os-chat-launcher__close {
            display: block;
        }

        .os-chat-launcher__badge {
            position: absolute;
            top: -5px;
            right: -4px;
            display: grid;
            place-items: center;
            min-width: 22px;
            height: 22px;
            padding: 0 6px;
            border: 0px solid #ce1111;
            border-radius: 999px;
            color: #ffffff;
            background: #ce1111;
            font-size: 11px;
            font-weight: 800;
            line-height: 1;
            box-shadow: 0 5px 12px rgba(0, 0, 0, .15);
        }

        .os-chat-launcher.is-open .os-chat-launcher__badge,
        .os-chat-launcher__badge.is-hidden {
            display: none;
        }

        .os-chat-panel {
            position: absolute;
            right: 0;
            bottom: 76px;
            display: flex;
            flex-direction: column;
            width: min(390px, calc(100vw - 32px));
            height: min(650px, calc(100dvh - 120px));
            max-height: 78dvh;
            overflow: hidden;
            border: 1px solid rgba(17, 24, 39, .07);
            border-radius: 26px;
            background: var(--os-surface);
            box-shadow: var(--os-shadow);
            opacity: 0;
            visibility: hidden;
            transform: translateY(18px) scale(.97);
            transform-origin: bottom right;
            transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
        }

        .os-chat-panel.is-open {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        .os-chat-header {
            position: relative;
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 0 0 auto;
            min-height: 78px;
            padding: 14px 16px;
            color: #111111;
            background:
                radial-gradient(circle at 85% -20%, rgba(255,255,255,.28), transparent 38%),
                linear-gradient(135deg, var(--os-primary), var(--os-primary-dark));
        }

        .os-chat-avatar {
            position: relative;
            display: grid;
            place-items: center;
            width: 46px;
            height: 46px;
            flex: 0 0 46px;
            padding: 6px;
            border: 2px solid rgba(17,17,17,.18);
            border-radius: 50px;
            background: #fff;
            box-shadow: 0 7px 18px rgba(0,0,0,.15);
        }

        .os-chat-avatar img {
            display: block;
            width: 100%;
            height: 100%;
            border-radius: 10px;
            object-fit: contain;
        }

        .os-chat-avatar::after {
            content: "";
            position: absolute;
            right: -2px;
            bottom: -2px;
            width: 12px;
            height: 12px;
            border: 2px solid var(--os-primary-dark);
            border-radius: 50%;
            background: #3ddc84;
        }

        .os-chat-header__info {
            min-width: 0;
            flex: 1;
        }

        /* Font utama: judul, menu, dan tombol */
        #os-chat-root .os-chat-header__info strong,
        #os-chat-root .os-chat-teaser strong,
        #os-chat-root .os-chat-date,
        #os-chat-root .os-chat-option,
        #os-chat-root .os-chat-action,
        #os-chat-root .os-chat-form label,
        #os-chat-root .os-chat-send,
        #os-chat-root .os-chat-form-back {
            font-family: "Montserrat", Arial, sans-serif;
        }

        .os-chat-header__info strong {
            display: block;
            margin-bottom: 2px;
            font-size: 15px;
            font-weight: 700;
            letter-spacing: -.1px;
            color: black;    
        }

        .os-chat-status {
            display: flex;
            align-items: center;
            gap: 7px;
            color: rgba(17,17,17,.82);
            font-size: 12px;
        }

        .os-chat-status__dot {
            width: 7px;
            height: 7px;
            flex: 0 0 7px;
            border-radius: 50%;
            background: #40b25e;
            box-shadow: 0 0 0 4px rgb(184 255 203 / 38%);
        }

        .os-chat-status.is-offline .os-chat-status__dot {
            background: #ffd38a;
            box-shadow: 0 0 0 4px rgba(255,211,138,.14);
        }

        .os-chat-close {
            display: grid;
            place-items: center;
            width: 38px;
            height: 38px;
            flex: 0 0 38px;
            padding: 0;
            border: 1px solid rgba(17,17,17,.18);
            border-radius: 13px;
            color: #111111;
            background: rgba(255,255,255,.24);
            cursor: pointer;
            transition: background .2s ease, transform .2s ease;
        }

        .os-chat-close:hover {
            background: rgba(255,255,255,.38);
            transform: rotate(3deg);
        }

        .os-chat-close svg {
            width: 20px;
            height: 20px;
        }

        .os-chat-body {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            padding: 15px 14px 20px;
            background:
                linear-gradient(rgba(255,255,255,.91), rgba(255,255,255,.96)),
                radial-gradient(circle at 1px 1px, #d7dbe0 1px, transparent 1.3px);
            background-size: auto, 19px 19px;
            overscroll-behavior: contain;
            scrollbar-width: thin;
            scrollbar-color: #c7cbd1 transparent;
        }

        .os-chat-body::-webkit-scrollbar {
            width: 7px;
        }

        .os-chat-body::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: #c7cbd1;
        }

        .os-chat-date {
            width: max-content;
            margin: 0 auto 15px;
            padding: 5px 10px;
            border: 1px solid var(--os-line);
            border-radius: 999px;
            color: var(--os-muted);
            background: rgba(255,255,255,.92);
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .7px;
        }

        .os-chat-row {
            display: flex;
            align-items: flex-end;
            gap: 8px;
            margin: 0 0 11px;
            animation: osChatIn .24s ease both;
        }

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

        .os-chat-mini-avatar {
            display: grid;
            place-items: center;
            width: 27px;
            height: 27px;
            flex: 0 0 27px;
            padding: 4px;
            overflow: hidden;
            border: 1px solid rgba(255,160,0,.35);
            border-radius: 50px;
            background: #fff;
            box-shadow: 0 4px 10px rgba(255,160,0,.22);
        }

        .os-chat-mini-avatar img {
            display: block;
            width: 100%;
            height: 100%;
            border-radius: 5px;
            object-fit: contain;
        }

        .os-chat-bubble {
            width: fit-content;
            max-width: 82%;
            padding: 11px 13px;
            border: 1px solid var(--os-line);
            border-radius: 5px 20px 20px 20px;
            background: #fff;
            box-shadow: 0 5px 14px rgba(17,24,39,.05);
            color: var(--os-text);
            font-size: 13.5px;
            line-height: 1.55;
            overflow-wrap: anywhere;
        }

        .os-chat-bubble p {
            margin: 0;
        }

        .os-chat-bubble p + p {
            margin-top: 8px;
        }

        .os-chat-bubble strong {
            font-weight: 700;
            color: black;
        }

        .os-chat-row--user .os-chat-bubble {
            border-color: transparent;
            border-radius: 17px 5px 17px 17px;
            color: #111111;
            background: #ffa0006b;
            box-shadow: 0 7px 18px rgba(255,160,0,.22);
        }

        .os-chat-options,
        .os-chat-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 3px 0 14px 35px;
            animation: osChatIn .24s ease both;
            flex-direction: column;
        }

        .os-chat-options {
            flex-direction: column;
            align-items: stretch;
        }

        .os-chat-option,
        .os-chat-action {
            border: 1px solid #e5b44f;
            border-radius: 13px;
            color: #111111;
            background: rgba(255,255,255,.97);
            font: inherit;
            font-weight: 700;
            line-height: 1.2;
            cursor: pointer;
            transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .os-chat-option {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            padding: 11px 12px;
            text-align: left;
        }

        .os-chat-option::after {
            content: "›";
            margin-left: 10px;
            color: var(--os-primary);
            font-size: 20px;
            font-weight: 500;
            line-height: 1;
        }

        .os-chat-option:hover,
        .os-chat-action:hover {
            transform: translateY(-1px);
            border-color: var(--os-primary);
            background: #ffa0003d;
			color: black;
            box-shadow: 0 6px 15px rgba(255,160,0,.14);
        }

        .os-chat-option:disabled,
        .os-chat-action:disabled {
            opacity: .55;
            cursor: default;
            transform: none;
        }

        .os-chat-action {
            padding: 12px;
            font-size: 14px;
        }

        .os-chat-action--primary {
            border-color: #1fa04f;
            color: #ffffff;
            background: #1fa04f;
        }

        .os-chat-action--primary:hover {
            color: #ffffff;
            background: #198842;
            border-color: #1fa04f;
        }

        .os-chat-typing {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            min-width: 54px;
            min-height: 42px;
        }

        .os-chat-typing i {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #9aa0a6;
            animation: osTyping 1.05s infinite ease-in-out;
        }

        .os-chat-typing i:nth-child(2) {
            animation-delay: .13s;
        }

        .os-chat-typing i:nth-child(3) {
            animation-delay: .26s;
        }

        .os-chat-form {
            margin: 4px 0 14px 35px;
            padding: 12px;
            border: 1px solid var(--os-line);
            border-radius: 17px;
            background: rgba(255,255,255,.96);
            box-shadow: 0 7px 20px rgba(17,24,39,.06);
            animation: osChatIn .24s ease both;
        }

        .os-chat-form label {
            display: block;
            margin-bottom: 8px;
            font-size: 12px;
            font-weight: 700;
        }

        .os-chat-textarea {
            display: block;
            width: 100%;
            min-height: 105px;
            max-height: 190px;
            resize: vertical;
            padding: 11px 12px;
            border: 1px solid #d7dbe0;
            border-radius: 13px;
            outline: none;
            color: var(--os-text);
            background: #fff;
            font: inherit;
            line-height: 1.5;
            transition: border-color .16s ease, box-shadow .16s ease;
        }

        .os-chat-textarea:focus {
            border-color: var(--os-primary);
            box-shadow: 0 0 0 4px rgba(255,160,0,.16);
        }

        .os-chat-form__hint {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin-top: 7px;
            color: var(--os-muted);
            font-size: 10.5px;
        }

        .os-chat-form__error {
            display: none;
            margin: 7px 0 0;
            color: #b42318;
            font-size: 11px;
            font-weight: 700;
        }

        .os-chat-form__error.is-visible {
            display: block;
        }

        button.os-chat-send {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            min-height: 43px;
            margin-top: 10px;
            padding: 10px 14px;
            border: 0;
            border-radius: 13px;
            color: white;
            background: #1fa04f !important;
            font: inherit;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 0 8px 18px rgb(0 255 22 / 24%);
            transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
        }

        button.os-chat-send:hover {
            transform: translateY(-1px);
            background: #1e7c41 !important;
            box-shadow: 0 8px 18px rgb(0 255 22 / 24%);
        }

        .os-chat-send svg {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }

        .os-chat-form__buttons {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
            margin-top: 10px;
        }

        .os-chat-form__buttons .os-chat-send {
            margin-top: 0;
        }

        .os-chat-form-back {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            min-height: 41px;
            padding: 9px 12px;
            border: 1px solid #d8dce2;
            border-radius: 13px;
            color: #111111;
            background: #ffffff;
            font: inherit;
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            transition: transform .16s ease, border-color .16s ease, background .16s ease;
        }

        .os-chat-form-back:hover {
            transform: translateY(-1px);
            border-color: var(--os-primary);
            background: var(--os-primary-soft);
		    color: #474747;			
        }

        .os-chat-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex: 0 0 auto;
            min-height: 37px;
            padding: 9px 14px;
            border-top: 1px solid var(--os-line);
            color: var(--os-muted);
            background: #fff;
            font-size: 10.5px;
        }

        .os-chat-footer__brand {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            min-width: 88px;
        }

        .os-chat-footer__brand img {
            display: block;
            width: auto;
            max-width: 108px;
            height: 19px;
            object-fit: contain;
        }

        .os-chat-teaser {
            position: absolute;
            right: 0;
            bottom: 76px;
            width: min(285px, calc(100vw - 32px));
            padding: 13px 38px 13px 14px;
            border: 1px solid rgba(17,24,39,.07);
            border-radius: 17px 17px 7px 17px;
            background: #fff;
            box-shadow: 0 15px 38px rgba(17,24,39,.15);
            animation: osTeaserIn .28s ease both;
        }

        .os-chat-teaser::after {
            content: "";
            position: absolute;
            right: 22px;
            bottom: -7px;
            width: 14px;
            height: 14px;
            border-right: 1px solid rgba(17,24,39,.07);
            border-bottom: 1px solid rgba(17,24,39,.07);
            background: #fff;
            transform: rotate(45deg);
        }

        .os-chat-teaser strong,
        .os-chat-teaser span {
            display: block;
        }

        .os-chat-teaser strong {
            margin-bottom: 2px;
            font-size: 13px;
            font-weight: 700;
        }

        .os-chat-teaser span {
            color: var(--os-muted);
            font-size: 11.5px;
        }

        .os-chat-teaser__close {
            position: absolute;
            top: 7px;
            right: 8px;
            display: grid;
            place-items: center;
            width: 25px;
            height: 25px;
            padding: 0;
            border: 0;
            border-radius: 8px;
            color: var(--os-muted);
            background: transparent;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
        }

        .os-chat-teaser__close:hover {
            color: var(--os-text);
            background: var(--os-soft);
        }

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

        @keyframes osTeaserIn {
            from { opacity: 0; transform: translateY(8px) scale(.98); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

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

        @media (max-width: 520px) {
            #os-chat-root {
                right: max(12px, env(safe-area-inset-right));
                bottom: max(14px, env(safe-area-inset-bottom));
            }

            .os-chat-launcher {
                width: 58px;
                height: 58px;
                border-radius: 20px;
            }

            .os-chat-panel {
                position: fixed;
                right: 12px;
                left: 12px;
                bottom: calc(84px + env(safe-area-inset-bottom));
                width: auto;
                height: min(640px, calc(100dvh - 110px));
                max-height: none;
                border-radius: 23px;
                transform-origin: bottom center;
            }

            .os-chat-teaser {
                position: fixed;
                right: 12px;
                bottom: calc(84px + env(safe-area-inset-bottom));
                width: min(285px, calc(100vw - 24px));
            }

            .os-chat-header {
                min-height: 73px;
                padding: 12px 13px;
            }

            .os-chat-body {
                padding: 20px;
            }

            .os-chat-options,
            .os-chat-actions,
            .os-chat-form {
                margin-left: 0;
            }

            .os-chat-bubble {
                max-width: 86%;
                font-size: 13px;
            }
        }

        @media (max-height: 620px) and (min-width: 521px) {
            .os-chat-panel {
                height: calc(100dvh - 105px);
                max-height: none;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            #os-chat-root *,
            #os-chat-root *::before,
            #os-chat-root *::after {
                animation-duration: .001ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: .001ms !important;
                scroll-behavior: auto !important;
            }
        }
