
.tspb-chat-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
    color: #111827;
}

.tspb-chat-widget * {
    box-sizing: border-box;
}

.tspb-chat-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    background: linear-gradient(135deg, #111827 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.32), 0 8px 18px rgba(17, 24, 39, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.tspb-chat-toggle:hover,
.tspb-chat-toggle:focus {
    color: #ffffff;
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 22px 45px rgba(37, 99, 235, 0.38), 0 10px 22px rgba(17, 24, 39, 0.2);
}

.tspb-chat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.tspb-chat-panel {
    display: none;
    position: absolute;
    right: 0;
    bottom: 68px;
    width: 390px;
    max-width: calc(100vw - 28px);
    height: 590px;
    max-height: calc(100vh - 105px);
    background: rgba(255,255,255,0.96);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(226, 232, 240, 0.95);
    backdrop-filter: blur(14px);
    transform-origin: bottom right;
}

.tspb-open .tspb-chat-panel {
    display: flex;
    flex-direction: column;
    animation: tspbPanelIn 0.2s ease-out;
}

@keyframes tspbPanelIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.tspb-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    color: #ffffff;
    position: relative;
}

.tspb-chat-header:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.18), transparent 30%);
    pointer-events: none;
}

.tspb-chat-header > div,
.tspb-chat-close {
    position: relative;
    z-index: 1;
}

.tspb-chat-header strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.tspb-chat-header small {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.9;
}

.tspb-chat-header small:before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.tspb-chat-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 3px;
    transition: background 0.16s ease, transform 0.16s ease;
}

.tspb-chat-close:hover,
.tspb-chat-close:focus {
    background: rgba(255,255,255,0.22);
    transform: rotate(90deg);
}

.tspb-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,0.08), transparent 30%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    scroll-behavior: smooth;
}

.tspb-chat-messages::-webkit-scrollbar { width: 7px; }
.tspb-chat-messages::-webkit-scrollbar-track { background: transparent; }
.tspb-chat-messages::-webkit-scrollbar-thumb { background: rgba(100,116,139,0.35); border-radius: 999px; }

.tspb-message {
    width: fit-content;
    max-width: 88%;
    margin-bottom: 11px;
    padding: 11px 13px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.48;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: 0 5px 16px rgba(15,23,42,0.06);
    animation: tspbBubbleIn 0.16s ease-out;
}

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

.tspb-message a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tspb-message-bot {
    background: rgba(255,255,255,0.96);
    color: #111827;
    border: 1px solid rgba(226,232,240,0.96);
    border-bottom-left-radius: 6px;
}

