    /* Talkie Agent chat box. The panel, head, log, bubbles and composer come
       from partials-live-chat-widget-1.css (.tba-chat); this adds the
       pre-chat form, the phone row and the links row. */
    .tba-talkie [hidden] {
        display: none !important;
    }

    .tba-talkie[data-state="fallback"] .tba-chat__log,
    .tba-talkie[data-state="fallback"] .tba-chat__composer,
    .tba-talkie[data-state="fallback"] .tba-talkie__form,
    .tba-talkie[data-state="form"] .tba-chat__log,
    .tba-talkie[data-state="form"] .tba-chat__composer,
    .tba-talkie[data-state="chat"] .tba-talkie__form {
        display: none;
    }

    .tba-talkie[data-state="form"],
    .tba-talkie[data-state="fallback"] {
        height: auto;
        min-height: 0;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
    }

    .tba-talkie__form {
        display: flex;
        flex-direction: column;
        padding: 16px 18px 12px;
    }

    .tba-talkie__intro {
        margin: 0 0 14px;
        color: var(--tba-chat-text);
        font-size: 14px;
    }

    .tba-talkie__label {
        margin: 0 0 6px;
        color: var(--tba-chat-muted);
        font-size: 12px;
        font-weight: 600;
    }

    .tba-talkie__input,
    .tba-talkie__country {
        width: 100%;
        margin: 0 0 12px;
        padding: 11px 12px;
        border: 1px solid var(--tba-chat-border) !important;
        border-radius: 12px;
        outline: 0;
        background: var(--tba-chat-input-bg) !important;
        box-shadow: none;
        color: var(--tba-chat-text) !important;
        font: inherit;
        font-size: 16px; /* 16px: iOS does not zoom the page on focus */
        line-height: 1.3;
    }

    .tba-talkie__input:focus,
    .tba-talkie__country:focus {
        border-color: var(--tba-chat-blue) !important;
        box-shadow: 0 0 0 3px rgba(0, 115, 252, 0.18);
    }

    .tba-talkie__input[aria-invalid="true"] {
        border-color: #F87171 !important;
    }

    .tba-talkie__phone {
        display: flex;
        align-items: flex-start;
        gap: 6px;
    }

    .tba-talkie__country {
        flex: 0 0 auto;
        width: auto;
        padding-right: 6px;
        appearance: auto;
    }

    .tba-talkie__code {
        flex: none;
        display: inline-flex;
        align-items: center;
        height: 44px;
        padding: 0 2px;
        color: var(--tba-chat-text);
        font-size: 16px;
        font-weight: 600;
    }

    .tba-talkie__phone .tba-talkie__input {
        flex: 1;
        min-width: 0;
    }

    .tba-talkie__error {
        margin: -4px 0 10px;
        color: #F87171;
        font-size: 12px;
    }

    .tba-talkie__submit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 46px;
        padding: 10px 16px;
        border: 0;
        border-radius: 12px;
        background: var(--tba-chat-blue);
        color: #fff !important;
        font-family: var(--tk-heading-font, 'TK Heading', Poppins, system-ui, sans-serif);
        font-size: 15px;
        font-weight: 700;
        box-shadow: 0 6px 18px rgba(0, 115, 252, 0.25);
        cursor: pointer;
        transition: background-color 150ms ease;
    }

    .tba-talkie__submit:hover,
    .tba-talkie__submit:focus-visible {
        background: var(--tba-chat-blue-hover);
    }

    .tba-talkie__submit[disabled] {
        opacity: 0.7;
        cursor: progress;
    }

    .tba-talkie__note {
        margin: 10px 0 0;
        color: var(--tba-chat-muted);
        font-size: 11px;
        text-align: center;
    }

    /* Phones: 16px in the message box too, so iOS does not zoom. */
    .tba-talkie .tba-chat__input {
        font-size: 16px;
    }

    .tba-talkie .tba-chat__bubble {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    .tba-talkie .tba-chat__row.is-pending {
        opacity: 0.6;
    }

    .tba-talkie__links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 6px 12px 10px;
        color: var(--tba-chat-muted);
        font-size: 11px;
    }

    .tba-talkie__links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 1px solid var(--tba-chat-border);
        border-radius: 50%;
        background: var(--tba-chat-surface);
        color: var(--tba-chat-text) !important;
        text-decoration: none;
    }

    .tba-talkie__links a:hover,
    .tba-talkie__links a:focus-visible {
        background: var(--tba-chat-surface-hover);
        color: var(--tba-chat-blue) !important;
    }

    .tba-talkie__links svg {
        width: 20px;
        height: 20px;
    }

    .tba-talkie__links a.tba-talkie__wa {
        color: #25D366 !important;
    }

    .tba-talkie__links {
        font-size: 12px;
    }

    /* A reply arrived while the box was closed. */
    .tba-chat-launcher.has-unread .tba-chat-launcher__pip {
        top: 6px;
        left: 6px;
        width: 12px;
        height: 12px;
        background: #EF4444;
    }

    @media (max-width: 575.98px) {
        .tba-talkie[data-state="form"] {
            height: auto;
        }
    }

/* Files in the chat (picture, video, or a download card) */
.tba-talkie .tba-chat__attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--tba-chat-muted);
    cursor: pointer;
}

.tba-talkie .tba-chat__attach:hover:not(:disabled) {
    color: var(--tba-chat-blue);
}

.tba-talkie .tba-chat__attach:disabled {
    opacity: 0.4;
    cursor: default;
}