.tspb-message-user {
    margin-left: auto;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

.tspb-typing {
    min-width: 58px;
    color: transparent;
    position: relative;
}

.tspb-typing:after {
    content: "";
    display: block;
    width: 36px;
    height: 10px;
    background:
        radial-gradient(circle, #64748b 42%, transparent 45%) 0 50%/10px 10px no-repeat,
        radial-gradient(circle, #64748b 42%, transparent 45%) 13px 50%/10px 10px no-repeat,
        radial-gradient(circle, #64748b 42%, transparent 45%) 26px 50%/10px 10px no-repeat;
    animation: tspbTyping 1s infinite ease-in-out;
}

@keyframes tspbTyping {
    0%, 100% { opacity: .45; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-1px); }
}

.tspb-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.98);
    border-top: 1px solid #e5e7eb;
}

.tspb-quick-btn {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 9px 8px;
    background: #ffffff;
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tspb-quick-btn:hover,
.tspb-quick-btn:focus {
    background: #f8fafc;
    border-color: #bfdbfe;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15,23,42,0.08);
}

.tspb-buy-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-color: #16a34a;
    color: #ffffff;
}

.tspb-buy-btn:hover,
.tspb-buy-btn:focus {
    color: #ffffff;
    filter: brightness(1.03);
}

.tspb-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.tspb-chat-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 12px 13px;
    font-size: 14px;
    outline: none;
    background: #f8fafc;
    color: #111827;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tspb-chat-input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

.tspb-chat-send {
    border: 0;
    border-radius: 16px;
    padding: 11px 15px;
    min-width: 70px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.tspb-chat-send:hover,
.tspb-chat-send:focus {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.tspb-chat-send:disabled,
.tspb-order-submit:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    transform: none;
}

.tspb-order-form-wrap {
    margin: 8px 0 13px;
    padding: 13px;
    background: rgba(255,255,255,0.98);
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}

.tspb-order-form-title {
    font-weight: 850;
    margin-bottom: 10px;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.tspb-order-form label {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    font-size: 12px;
    font-weight: 800;
}

.tspb-order-form label span { color: #dc2626; }

.tspb-order-form input,
.tspb-order-form textarea {
    display: block;
    width: 100%;
    margin-top: 5px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 10px 11px;
    color: #111827;
    background: #f8fafc;
    font-size: 13px;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tspb-order-form input:focus,
.tspb-order-form textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
}

.tspb-order-submit {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 11px 14px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.tspb-order-submit:hover,
.tspb-order-submit:focus {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.tspb-order-note {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.tspb-suggested-message { max-width: 96%; }

.tspb-suggested-title {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 850;
    color: #334155;
}

.tspb-suggested-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tspb-suggested-btn {
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #1f2937;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.tspb-suggested-btn:hover,
.tspb-suggested-btn:focus {
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.tspb-product-card {
    display: block;
    padding: 10px 11px;
    margin: 7px 0;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

@media (max-width: 480px) {
    .tspb-chat-widget {
        right: 12px;
        bottom: 12px;
    }

    .tspb-chat-panel {
        right: -2px;
        bottom: 60px;
        width: calc(100vw - 24px);
        height: 76vh;
        border-radius: 22px;
    }

    .tspb-chat-toggle {
        padding: 12px 14px;
    }

    .tspb-chat-text { display: none; }

    .tspb-quick-actions {
        grid-template-columns: 1fr;
    }

    .tspb-quick-btn {
        padding: 10px;
    }
}

/* 1.2.5 contrast fix: prevent theme CSS from making blue/dark buttons black */
.tspb-chat-widget button,
.tspb-chat-widget input,
.tspb-chat-widget textarea {
    font-family: inherit;
}

.tspb-chat-widget .tspb-chat-toggle,
.tspb-chat-widget .tspb-chat-toggle *,
.tspb-chat-widget .tspb-chat-close,
.tspb-chat-widget .tspb-chat-send,
.tspb-chat-widget .tspb-order-submit,
.tspb-chat-widget .tspb-buy-btn,
.tspb-chat-widget .tspb-buy-btn *,
.tspb-chat-widget .tspb-message-user,
.tspb-chat-widget .tspb-message-user * {
    color: #ffffff !important;
    text-shadow: none !important;
}

.tspb-chat-widget .tspb-chat-send,
.tspb-chat-widget .tspb-order-submit,
.tspb-chat-widget .tspb-chat-toggle,
.tspb-chat-widget .tspb-buy-btn {
    -webkit-text-fill-color: #ffffff !important;
}

.tspb-chat-widget .tspb-quick-btn:not(.tspb-buy-btn),
.tspb-chat-widget .tspb-suggested-btn {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

.tspb-chat-widget .tspb-chat-send:hover,
.tspb-chat-widget .tspb-chat-send:focus,
.tspb-chat-widget .tspb-order-submit:hover,
.tspb-chat-widget .tspb-order-submit:focus,
.tspb-chat-widget .tspb-chat-toggle:hover,
.tspb-chat-widget .tspb-chat-toggle:focus,
.tspb-chat-widget .tspb-buy-btn:hover,
.tspb-chat-widget .tspb-buy-btn:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Lyro-style feature polish */
.tspb-feedback{margin-top:10px;padding-top:8px;border-top:1px solid rgba(0,0,0,.08);display:flex;gap:8px;align-items:center;font-size:12px;color:#64748b;flex-wrap:wrap}
.tspb-feedback-btn{border:1px solid #dbe3ef!important;background:#fff!important;color:#111827!important;border-radius:999px!important;min-width:34px!important;height:30px!important;cursor:pointer!important;line-height:1!important;font-size:14px!important;padding:0!important;box-shadow:none!important}
.tspb-feedback-btn:hover{background:#f8fafc!important;transform:translateY(-1px)}
.tspb-lookup-form-wrap .tspb-order-form-title{background:#f8fafc;border-radius:10px;padding:8px 10px;margin-bottom:8px;font-weight:700;color:#0f172a}
.tspb-chat-widget.tspb-peek .tspb-chat-toggle{animation:tspbPulse 1.4s ease-in-out 3;box-shadow:0 12px 30px rgba(37,99,235,.35)!important}
@keyframes tspbPulse{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-3px) scale(1.03)}}
.tspb-order-status-btn{background:#111827!important;color:#fff!important;border-color:#111827!important}

/* 1.3.1 full button visibility fix: remove black chat buttons and force readable colors */
.tspb-chat-widget button,
.tspb-chat-widget button *,
.tspb-chat-widget a.tspb-button,
.tspb-chat-widget a.tspb-button * {
    text-shadow: none !important;
    box-shadow: none;
}

.tspb-chat-widget .tspb-chat-toggle,
.tspb-chat-widget .tspb-chat-send,
.tspb-chat-widget .tspb-order-submit,
.tspb-chat-widget .tspb-buy-btn,
.tspb-chat-widget .tspb-order-status-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.tspb-chat-widget .tspb-help-btn,
.tspb-chat-widget .tspb-custom-btn {
    background: #ffffff !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
    -webkit-text-fill-color: #1d4ed8 !important;
}

.tspb-chat-widget .tspb-feedback-btn,
.tspb-chat-widget .tspb-suggested-btn,
.tspb-chat-widget .tspb-quick-btn:not(.tspb-buy-btn):not(.tspb-order-status-btn) {
    background: #ffffff !important;
    border: 1px solid #dbe3ef !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

.tspb-chat-widget .tspb-chat-toggle:hover,
.tspb-chat-widget .tspb-chat-send:hover,
.tspb-chat-widget .tspb-order-submit:hover,
.tspb-chat-widget .tspb-buy-btn:hover,
.tspb-chat-widget .tspb-order-status-btn:hover {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    filter: brightness(1.05);
}

.tspb-chat-widget .tspb-help-btn:hover,
.tspb-chat-widget .tspb-custom-btn:hover,
.tspb-chat-widget .tspb-suggested-btn:hover,
.tspb-chat-widget .tspb-feedback-btn:hover,
.tspb-chat-widget .tspb-quick-btn:not(.tspb-buy-btn):not(.tspb-order-status-btn):hover {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    -webkit-text-fill-color: #1d4ed8 !important;
}

.tspb-chat-widget .tspb-chat-close {
    background: rgba(255,255,255,0.16) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}


/* 1.3.4 compact inline button layout */
.tspb-chat-widget .tspb-quick-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    flex-wrap: nowrap !important;
}

.tspb-chat-widget .tspb-quick-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    border-radius: 999px !important;
    padding: 7px 6px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 32px !important;
}

.tspb-chat-widget .tspb-suggested-questions {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.tspb-chat-widget .tspb-suggested-btn,
.tspb-chat-widget .tspb-feedback-btn {
    padding: 6px 9px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    min-height: 28px !important;
}

.tspb-chat-widget .tspb-chat-send {
    min-width: 58px !important;
    padding: 10px 12px !important;
    border-radius: 14px !important;
}

@media (max-width: 480px) {
    .tspb-chat-widget .tspb-quick-actions {
        grid-template-columns: none !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 5px !important;
        padding: 7px 8px !important;
    }

    .tspb-chat-widget .tspb-quick-btn {
        padding: 6px 4px !important;
        font-size: 10.5px !important;
        min-height: 30px !important;
    }
}


/* 1.3.5 Options dropdown: keep action buttons hidden until customer opens them */
.tspb-chat-widget .tspb-options-area {
    position: relative !important;
    padding: 8px 10px !important;
    background: rgba(255,255,255,0.98) !important;
    border-top: 1px solid #e5e7eb !important;
}

.tspb-chat-widget .tspb-options-toggle {
    width: 100% !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    min-height: 34px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    -webkit-text-fill-color: #1d4ed8 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    cursor: pointer !important;
}

.tspb-chat-widget .tspb-options-toggle:after {
    content: " ▾";
    font-size: 11px;
}

.tspb-chat-widget .tspb-options-open .tspb-options-toggle:after {
    content: " ▴";
}

.tspb-chat-widget .tspb-options-area .tspb-quick-actions {
    display: none !important;
    margin-top: 7px !important;
    padding: 0 !important;
    border-top: 0 !important;
    background: transparent !important;
    grid-template-columns: none !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
}

.tspb-chat-widget .tspb-options-area.tspb-options-open .tspb-quick-actions {
    display: flex !important;
}

.tspb-chat-widget .tspb-options-area .tspb-quick-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 7px 10px !important;
    font-size: 11px !important;
    min-height: 30px !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

@media (max-width: 480px) {
    .tspb-chat-widget .tspb-options-area .tspb-quick-actions {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .tspb-chat-widget .tspb-options-area .tspb-quick-btn {
        flex: 1 1 calc(50% - 6px) !important;
        font-size: 10.5px !important;
        padding: 7px 8px !important;
    }
}

/* 1.3.6 professional rounded options/buttons polish */
.tspb-chat-widget .tspb-options-area {
    padding: 10px 12px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-top: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.04) !important;
}

.tspb-chat-widget .tspb-options-toggle {
    width: auto !important;
    min-width: 116px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    border: 1px solid rgba(37, 99, 235, 0.18) !important;
    border-radius: 999px !important;
    padding: 9px 15px !important;
    min-height: 38px !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    letter-spacing: -0.01em !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease !important;
}

.tspb-chat-widget .tspb-options-toggle:hover,
.tspb-chat-widget .tspb-options-toggle:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(-1px) !important;
    filter: brightness(1.04) !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28) !important;
    outline: none !important;
}

.tspb-chat-widget .tspb-options-toggle:before {
    content: "☰";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 12px;
    line-height: 1;
}

.tspb-chat-widget .tspb-options-toggle:after {
    content: "▾" !important;
    margin-left: 1px !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 11px !important;
    opacity: 0.9 !important;
}

.tspb-chat-widget .tspb-options-open .tspb-options-toggle:after {
    content: "▴" !important;
}

.tspb-chat-widget .tspb-options-area .tspb-quick-actions {
    margin-top: 10px !important;
    gap: 8px !important;
    padding: 10px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
}

.tspb-chat-widget .tspb-options-area .tspb-quick-btn {
    border-radius: 999px !important;
    padding: 9px 13px !important;
    min-height: 36px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: -0.01em !important;
    border: 1px solid rgba(203, 213, 225, 0.95) !important;
    background: #ffffff !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease !important;
}

.tspb-chat-widget .tspb-options-area .tspb-quick-btn:hover,
.tspb-chat-widget .tspb-options-area .tspb-quick-btn:focus {
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10) !important;
    outline: none !important;
}

.tspb-chat-widget .tspb-options-area .tspb-buy-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.tspb-chat-widget .tspb-options-area .tspb-help-btn {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border-color: rgba(34, 197, 94, 0.28) !important;
    color: #166534 !important;
    -webkit-text-fill-color: #166534 !important;
}

.tspb-chat-widget .tspb-options-area .tspb-custom-btn {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
    border-color: rgba(249, 115, 22, 0.28) !important;
    color: #9a3412 !important;
    -webkit-text-fill-color: #9a3412 !important;
}

.tspb-chat-widget .tspb-options-area .tspb-order-status-btn {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important;
    border-color: rgba(124, 58, 237, 0.25) !important;
    color: #5b21b6 !important;
    -webkit-text-fill-color: #5b21b6 !important;
}

.tspb-chat-widget .tspb-options-area .tspb-buy-btn:hover,
.tspb-chat-widget .tspb-options-area .tspb-buy-btn:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.tspb-chat-widget .tspb-options-area .tspb-help-btn:hover,
.tspb-chat-widget .tspb-options-area .tspb-help-btn:focus {
    background: #dcfce7 !important;
    color: #14532d !important;
    -webkit-text-fill-color: #14532d !important;
}

.tspb-chat-widget .tspb-options-area .tspb-custom-btn:hover,
.tspb-chat-widget .tspb-options-area .tspb-custom-btn:focus {
    background: #ffedd5 !important;
    color: #7c2d12 !important;
    -webkit-text-fill-color: #7c2d12 !important;
}

.tspb-chat-widget .tspb-options-area .tspb-order-status-btn:hover,
.tspb-chat-widget .tspb-options-area .tspb-order-status-btn:focus {
    background: #ede9fe !important;
    color: #4c1d95 !important;
    -webkit-text-fill-color: #4c1d95 !important;
}

.tspb-chat-widget .tspb-chat-send,
.tspb-chat-widget .tspb-order-submit {
    border-radius: 999px !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18) !important;
}

.tspb-chat-widget .tspb-suggested-btn,
.tspb-chat-widget .tspb-feedback-btn {
    border-radius: 999px !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05) !important;
}

@media (max-width: 480px) {
    .tspb-chat-widget .tspb-options-toggle {
        width: 100% !important;
    }

    .tspb-chat-widget .tspb-options-area .tspb-quick-btn {
        flex: 1 1 100% !important;
        width: 100% !important;
        justify-content: center !important;
        font-size: 12px !important;
        min-height: 38px !important;
    }
}


/* 1.3.7 professional form typography polish */
.tspb-chat-widget .tspb-order-form-wrap {
    margin: 10px 0 14px !important;
    padding: 16px !important;
    background: #ffffff !important;
    border: 1px solid rgba(219, 227, 239, 0.95) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10) !important;
    color: #0f172a !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif !important;
}

.tspb-chat-widget .tspb-order-form-title {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 13px !important;
    padding: 0 0 11px !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
    color: #0f172a !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
}

.tspb-chat-widget .tspb-form-help .tspb-order-form-title:before {
    content: "?";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 900;
}

.tspb-chat-widget .tspb-form-buy .tspb-order-form-title:before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 900;
}

.tspb-chat-widget .tspb-order-form {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tspb-chat-widget .tspb-order-form label {
    display: block !important;
    margin: 0 0 11px !important;
    color: #334155 !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    font-weight: 750 !important;
    letter-spacing: -0.01em !important;
}

.tspb-chat-widget .tspb-order-form label span {
    color: #ef4444 !important;
    font-weight: 900 !important;
}

.tspb-chat-widget .tspb-order-form input,
.tspb-chat-widget .tspb-order-form textarea {
    display: block !important;
    width: 100% !important;
    margin-top: 6px !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 14px !important;
    padding: 11px 12px !important;
    min-height: 42px !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    background: #f8fafc !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03) !important;
    outline: none !important;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease !important;
}

.tspb-chat-widget .tspb-order-form textarea {
    min-height: 82px !important;
    resize: vertical !important;
}

.tspb-chat-widget .tspb-order-form input::placeholder,
.tspb-chat-widget .tspb-order-form textarea::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    font-weight: 450 !important;
}

.tspb-chat-widget .tspb-order-form input:focus,
.tspb-chat-widget .tspb-order-form textarea:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), inset 0 1px 2px rgba(15, 23, 42, 0.02) !important;
}

.tspb-chat-widget .tspb-order-submit {
    width: 100% !important;
    margin-top: 3px !important;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 12px 16px !important;
    min-height: 44px !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 850 !important;
    letter-spacing: -0.01em !important;
    cursor: pointer !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22) !important;
}

.tspb-chat-widget .tspb-form-help .tspb-order-submit {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.22) !important;
}

.tspb-chat-widget .tspb-order-submit:hover,
.tspb-chat-widget .tspb-order-submit:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(-1px) !important;
    filter: brightness(1.04) !important;
}

.tspb-chat-widget .tspb-order-note {
    margin: 10px 0 0 !important;
    padding: 9px 10px !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    color: #64748b !important;
    font-size: 11.5px !important;
    line-height: 1.45 !important;
    font-weight: 500 !important;
}

@media (max-width: 480px) {
    .tspb-chat-widget .tspb-order-form-wrap {
        padding: 14px !important;
        border-radius: 20px !important;
    }
    .tspb-chat-widget .tspb-order-form-title {
        font-size: 15px !important;
    }
    .tspb-chat-widget .tspb-order-form input,
    .tspb-chat-widget .tspb-order-form textarea {
        font-size: 13px !important;
    }
}

/* v1.4.0 AI sales agent polish */
.tspb-form-quote .tspb-order-form-title {
  color: #7c2d12 !important;
}
.tspb-form-quote .tspb-order-submit {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 999px !important;
}
.tspb-form-quote .tspb-order-submit:hover {
  filter: brightness(0.96);
}
.tspb-message-bot a {
  word-break: break-word;
}


/* Product result cards - modern store assistant */
.tspb-product-results {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 8px 0 12px 0 !important;
}
.tspb-product-card {
    background: #ffffff !important;
    border: 1px solid #e5eaf3 !important;
    border-radius: 16px !important;
    padding: 12px 13px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07) !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}
.tspb-product-card-title {
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 7px !important;
}
.tspb-product-card-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 9px !important;
}
.tspb-product-card-meta span {
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 999px !important;
    background: #f3f6fb !important;
    color: #334155 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    padding: 6px 8px !important;
    font-weight: 600 !important;
}
.tspb-product-card-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 8px 12px !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22) !important;
}
.tspb-product-card-link:hover,
.tspb-product-card-link:focus {
    color: #ffffff !important;
    text-decoration: none !important;
    filter: brightness(0.96) !important;
}