.tba-talkie .tba-chat__attach svg {
    width: 19px;
    height: 19px;
}

.tba-talkie .tba-chat__media {
    display: block;
    max-width: min(240px, 100%);
    border-radius: 14px;
    overflow: hidden;
    background: var(--tba-chat-agent-bubble);
}

.tba-talkie .tba-chat__media img,
.tba-talkie video.tba-chat__media {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: cover;
}

.tba-talkie .tba-chat__file {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 240px;
    padding: 10px 14px;
    border: 1px solid var(--tba-chat-border);
    border-radius: 14px;
    background: var(--tba-chat-agent-bubble);
    color: var(--tba-chat-text);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.tba-talkie .tba-chat__file strong {
    font-size: 14px;
}

.tba-talkie .tba-chat__file span {
    font-size: 12px;
    color: var(--tba-chat-muted);
}

/* Chat rating card (after the team closes the chat) */
.tba-talkie .tba-chat__rate {
    display: grid;
    gap: 8px;
    margin: 4px 0;
    padding: 12px 14px;
    border: 1px solid var(--tba-chat-border);
    border-radius: 14px;
    background: var(--tba-chat-agent-bubble);
    color: var(--tba-chat-text);
}

.tba-talkie .tba-chat__rate-ask,
.tba-talkie .tba-chat__rate-thanks {
    margin: 0;
    font-size: 14px;
}

.tba-talkie .tba-chat__rate-thanks:empty {
    display: none;
}

.tba-talkie .tba-chat__rate-row {
    display: flex;
    gap: 8px;
}

.tba-talkie .tba-chat__rate-btn,
.tba-talkie .tba-chat__rate-send {
    padding: 8px 14px;
    border: 1px solid var(--tba-chat-border);
    border-radius: 999px;
    background: transparent;
    color: var(--tba-chat-text);
    font-size: 14px;
    cursor: pointer;
}

.tba-talkie .tba-chat__rate-btn.is-active {
    border-color: var(--tba-chat-blue);
    background: var(--tba-chat-blue);
    color: #fff;
}

.tba-talkie .tba-chat__rate-more {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.tba-talkie .tba-chat__rate-more[hidden] {
    display: none;
}

.tba-talkie .tba-chat__rate-text {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--tba-chat-border);
    border-radius: 12px;
    background: var(--tba-chat-input-bg);
    color: var(--tba-chat-text);
    font-size: 16px;
    resize: none;
}

    /* Tawk is open: the same "Or reach us on" icons stay in a thin bar
       just above the Tawk window (top of the screen on phones). */
    .tba-tawk-bar {
        --tba-chat-blue: #0073FC;
        --tba-chat-surface: #1B2024;
        --tba-chat-surface-hover: #242A2F;
        --tba-chat-border: rgba(255, 255, 255, 0.12);
        --tba-chat-text: #F3F5F7;
        --tba-chat-muted: rgba(243, 245, 247, 0.7);
        position: fixed;
        z-index: 2147483647;
        display: none;
        box-sizing: border-box;
        background: #0E1114;
        border: 1px solid var(--tba-chat-border);
        border-radius: 14px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }

    html[data-tk-theme="light"] .tba-tawk-bar {
        --tba-chat-surface: #F5F6F8;
        --tba-chat-surface-hover: #EDF0F3;
        --tba-chat-border: rgba(15, 17, 21, 0.09);
        --tba-chat-text: #14161A;
        --tba-chat-muted: rgba(20, 22, 26, 0.6);
        background: #FFFFFF;
    }

    .tba-tawk-bar.is-on {
        display: block;
    }

    .tba-tawk-bar .tba-talkie__links {
        padding: 5px 10px;
        gap: 8px;
    }

    .tba-tawk-bar .tba-talkie__links a {
        width: 34px;
        height: 34px;
    }

    .tba-tawk-bar .tba-talkie__links svg {
        width: 18px;
        height: 18px;
    }

    .tba-tawk-bar.is-full {
        top: 0;
        left: 0;
        right: 0;
        border-width: 0 0 1px;
        border-radius: 0;
        box-shadow: none;
        padding-top: env(safe-area-inset-top, 0px);
    }

    /* Tawk could not open and Talkie Agent is off: phone, WhatsApp, email. */
    .tba-talkie__fallback {
        padding: 16px 16px 4px;
    }

    .tba-talkie__reach {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin: 0;
        font-size: 14px;
    }

    .tba-talkie__reach a {
        color: var(--tba-chat-blue) !important;
        font-weight: 600;
        text-decoration: none;
        overflow-wrap: anywhere;
    }

    /* Tawk is offline (nobody at the desk): big WhatsApp and Call buttons
       first, Tawk's message form only if the visitor still wants it. */
    .tba-talkie__offline {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 4px 0 8px;
    }

    .tba-talkie__offline[hidden],
    .tba-talkie__intro[hidden],
    .tba-talkie__reach[hidden] {
        display: none !important;
    }

    .tba-talkie__offline-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 10px 16px;
        border-radius: 12px;
        background: var(--tba-chat-blue);
        color: #fff !important;
        font-size: 16px;
        font-weight: 700;
        text-decoration: none !important;
    }

    .tba-talkie__offline-btn--wa {
        background: #25D366;
        color: #0B2E13 !important;
    }

    .tba-talkie__offline-msg {
        min-height: 44px;
        padding: 8px;
        border: 0;
        background: none;
        color: var(--tba-chat-blue);
        font-size: 14px;
        font-weight: 600;
        text-decoration: underline;
        cursor: pointer;
    }