/* v1.7.6 category suggestion chips */
.tspb-category-results {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 8px 0 12px 0 !important;
}
.tspb-category-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    max-width: 100% !important;
    padding: 9px 11px !important;
    border-radius: 999px !important;
    background: #eef6ff !important;
    color: #174ea6 !important;
    border: 1px solid #bfdbfe !important;
    text-decoration: none !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.10) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}
.tspb-category-chip:hover,
.tspb-category-chip:focus {
    background: #dbeafe !important;
    color: #123f89 !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.15) !important;
}
.tspb-category-chip-name {
    display: inline-block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 185px !important;
}
.tspb-category-chip-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 26px !important;
    padding: 3px 7px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #2563eb !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}
@media (max-width: 480px) {
    .tspb-category-chip-name {
        max-width: 145px !important;
    }
}

/* v1.9.0 advanced agent UI: choice chips, quote cart, setup wizard */
.tspb-choice-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 8px 0 12px 0 !important;
}
.tspb-choice-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #c7d2fe !important;
    background: #eef2ff !important;
    color: #1e3a8a !important;
    border-radius: 999px !important;
    padding: 8px 11px !important;
    font-size: 12.5px !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    cursor: pointer !important;
    box-shadow: 0 7px 16px rgba(37,99,235,.10) !important;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease !important;
}
.tspb-choice-btn:hover,
.tspb-choice-btn:focus {
    background: #dbeafe !important;
    color: #123f89 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(37,99,235,.15) !important;
}
.tspb-quote-cart {
    background: #ffffff !important;
    border: 1px solid #e5eaf3 !important;
    border-radius: 16px !important;
    padding: 12px 13px !important;
    margin: 8px 0 12px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07) !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}
.tspb-quote-cart-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #111827 !important;
    margin-bottom: 8px !important;
}
.tspb-quote-cart ul {
    margin: 0 0 10px 18px !important;
    padding: 0 !important;
    color: #334155 !important;
    font-size: 13px !important;
}
.tspb-quote-cart li { margin: 4px 0 !important; }
.tspb-quote-cart-empty {
    color: #64748b !important;
    font-size: 13px !important;
}
.tspb-quote-cart-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
.tspb-setup-form-wrap select,
.tspb-order-form-wrap select {
    width: 100% !important;
    border: 1px solid #d5dce8 !important;
    border-radius: 12px !important;
    padding: 10px 11px !important;
    font-size: 13px !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
    color: #111827 !important;
    background: #ffffff !important;
    outline: none !important;
}
.tspb-setup-form-wrap select:focus,
.tspb-order-form-wrap select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
}

/* v2.2.0 conversion mode CTA */
.tspb-conversion-cta,
.tspb-conversion-open-prompt {
    margin-top: 8px !important;
}
.tspb-conversion-title {
    font-weight: 600 !important;
    margin-bottom: 8px !important;
}
.tspb-conversion-actions {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin-top: 8px !important;
}
.tspb-conversion-actions .tspb-choice-btn {
    font-size: 12px !important;
    padding: 8px 10px !important;
}
